Middleware deployment and installation method, electronic device and storage medium
Through functional deployment, the automatic filtering and installation of middleware is solved, and the cumbersome framework incompatibility and installation adaptation of existing middleware is implemented. It realizes the rapid installation and configuration of middleware, and saves human resources.
Patent Information
- Application Number
- CN202510247741.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-03-04
AI Technical Summary
During deployment, existing middleware needs to be frequently coded and transformed due to incompatibility of frameworks, which consumes a lot of human resources and is cumbersome to install and adapt.
The middleware deployment and installation method is adopted to package middleware and configuration files through functional deployment dependency packages, and the middleware is automatically filtered and installed according to the deployment system and function type identification to reduce manual intervention.
It realizes rapid installation and configuration of middleware, reduces developers' demand for code transformation of middleware, saves human resources, and improves installation efficiency.
Smart Images

Figure CN119739401B_ABST
Abstract
Description
Background Art
[0002] Middleware is a type of software between application systems and system software. It uses the basic services (functions) provided by system software to connect various parts of application systems or different applications on the network, and can achieve the purpose of resource sharing and function sharing. When the current middleware is deployed on the application system, the deployed middleware may be incompatible with the framework of the application system to be deployed. At this time, the middleware needs to be coded. Some middleware is used more frequently, so it is necessary to frequently install and adapt the middleware in multiple application systems. For each installation, the developer needs to code the middleware. Therefore, the current way of installing and deploying middleware consumes the human resources of developers. Summary of the invention
[0003] In view of the above technical problems, the technical solution adopted by the present invention is:
[0004] According to one aspect of the present application, a middleware deployment and installation method is provided, which is applied to a middleware deployment and installation system, wherein the middleware deployment and installation system is connected to a plurality of middleware deployment systems, wherein a function deployment dependency package is stored in the middleware deployment and installation system, wherein the function deployment dependency package includes a plurality of first middlewares, a plurality of second middlewares, and a configuration file corresponding to each first middleware and a configuration file corresponding to each second middleware; the first middleware is a middleware that is required for system deployment, and the second middleware is a middleware that is not required for system deployment;
[0005] The middleware deployment and installation method includes the following steps:
[0006] Step S100: in response to receiving a middleware deployment instruction sent by a first deployment system, obtaining a deployment system identifier and a function type identifier included in the middleware deployment instruction;
[0007] Step S200: determining a second deployment system from a plurality of middleware deployment systems according to the deployment system identifier; the second deployment system is a middleware deployment system with which the first deployment system wants to perform data interaction;
[0008] Step S300: According to the function type identifier, determine a first target middleware from a plurality of first middlewares, and determine a plurality of second initial middlewares from a plurality of second middlewares; the first target middleware is a first middleware that implements a function service corresponding to the middleware deployment instruction of the first deployment system; the second initial middleware is a second middleware that implements a function service corresponding to the middleware deployment instruction of the first deployment system;
[0009] Step S400: acquiring a project code text of a functional service corresponding to the first deployment system according to the functional type identifier; the project code text is written by programming code, and the project code text can realize the functional service corresponding to the project code text when executed;
[0010] Step S500: performing code analysis on the project code text to determine a target historical code text from a number of historical code texts; the historical code text is a project code text of a functional service corresponding to any middleware deployment system within a historical period;
[0011] Step S600, determining a second target middleware from a plurality of second initial middlewares according to the historical second middleware corresponding to the target historical code text;
[0012] Step S700: deploy the first target middleware and the second target middleware to the second deployment system according to their corresponding configuration files.
[0013] In an exemplary embodiment of the present application, step S200 includes:
[0014] Step S210: Obtain the system identifier corresponding to each middleware deployment system to obtain a system identifier list A=(A 1 ,A 2 ,...,A i ,...,A t ), where i=1,2,...,t, t is the number of middleware deployment systems, A i The system identifier corresponding to the i-th middleware deployment system;
[0015] Step S220: If A i If the identifier is the same as the deployment system identifier, the i-th middleware deployment system is determined as the second deployment system.
[0016] In an exemplary embodiment of the present application, step S300 includes:
[0017] Step S310: obtaining a plurality of preset middleware function identifiers corresponding to the function type identifier in the preset middleware deployment identifier mapping table; the middleware deployment identifier mapping table stores mapping relationships between a plurality of function type identifiers and preset middleware function identifiers of a plurality of middlewares; and the function service corresponding to each function type identifier in the middleware deployment identifier mapping table is the same as the function services of the plurality of preset middleware function identifiers corresponding to the function type identifier;
[0018] Step S320: Obtain the first middleware function identifier corresponding to each first middleware to obtain a first middleware function identifier list B=(B 1 ,B 2 ,...,Bm ,...,B n ), where m=1,2,...,n, and n is the number of first middlewares; B m is the first middleware function identifier corresponding to the mth first middleware;
[0019] Step S330: traverse the first middleware function identifier list B. If B m is any preset middleware function identifier, the mth first middleware is determined as the first target middleware;
[0020] Step S340: Obtain the second middleware function identifier corresponding to each second middleware to obtain a second middleware function identifier list C=(C 1 ,C 2 ,...,C p ,...,C q ); where p=1,2,...,q; q is the number of the second middleware; C p is the second middleware function identifier corresponding to the p-th second middleware;
[0021] Step S350: traverse the second middleware function identifier list C. If C p is any preset middleware function identifier, the pth second middleware is determined as the second initial middleware.
[0022] In an exemplary embodiment of the present application, step S400 includes:
[0023] Step S410: Obtain the project code text corresponding to each functional service of the first deployment system to obtain a project code text list D=(D 1 ,D 2 ,...,D u ,...,D v ), where u=1,2,...,v; v is the number of functional services that can be performed by the first deployment system; D u The project code text corresponding to the u-th functional service of the first deployment system;
[0024] Step S420, traverse the project code text list D, if D u If the corresponding functional service is the same as the functional service corresponding to the functional type identifier, D u Identify as object code text.
[0025] In an exemplary embodiment of the present application, step S500 includes:
[0026] Step S510, performing code analysis on the target code text to obtain a target code function feature vector E and a target annotation information vector F corresponding to the target code text;
[0027] Where E=(E 1 ,E 2 ,...,E a ,...,E b );a=1,2,...,b;b is the number of target code functional features corresponding to the target code text; E a is the ath target code function feature corresponding to the target code text;
[0028] F=(F 1 ,F 2 ,...,F c ,...,F d ), c = 1, 2, ..., d, d is the number of target annotation information corresponding to the target code text, F c The cth target annotation information corresponding to the target code text;
[0029] Step S520: Determine a target historical code text from a number of historical code texts according to the target code functional characteristics and target annotation information.
[0030] In an exemplary embodiment of the present application, step S520 includes:
[0031] Step S521, performing code analysis on each historical code text to obtain a historical code function feature vector set G and a historical annotation information vector set H;
[0032] Where G=(G 1 ,G 2 ,...,G r ,...,G s );r=1,2,...,s;s is the number of historical code texts; G r is the historical code function feature vector corresponding to the rth historical code text;
[0033] G r =(G r1 ,G r2 ,...,G re ,...,G rf(r) ); e = 1, 2, ..., f (r); f (r) is the number of historical code function features corresponding to the r-th historical code text; G re is the e-th historical code functional feature corresponding to the r-th historical code text;
[0034] Where H=(H 1 ,H 2 ,...,H r ,...,H s );Hr is the historical annotation information vector corresponding to the rth historical code text;
[0035] H r =(H r1 ,H r2 ,...,H rj ,...,H rk(r) ), j = 1, 2, ..., k(r), k(r) is the number of historical annotation information corresponding to the r-th historical code text, H rj is the jth historical annotation information corresponding to the rth historical code text;
[0036] Step S522: E and G r Matching is performed to obtain the matching degree EG between the target code function feature vector and the historical code function feature vector corresponding to the rth historical code text r ;
[0037] Step S523: F and H r Matching is performed to obtain the matching degree FH between the target annotation information vector and the historical annotation information vector corresponding to the rth historical code text r ;
[0038] Step S524: If EG r Greater than the preset matching threshold, and FH r If the matching degree is greater than a preset threshold, the rth historical code text is determined as the target historical code text.
[0039] In an exemplary embodiment of the present application, step S600 includes:
[0040] Step S610: Obtain the historical second middleware that is deployed in any middleware deployment system within the historical period and that has a functional service corresponding to the target historical code text;
[0041] Step S620: Determine the second initial middleware that is the same as any historical second middleware as the second target middleware.
[0042] In an exemplary embodiment of the present application, step S610 includes:
[0043] Step S611, determining the functional service corresponding to the target historical code text as the target functional service;
[0044] Step S612: Determine the second middleware deployed on any middleware deployment system when the middleware deployment system executes the target function service during the historical period as the historical second middleware.
[0045] According to one aspect of the present application, a non-transitory computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the aforementioned middleware deployment and installation method.
[0046] According to one aspect of the present application, an electronic device is provided, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0047] The present invention has at least the following beneficial effects:
[0048] The middleware deployment and installation method of the present invention determines, from among a plurality of middleware deployment systems, a second deployment system with which the first deployment system intends to perform data interaction, according to a deployment system identifier included in a middleware deployment instruction sent by a first deployment system, and then, according to a function type identifier included in the middleware deployment instruction, determines a first target middleware from among a plurality of first middlewares, and determines a plurality of second initial middlewares from among a plurality of second middlewares, and obtains a project code text of a function service corresponding to the function type identifier in the first deployment system, performs code analysis on the project code text, determines a target historical code text from among a plurality of historical code texts according to the code analysis result, and determines a second target middleware from among a plurality of second initial middlewares according to a historical second middleware corresponding to the target historical code text. Finally, the first target middleware and the second target middleware are deployed to the second deployment system according to their corresponding configuration files. By packaging the middleware and configuration files required for system deployment into dependency packages, when the middleware deployment system needs to install the middleware, the corresponding middleware can be quickly found from the dependency package and configured and installed, so as to achieve the purpose of quickly installing the middleware in the middleware deployment system. There is no need for developers to code each middleware, which saves human resources. In addition, by analyzing and processing the project code text of the functional service to be executed, several second middleware in the dependency package are screened to determine the second target middleware that implements the functional service. There is no need for developers to manually select several second middleware, which further improves the installation efficiency of the middleware. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0050] Figure 1 A flowchart of a middleware deployment and installation method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0052] The business of the B-end of Air Travel (business products for enterprise users and merchants) is usually divided into two types, namely, business that can be deployed externally (business logic and data do not depend on the project scenario of Air Travel, such as Air Travel's taxi business, etc.) and business that can be deployed internally (business logic and data are highly dependent on the project scenario of Air Travel, such as the business that third-party software needs to obtain Air Travel's ticket information to complete, etc.). When the middleware is deployed internally, the middleware access to the internal deployment usually needs to access the service registration, configuration center, database management middleware, and cache management middleware within Air Travel to connect to the data source within Air Travel to obtain the air travel information of the Air Travel data source. Since the business framework of the data source within Air Travel is incompatible with the business source that requires air travel data, developers need to code the middleware after the business source is accessed to make it compatible with the original framework and Air Travel middleware. However, in actual operation, there are often scenarios where middleware is converted between internal and external, such as when a customer deploys a project externally, because it needs to access air travel data, it must be switched to internal deployment. Therefore, this method of coding the middleware (conducting middleware access, adaptive code transformation, testing and other processes to switch internal and external deployment) will consume a lot of development time and human resources of developers. Therefore, in order to save repeated human resource consumption in the process of internal and external deployment switching, a unified, standardized, modularized and configured access or removal of internally deployed middleware is proposed in this invention. A middleware deployment and installation method.
[0053] A middleware deployment and installation method described in the present application is applied to a middleware deployment and installation system, wherein the middleware deployment and installation system is connected to a plurality of middleware deployment systems, wherein a function deployment dependency package is stored in the middleware deployment and installation system, wherein the function deployment dependency package includes a plurality of first middlewares, a plurality of second middlewares, and a configuration file corresponding to each first middleware and a configuration file corresponding to each second middleware.
[0054] The middleware deployment and installation system is used to filter middleware according to functional services, and to configure and install the filtered middleware.
[0055] The middleware deployment system is a system that requires the installation and deployment of middleware (such as Air Travel’s internal system (a system that can only be accessed by Air Travel’s internal developers) or an external system (a system that can be accessed by users)). The first middleware is the middleware that is required for system deployment (i.e., the middleware that is required in the process of functional service deployment, such as database middleware, cache middleware, configuration center, etc.), and the second middleware is the middleware that is not required in the system deployment (i.e., the middleware that is not required in the process of functional service deployment, such as message middleware, etc.).
[0056] The function deployment dependency package stores several first middlewares and several second middlewares, as well as the configuration files corresponding to each middleware (i.e., the configuration files required for the middleware to be installed). Each middleware corresponds to one or more functional services. By installing the middleware, the middleware deployment system connected to the middleware can execute the corresponding functional services. The middlewares corresponding to several functional services are packaged into a function deployment dependency package. By establishing a standard project (i.e., the function deployment dependency package), the air travel service dependency is configured, the air travel service middleware is compatible with the code, and the conflict of the framework's own dependencies is eliminated. There is no need for developers to perform code transformation on the middleware to be installed one by one. When the middleware needs to be installed and deployed, it is only necessary to find the middleware corresponding to the executed functional service from the function deployment dependency package and install and deploy it, so as to achieve the purpose of rapid access and migration of the middleware to the air travel service.
[0057] Among them, Figure 1 As shown, the middleware deployment and installation method includes the following steps:
[0058] Step S100: in response to receiving a middleware deployment instruction sent by a first deployment system, obtaining a deployment system identifier and a function type identifier included in the middleware deployment instruction;
[0059] The deployment system identifier represents the identifier of the middleware deployment system with which the first deployment system is to interact with data, and the function type identifier represents the type identifier of the function service (such as connecting to the air travel database) to be executed by the first deployment system.
[0060] Step S200: determining a second deployment system from a plurality of middleware deployment systems according to a deployment system identifier;
[0061] The second deployment system is a middleware deployment system with which the first deployment system wants to perform data interaction, that is, a middleware deployment system that needs to perform middleware installation and deployment.
[0062] Further, step S200 includes steps S210 to S220:
[0063] Step S210: Obtain the system identifier corresponding to each middleware deployment system to obtain a system identifier list A=(A 1,A 2 ,...,A i ,...,A t ), where i=1,2,...,t, t is the number of middleware deployment systems, A i The system identifier corresponding to the i-th middleware deployment system;
[0064] Step S220: If A i If the identifier is the same as the deployment system identifier, the i-th middleware deployment system is determined as the second deployment system.
[0065] Step S300: determining a first target middleware from a plurality of first middlewares and determining a plurality of second initial middlewares from a plurality of second middlewares according to the function type identifier;
[0066] The first target middleware is the first middleware that implements the functional service corresponding to the middleware deployment instruction of the first deployment system, and the second initial middleware is the second middleware that implements the functional service corresponding to the middleware deployment instruction of the first deployment system.
[0067] Further, step S300 includes steps S310 to S350:
[0068] Step S310: Obtain several preset middleware function identifiers corresponding to the function type identifiers in the preset middleware deployment identifier mapping table;
[0069] The middleware deployment identifier mapping table stores mapping relationships between several function type identifiers and preset middleware function identifiers of several middlewares, and the function service corresponding to each function type identifier in the middleware deployment identifier mapping table is the same as the function services of several preset middleware function identifiers corresponding to the function type identifier.
[0070] Step S320: Obtain the first middleware function identifier corresponding to each first middleware to obtain a first middleware function identifier list B=(B 1 ,B 2 ,...,B m ,...,B n ), where m=1,2,...,n, and n is the number of first middlewares; B m is the first middleware function identifier corresponding to the mth first middleware;
[0071] Step S330: traverse the first middleware function identifier list B. If B m is any preset middleware function identifier, the mth first middleware is determined as the first target middleware;
[0072] Step S340: Obtain the second middleware function identifier corresponding to each second middleware to obtain a second middleware function identifier list C=(C 1 ,C 2 ,...,C p ,...,C q ); where p=1,2,...,q; q is the number of the second middleware; C p is the second middleware function identifier corresponding to the p-th second middleware;
[0073] Step S350: traverse the second middleware function identifier list C. If C p is any preset middleware function identifier, the pth second middleware is determined as the second initial middleware.
[0074] Step S400: Obtain the project code text of the functional service corresponding to the first deployment system according to the functional type identifier;
[0075] The project code text is written by programming code, and the project code text can realize the functional service corresponding to the project code text when it is executed.
[0076] Further, step S400 includes step S410-step S420:
[0077] Step S410: Obtain the project code text corresponding to each functional service of the first deployment system to obtain a project code text list D=(D 1 ,D 2 ,...,D u ,...,D v ), where u=1,2,...,v; v is the number of functional services that can be performed by the first deployment system; D u The project code text corresponding to the u-th functional service of the first deployment system;
[0078] Step S420, traverse the project code text list D, if D u If the corresponding functional service is the same as the functional service corresponding to the functional type identifier, D u Identify as object code text.
[0079] Step S500: performing code analysis on the project code text to determine a target historical code text from a plurality of historical code texts;
[0080] The historical code text is the project code text of the functional service corresponding to any middleware deployment system within the historical period.
[0081] Further, step S500 includes step S510-step S520:
[0082] Step S510, performing code analysis on the target code text to obtain a target code function feature vector E and a target annotation information vector F corresponding to the target code text;
[0083] Where E=(E 1 ,E 2 ,...,E a ,...,E b );a=1,2,...,b;b is the number of target code functional features corresponding to the target code text; E a is the ath target code function feature corresponding to the target code text;
[0084] F=(F 1 ,F 2 ,...,F c ,...,F d ), c = 1, 2, ..., d, d is the number of target annotation information corresponding to the target code text, F c The cth target annotation information corresponding to the target code text;
[0085] The functional characteristics of the target code are the characteristics of the functions that can be achieved by the target code text.
[0086] The target comment information is the comment information corresponding to each section or each line of code in the target code text.
[0087] Step S520, determining a target historical code text from a plurality of historical code texts according to the target code functional characteristics and target annotation information;
[0088] Wherein, step S520 includes steps S521 to S524:
[0089] Step S521, performing code analysis on each historical code text to obtain a historical code function feature vector set G and a historical annotation information vector set H;
[0090] Where G=(G 1 ,G 2 ,...,G r ,...,G s );r=1,2,...,s;s is the number of historical code texts; G r is the historical code function feature vector corresponding to the rth historical code text;
[0091] G r =(G r1 ,G r2 ,...,G re ,...,G rf(r)); e = 1, 2, ..., f (r); f (r) is the number of historical code function features corresponding to the r-th historical code text; G re is the e-th historical code functional feature corresponding to the r-th historical code text;
[0092] Where H=(H 1 ,H 2 ,...,H r ,...,H s );H r is the historical annotation information vector corresponding to the rth historical code text;
[0093] H r =(H r1 ,H r2 ,...,H rj ,...,H rk(r) ), j = 1, 2, ..., k(r), k(r) is the number of historical annotation information corresponding to the r-th historical code text, H rj is the jth historical annotation information corresponding to the rth historical code text;
[0094] Step S522: E and G r Matching is performed to obtain the matching degree EG between the target code function feature vector and the historical code function feature vector corresponding to the rth historical code text r ;
[0095] Step S523: F and H r Matching is performed to obtain the matching degree FH between the target annotation information vector and the historical annotation information vector corresponding to the rth historical code text r ;
[0096] Step S524: If EG r Greater than the preset matching threshold, and FH r If the matching degree is greater than a preset threshold, the rth historical code text is determined as the target historical code text.
[0097] Step S600, determining a second target middleware from a plurality of second initial middlewares according to the historical second middleware corresponding to the target historical code text;
[0098] Further, step S600 includes step S610-step S620:
[0099] Step S610: Obtain the historical second middleware that is deployed in any middleware deployment system within the historical period and that has a functional service corresponding to the target historical code text;
[0100] Wherein, step S610 includes steps S611-S612:
[0101] Step S611, determining the functional service corresponding to the target historical code text as the target functional service;
[0102] Step S612: Determine the second middleware deployed on any middleware deployment system when the middleware deployment system executes the target function service during the historical period as the historical second middleware.
[0103] Step S620: Determine the second initial middleware that is the same as any historical second middleware as the second target middleware.
[0104] Step S700: deploy the first target middleware and the second target middleware to the second deployment system according to their corresponding configuration files.
[0105] The middleware deployment and installation method of the present invention determines, from a plurality of middleware deployment systems, a second deployment system with which the first deployment system intends to perform data interaction, according to a deployment system identifier included in a middleware deployment instruction sent by a first deployment system, and then, according to a function type identifier included in the middleware deployment instruction, determines a first target middleware from a plurality of first middlewares, and determines a plurality of second initial middlewares from a plurality of second middlewares, and obtains a project code text of a function service corresponding to the function type identifier in the first deployment system, performs code analysis on the project code text, determines a target historical code text from a plurality of historical code texts according to the code analysis result, determines a second target middleware from a plurality of second initial middlewares according to the historical second middleware corresponding to the target historical code text, and finally determines the first target middleware from the plurality of first middlewares. The middleware and the second target middleware are deployed to the second deployment system according to their corresponding configuration files. By packaging the middleware and configuration files required for system deployment into dependency packages, when the middleware deployment system needs to install the middleware, the corresponding middleware can be quickly found from the dependency package and configured and installed, so as to achieve the purpose of quickly installing the middleware in the middleware deployment system. There is no need for developers to code each middleware, which saves human resources. In addition, by analyzing and processing the project code text of the functional service to be executed (function extraction, making corresponding functional service portraits), several second middleware in the dependency package are screened to determine the second target middleware that implements the functional service. There is no need for developers to manually select several second middleware, which further improves the installation efficiency of the middleware.
[0106] An embodiment of the present invention further provides a computer program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present invention described above in this specification.
[0107] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0108] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0109] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0110] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".
[0111] The electronic device according to this embodiment of the present invention is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0112] The electronic device is presented in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: the at least one processor mentioned above, the at least one storage device mentioned above, and a bus connecting different system components (including storage devices and processors).
[0113] The storage stores program codes, which can be executed by the processor, so that the processor executes the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification.
[0114] The memory may include readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory, and may further include read only memory (ROM).
[0115] The storage may also include a program / utility having a set (at least one) of program modules, such program modules including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0116] The bus may represent one or more of several types of bus structures including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.
[0117] The electronic device may also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface. Furthermore, the electronic device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter.
[0118] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0119] The program product may be 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 any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0120] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0121] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0122] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0123] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0124] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0125] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A middleware deployment and installation method, characterized in that: Applied to a middleware deployment and installation system, wherein the middleware deployment and installation system is connected to a plurality of middleware deployment systems, wherein a function deployment dependency package is stored in the middleware deployment and installation system, wherein the function deployment dependency package includes a plurality of first middlewares, a plurality of second middlewares, and a configuration file corresponding to each of the first middlewares and a configuration file corresponding to each of the second middlewares; the first middlewares are middlewares that are essential for system deployment, and the second middlewares are middlewares that are not essential for system deployment; The middleware deployment and installation method comprises the following steps: Step S100: in response to receiving a middleware deployment instruction sent by a first deployment system, acquiring a deployment system identifier and a function type identifier included in the middleware deployment instruction; Step S200: determining a second deployment system from the plurality of middleware deployment systems according to the deployment system identifier; the second deployment system is a middleware deployment system with which the first deployment system wants to perform data exchange; Step S300: According to the function type identifier, determine a first target middleware from a plurality of first middlewares, and determine a plurality of second initial middlewares from a plurality of second middlewares; the first target middleware is a first middleware that implements a function service corresponding to the middleware deployment instruction of the first deployment system; the second initial middleware is a second middleware that implements a function service corresponding to the middleware deployment instruction of the first deployment system; Step S400: acquiring a project code text of a functional service corresponding to the first deployment system according to the functional type identifier; the project code text is written in programming code, and the project code text can realize the functional service corresponding to the project code text when executed; Step S500: performing code analysis on the project code text to determine a target historical code text from a plurality of historical code texts; the historical code text is a project code text of a functional service corresponding to any of the middleware deployment systems within a historical period; Step S600: determining a second target middleware from a plurality of second initial middlewares according to the historical second middleware corresponding to the target historical code text; Step S700: deploy the first target middleware and the second target middleware to the second deployment system according to their corresponding configuration files.
2. The method according to claim 1, characterized in that The step S200 includes: Step S210: Obtain the system identifier corresponding to each of the middleware deployment systems to obtain a system identifier list A=(A1, A2, ..., A i ,...,A t ); where i=1,2,...,t; t is the number of the middleware deployment systems; A i The system identifier corresponding to the i-th middleware deployment system; Step S220: If A i If the identifier is the same as the deployment system identifier, the ith middleware deployment system is determined as the second deployment system.
3. The method according to claim 2, characterized in that The step S300 includes: Step S310: obtaining a plurality of preset middleware function identifiers corresponding to the function type identifier in a preset middleware deployment identifier mapping table; the middleware deployment identifier mapping table stores mapping relationships between a plurality of function type identifiers and preset middleware function identifiers of a plurality of middlewares; and the function service corresponding to each of the function type identifiers in the middleware deployment identifier mapping table is the same as the function services of the plurality of preset middleware function identifiers corresponding to the function type identifier; Step S320: Obtain the first middleware function identifier corresponding to each of the first middlewares to obtain a first middleware function identifier list B=(B1, B2, ..., B m ,...,B n ), wherein m=1,2,...,n, and n is the number of the first middleware; B m is the first middleware function identifier corresponding to the mth first middleware; Step S330: traverse the first middleware function identifier list B. If B m is any of the preset middleware function identifiers, determining the mth first middleware as the first target middleware; Step S340: Obtain the second middleware function identifier corresponding to each second middleware to obtain a second middleware function identifier list C=(C1, C2, ..., C p ,...,C q ); wherein p=1,2,...,q; q is the number of the second middleware; C p is the second middleware function identifier corresponding to the pth second middleware; Step S350: traverse the second middleware function identifier list C. If C p is any of the preset middleware function identifiers, the pth second middleware is determined as the second initial middleware.
4. The method according to claim 3, characterized in that The step S400 includes: Step S410: Obtain the project code text corresponding to each functional service of the first deployment system to obtain a project code text list D=(D1, D2, ..., D u ,...,D v ), wherein u=1,2,...,v; v is the number of functional services that can be performed by the first deployment system; D u The project code text corresponding to the u-th functional service of the first deployment system; Step S420, traverse the project code text list D, if D u If the corresponding functional service is the same as the functional service corresponding to the functional type identifier, D u Identify as object code text.
5. The method according to claim 4, characterized in that The step S500 includes: Step S510: performing code analysis on the target code text to obtain a target code function feature vector E and a target annotation information vector F corresponding to the target code text; Where E=(E1,E2,...,E a ,...,E b );a=1,2,...,b;b is the number of target code functional features corresponding to the target code text; E a is the ath target code function feature corresponding to the target code text; F=(F1,F2,...,F c ,...,F d );c=1,2,...,d;d is the number of target annotation information corresponding to the target code text; F c The cth target annotation information corresponding to the target code text; Step S520: Determine a target historical code text from a plurality of historical code texts according to the target code functional characteristics and target annotation information.
6. The method according to claim 5, characterized in that The step S520 includes: Step S521, performing code analysis on each of the historical code texts to obtain a historical code function feature vector set G and a historical annotation information vector set H; Where G=(G1,G2,...,G r ,...,G s );r=1,2,...,s;s is the number of the historical code texts; G r is the historical code function feature vector corresponding to the rth historical code text; G r =(G r1 ,G r2 ,...,G re ,...,G rf(r) ); e=1,2,...,f(r); f(r) is the number of historical code function features corresponding to the r-th historical code text; G re The e-th historical code function feature corresponding to the r-th historical code text; Where H=(H1,H2,...,H r ,...,H s );H r is the historical annotation information vector corresponding to the rth historical code text; H r =(H r1 ,H r2 ,...,H rj ,...,H rk(r) ); j = 1, 2, ..., k (r); k (r) is the number of historical annotation information corresponding to the r-th historical code text; H rj The j-th historical annotation information corresponding to the r-th historical code text; Step S522: E and G r Matching is performed to obtain the matching degree EG between the target code function feature vector and the historical code function feature vector corresponding to the rth historical code text r ; Step S523: F and H r Matching is performed to obtain the matching degree FH between the target annotation information vector and the historical annotation information vector corresponding to the rth historical code text r ; Step S524: If EG r Greater than the preset matching threshold, and FH r If the matching degree is greater than a preset threshold, the rth historical code text is determined as the target historical code text.
7. The method according to claim 6, characterized in that The step S600 includes: Step S610, obtaining the historical second middleware deployed in any of the middleware deployment systems within the historical period for the functional service corresponding to the target historical code text; Step S620: Determine the second initial middleware that is the same as any of the historical second middleware as the second target middleware.
8. The method according to claim 7, characterized in that The step S610 includes: Step S611, determining the functional service corresponding to the target historical code text as the target functional service; Step S612: Determine the second middleware deployed on any middleware deployment system when the middleware deployment system executes the target function service within the historical period as the historical second middleware.
9. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the method as claimed in any one of claims 1 to 8.
10. An electronic device, characterized in that: The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 9.
Citation Information
Patent Citations
Middleware management method, electronic device and storage medium
CN110855746A
Function calling method and device, electronic equipment and storage medium
CN110874214A