Middleware processing method and device, electronic equipment and storage medium
The middleware processing method efficiently configures multiple middleware into a chain based on user instructions, addressing inflexibility and cost issues in existing systems by enhancing processing efficiency.
Patent Information
- Application Number
- CN202310706311.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2024-12-17
AI Technical Summary
Existing middleware systems are inflexible and require multiple instances to handle complex tasks, leading to increased development and maintenance costs and reduced processing efficiency due to the inability to implement chain processing.
A middleware processing method that configures multiple middleware into a chain based on user instructions, allowing for efficient task execution by determining target middleware and their arrangement order, thereby generating a target configuration scheme.
Reduces development and operation costs while improving processing efficiency by enabling flexible middleware configuration and chain task processing.
Smart Images

Figure CN119149260A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a middleware processing method, device, electronic device and storage medium. Background Art
[0002] Middleware refers to a type of software that sits between the operating system and applications, managing the interaction and data flow between applications. Middleware is often used to solve integration problems between different systems and languages. It allows data from various applications, services, databases, and systems to be connected and interact to meet the functional and performance requirements of enterprise applications.
[0003] In the related art, after the middleware is created and used on the application system, the middleware cannot be flexibly adjusted according to user needs. When the system needs to process complex tasks, it is necessary to start multiple middlewares, or pre-implement the complex logic in one middleware. This not only increases the development and operation and maintenance costs of the middleware, but also makes it impossible to implement chain processing of tasks, thereby reducing the processing efficiency of tasks. Summary of the invention
[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0005] The embodiments of the present application provide a middleware processing method, device, electronic device and storage medium, which reduce the development cost and operation and maintenance cost of the middleware under complex tasks through targeted development. During the execution of the subsequent target configuration plan, since multiple middleware are configured into a chain according to instructions in the plan, complex chain tasks can be processed efficiently, thereby improving the processing efficiency of the task.
[0006] On the one hand, an embodiment of the present application provides a middleware processing method, including:
[0007] Receive a middleware configuration request sent by the management end, and obtain configuration metadata according to the middleware configuration request;
[0008] Sending the configuration metadata to the management end, so that the management end displays candidate configuration schemes according to the configuration metadata, wherein the candidate configuration schemes include a candidate middleware chain, and the candidate middleware chain includes a plurality of candidate middlewares;
[0009] receiving an adjustment instruction for the candidate configuration scheme sent by the management end, determining a plurality of target middlewares from the plurality of candidate middlewares according to the adjustment instruction, and determining an arrangement order of the plurality of target middlewares according to the adjustment instruction;
[0010] Arrange the plurality of target middlewares according to the arrangement order to obtain a target middleware chain;
[0011] A target configuration scheme is generated according to the target middleware chain, and the target configuration scheme is sent to the management end so that the management end displays the target configuration scheme.
[0012] On the other hand, the embodiment of the present application further provides a middleware processing device, including:
[0013] A request receiving module, used to receive a middleware configuration request sent by a management terminal, and obtain configuration metadata according to the middleware configuration request;
[0014] A metadata sending module, used to send the configuration metadata to the management end, so that the management end displays candidate configuration schemes according to the configuration metadata, wherein the candidate configuration schemes include a candidate middleware chain, and the candidate middleware chain includes multiple candidate middlewares;
[0015] An instruction receiving module, configured to receive an adjustment instruction for the candidate configuration scheme sent by the management terminal, determine a plurality of target middlewares from the plurality of candidate middlewares according to the adjustment instruction, and determine an arrangement order of the plurality of target middlewares according to the adjustment instruction;
[0016] An orchestration module, used for orchestrating the plurality of target middlewares according to the orchestration sequence to obtain a target middleware chain;
[0017] A solution generation module is used to generate a target configuration solution according to the target middleware chain, and send the target configuration solution to the management end so that the management end can display the target configuration solution.
[0018] Furthermore, the above arrangement module is specifically used for:
[0019] Arrange the plurality of target middlewares according to the arrangement order to obtain an initial middleware chain;
[0020] In the initial middleware chain, determining a data structure transmitted by any one of the target middlewares to the downstream adjacent target middlewares, and determining a data processing method of any one of the target middlewares;
[0021] The data structure and the data processing method are updated to the initial middleware chain to obtain a target middleware chain.
[0022] Furthermore, the above arrangement module is also used for:
[0023] From any two adjacent target middlewares, based on the target middleware located downstream, determine the key indication information and array index indication information in the target middleware located upstream;
[0024] According to at least one of the key indication information and the array index indication information, a value is taken from the target middleware located upstream to obtain a target indication element, and the target indication element is used as a data structure for transmission to the downstream adjacent target middleware.
[0025] Furthermore, the middleware processing device is also provided with a state configuration module, and the state configuration module is specifically used for:
[0026] According to the target field generated when the target middleware is called, configuring a state judgment condition for the target middleware, and adding the state judgment condition to the target configuration scheme;
[0027] Wherein, after the target configuration scheme is executed, the state judgment condition is used to trigger the state of the target middleware to be adjusted to a to-be-destroyed state when being satisfied.
[0028] Furthermore, the middleware processing device is further provided with a middleware creation module, and the middleware creation module is specifically used for:
[0029] Receiving a middleware creation request sent by the management end, wherein the middleware creation request carries middleware parameters of the middleware to be created;
[0030] According to the middleware creation request, at least one middleware that meets the middleware parameters is selected from the middleware set currently used to support deployment as the target middleware.
[0031] Furthermore, the above middleware creation module is also used to:
[0032] Obtaining the middleware type, deployment target information, specification information, and operation and maintenance information corresponding to the target middleware;
[0033] Determine the namespace supported by the current environment according to the names of the plurality of candidate middlewares, and name the target middleware according to the namespace;
[0034] The target middleware is updated according to at least one of the middleware type, the deployment target information, the specification information, and the operation and maintenance information.
[0035] Furthermore, the above arrangement module is also used for:
[0036] If any of the pre-stored candidate middleware chains meets the arrangement order, the candidate middleware chain that meets the arrangement order is used as the target middleware chain;
[0037] Alternatively, if none of the pre-stored candidate middleware chains satisfies the orchestration order, a middleware chain to be adjusted is determined from a plurality of the candidate middleware chains based on the difference from the orchestration order, and the order of the middleware chains to be adjusted is adjusted to the orchestration order to obtain the target middleware chain.
[0038] Furthermore, the middleware processing device is further provided with a solution sending module, and the solution sending module is specifically used for:
[0039] Acquire an Internet Protocol address of a user end and location coordinates of a plurality of candidate edge nodes, determine a geographical area where the user end is located according to the Internet Protocol address, take the candidate edge node with the shortest distance between the location coordinates and the center of the geographical area as a target edge node, and send the target configuration scheme to the user end through the target edge node;
[0040] Alternatively, the satellite positioning address of the user end and the position coordinates of multiple candidate edge nodes are obtained, the candidate edge node with the shortest distance between the position coordinates and the satellite positioning address is used as the target edge node, and the target configuration scheme is sent to the user end through the target edge node;
[0041] Alternatively, multiple candidate edge nodes are respectively communicated with the user end through a network, the network delay in the network communication process is calculated, the candidate edge node with the lowest network delay is used as the target edge node, and the target configuration scheme is sent to the user end through the target edge node;
[0042] Alternatively, an anycast network is established, and autonomous systems are respectively established on multiple candidate edge nodes, and the same target protocol address is allocated to each of the candidate edge nodes through the anycast network. When the user end is connected to the anycast network through the target protocol address, the autonomous system determines, among the multiple candidate edge nodes, a target edge node in the anycast network that is closest to the user end or has the lowest latency, and sends the target configuration plan to the user end through the target edge node.
[0043] On the other hand, the embodiment of the present application also provides a middleware configuration method, including:
[0044] Sending a middleware configuration request to a server, so that the server obtains configuration metadata according to the middleware configuration request;
[0045] Receiving the configuration metadata sent by the server, and displaying candidate configuration schemes according to the configuration metadata, wherein the candidate configuration schemes include a candidate middleware chain, and the candidate middleware chain includes multiple candidate middlewares;
[0046] In response to a selection operation of determining a plurality of target middlewares from a plurality of candidate middlewares and an arrangement operation of adjusting an arrangement order of the plurality of target middlewares, an adjustment instruction for the candidate configuration scheme is generated, and the adjustment instruction is sent to the server, so that the server determines a plurality of target middlewares from the plurality of candidate middlewares according to the adjustment instruction, determines an arrangement order of the plurality of target middlewares according to the adjustment instruction, arranges the plurality of target middlewares according to the arrangement order to obtain a target middleware chain, and generates a target configuration scheme according to the target middleware chain;
[0047] The target configuration scheme sent by the server is received, and the target configuration scheme is displayed.
[0048] On the other hand, the embodiment of the present application further provides a middleware processing device, including:
[0049] A request sending module, used for sending a middleware configuration request to a server, so that the server obtains configuration metadata according to the middleware configuration request;
[0050] A metadata receiving module, configured to receive the configuration metadata sent by the server, and display candidate configuration schemes according to the configuration metadata, wherein the candidate configuration schemes include a candidate middleware chain, and the candidate middleware chain includes a plurality of candidate middlewares;
[0051] an instruction sending module, configured to generate an adjustment instruction for the candidate configuration scheme in response to a selection operation of determining a plurality of target middlewares from a plurality of the candidate middlewares and an arrangement operation of adjusting an arrangement order of the plurality of the target middlewares, and to send the adjustment instruction to the server, so that the server determines a plurality of target middlewares from the plurality of the candidate middlewares according to the adjustment instruction, determines an arrangement order of the plurality of the target middlewares according to the adjustment instruction, arranges the plurality of the target middlewares according to the arrangement order to obtain a target middleware chain, and generates a target configuration scheme according to the target middleware chain;
[0052] The solution receiving module is used to receive the target configuration solution sent by the server and display the target configuration solution.
[0053] On the other hand, an embodiment of the present application further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned middleware processing method when executing the computer program.
[0054] On the other hand, an embodiment of the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is executed by a processor to implement the above-mentioned middleware processing method.
[0055] On the other hand, the embodiment of the present application further provides a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the above-mentioned middleware processing method.
[0056] The embodiments of the present application include at least the following beneficial effects: after receiving the configuration source data sent by the server, the management end can display the candidate configuration schemes, and the user can view the candidate middleware chain and the candidate middleware in the chain from the scheme, so that the user can input adjustment instructions for the candidate configuration schemes on the management end according to the middleware configuration requirements during the execution of complex tasks. After receiving the instructions, the server determines multiple target middleware according to the instructions, and arranges the multiple target middleware according to the instructions, and finally forms a target middleware chain that meets the task requirements. Finally, the server generates a target configuration scheme according to the target middleware chain, and sends the target configuration scheme to the management end for display, so that the management end can view the final configuration scheme. Through targeted development, the development cost and operation and maintenance cost of the middleware under complex tasks are reduced. During the execution of the subsequent target configuration scheme, since the scheme configures multiple middleware into a chain according to the instructions, complex chain tasks can be efficiently processed, thereby improving the task processing efficiency.
[0057] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent from the description, or may be understood by practicing the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0059] Figure 1 An optional schematic diagram of the calling situation of the existing middleware provided in the embodiment of the present application;
[0060] Figure 2An optional schematic diagram of an optional implementation environment provided for an embodiment of the present application;
[0061] Figure 3 An optional flowchart of the middleware processing method provided in the embodiment of the present application;
[0062] Figure 4 An optional schematic diagram of communication between a management terminal and a service terminal via an API layer provided in an embodiment of the present application;
[0063] Figure 5 An optional schematic diagram of the calling situation of the middleware provided in the embodiment of the present application;
[0064] Figure 6 An optional schematic diagram of a process of creating middleware in an embodiment provided in the present application;
[0065] Figure 7 An optional schematic diagram of the display effect of the management terminal display module provided in the embodiment of the present application;
[0066] Figure 8 Another optional schematic diagram of the display effect of the management terminal display module provided in the embodiment of the present application;
[0067] Fig. 9 An optional schematic diagram of a management-side display module provided in an embodiment of the present application displaying a plurality of optional middleware stored in a server;
[0068] Fig.10 An optional schematic diagram of the arrangement process on the management terminal display module provided in the embodiment of the present application;
[0069] Fig.11 An optional schematic diagram of viewing relevant information of middleware on a management terminal display module provided in an embodiment of the present application;
[0070] Fig.12 An optional schematic diagram of a new chain on a management terminal display module provided in an embodiment of the present application;
[0071] Fig.13 An optional schematic diagram of a complete execution process provided by an embodiment of the present application;
[0072] Fig.14 An optional schematic diagram of an application scenario of a user end provided in an embodiment of the present application;
[0073] Fig.15 An optional schematic diagram of an application process of a user end provided in an embodiment of the present application;
[0074] Fig.16Another optional flowchart of the middleware processing method provided in the embodiment of the present application;
[0075] Fig.17 An optional structural diagram of a middleware processing device provided in an embodiment of the present application;
[0076] Fig.18 Another optional structural diagram of the middleware processing device provided in the embodiment of the present application;
[0077] Fig.19 A partial structural block diagram of a terminal provided in an embodiment of the present application;
[0078] Fig. 20 A partial structural block diagram of the server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0079] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0080] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to the characteristics of the target object such as target object attribute information or attribute information set, the permission or consent of the target object will be obtained first, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. Among them, the target object can be a user. In addition, when the embodiment of the present application needs to obtain the target object attribute information, the target object's separate permission or separate consent will be obtained by means of a pop-up window or jumping to a confirmation page, etc., and after the separate permission or separate consent of the target object is clearly obtained, the necessary target object-related data for enabling the normal operation of the embodiment of the present application will be obtained.
[0081] To facilitate understanding of the technical solutions provided in the embodiments of the present application, some key terms used in the embodiments of the present application are explained here:
[0082] Middleware refers to a type of software located between the operating system and the application. It can provide additional services and functions, making the application easier to develop, deploy and manage. It can also allow the application to work at a higher level, thereby reducing code duplication by improving reusability and scalability. Common middleware includes message queue middleware, cache middleware, database middleware, Web server middleware, and distributed computing and processing middleware.
[0083] Currently, in the related art, after the middleware is created and used on the application system, the middleware cannot be flexibly adjusted according to the user's needs. Figure 1 As shown, a schematic diagram showing the calling situation of middleware in the prior art is shown. Figure 1 The times 1, 2, 3, and 4 in the figure are different nodes in the task execution process. Specifically, at the beginning of the task execution, middleware 1 begins to be called and executed. At time 1 and time 2, middleware 1 is called to execute the corresponding task. After time 2 arrives, the task of middleware 1 is completed, but middleware 1 will be retained. Then, starting from time 2, the execution of the task requires the use of middleware 2, so middleware 2 needs to be started at this time. Similarly, after time 3 arrives, the task of middleware 2 is completed, but middleware 2 will be retained. Finally, according to the task requirements, middleware 3 is started in the same way, and finally after time 4 arrives, the task execution is completed.
[0084] Depend on Figure 1 As can be seen from the example in, it takes a little time to start middleware 2 and middleware 3, so the start time of middleware 2 and middleware 3 is after time 2 and time 3. In one embodiment, middleware 2 and 3 may also be started at the beginning, which is not specifically limited here.
[0085] Based on the above, it can be seen that when the system needs to process complex tasks, it needs to start multiple middlewares. This method requires starting the middleware at a specific time, or implementing the above complex logic in a middleware in advance, such as integrating middleware 1, middleware 2 and middleware 3 in one middleware. Both methods will increase the development and operation and maintenance costs of the middleware. Not only that, it also leads to the inability to implement chain processing of tasks. For example, the process of starting the middleware takes time and the task operation will be interrupted. If the task requires data flow in multiple containers, it will further affect the task progress, thereby reducing the task processing efficiency.
[0086] Reference Figure 2 , Figure 2 A schematic diagram of an optional implementation environment provided for an embodiment of the present application, the implementation environment includes a terminal 201 and a server 202, wherein the terminal 201 and the server 202 are connected via a communication network.
[0087] Server 202 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In addition, server 202 can also be a node server in a blockchain network.
[0088] The terminal 201 may be a virtual reality device, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, etc., but is not limited thereto. The terminal 201 and the server 202 may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0089] Exemplarily, server 202 can receive a middleware configuration request sent by terminal 201, and obtain configuration metadata according to the middleware configuration request; send the configuration metadata to terminal 201 so that terminal 201 can display candidate configuration schemes according to the configuration metadata, wherein the candidate configuration schemes include a candidate middleware chain, and the candidate middleware chain includes multiple candidate middleware; receive adjustment instructions for the candidate configuration schemes sent by terminal 201, determine multiple target middleware from the multiple candidate middleware according to the adjustment instructions, and determine the arrangement order of the multiple target middleware according to the adjustment instructions; arrange the multiple target middleware according to the arrangement order to obtain the target middleware chain; generate a target configuration scheme according to the target middleware chain, and send the target configuration scheme to terminal 201 so that terminal 201 can display the target configuration scheme.
[0090] Exemplarily, terminal 201 may send a middleware configuration request to server 202, so that server 202 obtains configuration metadata according to the middleware configuration request; receives the configuration metadata sent by server 202, and displays candidate configuration schemes according to the configuration metadata, wherein the candidate configuration schemes include a candidate middleware chain, and the candidate middleware chain includes multiple candidate middleware; in response to a selection operation of determining multiple target middleware from multiple candidate middlewares, and an orchestration operation of adjusting the orchestration order of multiple target middlewares, generates an adjustment instruction for the candidate configuration scheme, and sends the adjustment instruction to server 202, so that server 202 determines multiple target middleware from multiple candidate middlewares according to the adjustment instruction, determines the orchestration order of multiple target middlewares according to the adjustment instruction, orchestrates the multiple target middlewares according to the orchestration order, obtains a target middleware chain, and generates a target configuration scheme according to the target middleware chain; receives the target configuration scheme sent by server 202, and displays the target configuration scheme.
[0091] Among them, terminal 201 can be used as a management terminal and can log in to a management account. Server 202 is used as a service terminal. The management personnel can arrange the target configuration plan of the middleware on terminal 201. The final target configuration plan will be sent to the cloud through server 202, and then sent to the service user application through the edge node by the cloud. The cloud can be a private cloud scenario; or, server 202 can directly send the target configuration plan to the service user application, and so on.
[0092] Exemplarily, the service user end may also be called the service end, or the application end. The service end may be any device that performs corresponding tasks by calling middleware. The user end may be a terminal, such as a virtual reality device, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a car terminal, etc., but is not limited thereto. The user end may also be a server, such as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content De l ivery Network), and big data and artificial intelligence platforms. The user end and the server 202 may be directly or indirectly connected by wired or wireless communication, and the embodiments of the present application are not limited thereto.
[0093] Exemplarily, the middleware processing method in the embodiment of the present application is applicable to a variety of scenarios, such as real-time data processing, log analysis, payment processing, image processing, etc. The following are three specific application scenarios:
[0094] Scenario 1: Real-time data processing scenario.
[0095] In real-time data processing scenarios, the target configuration scheme generated by the middleware processing method can help users analyze and process large amounts of data in real time. For example, by orchestrating middleware, data collected by IoT devices can be cleaned, converted, aggregated, and stored in real time. Users can choose appropriate target middleware according to their needs, such as data preprocessing, data conversion, data storage, etc., to meet different data processing needs.
[0096] The specific implementation environment of the real-time data processing scenario includes applications in smart factories, where orchestration solutions can be used to process sensor data in the factory in real time, thereby achieving real-time detection, anomaly detection, and optimization of the production line.
[0097] Scenario 2: Payment processing scenario.
[0098] In the payment processing scenario, the target configuration scheme generated by the middleware processing method can help users process payment requests and ensure the security and accuracy of payments. For example, the orchestration middleware can be used to implement functions such as payment request verification, risk detection, payment channel selection, and transaction completion.
[0099] The specific implementation environment of the payment processing scenario includes application in e-commerce platforms, where orchestration solutions can be used to process user payment requests, thereby optimizing and securing the payment process.
[0100] Scenario 3: Image processing and QR code generation scenario.
[0101] In the image processing and QR code generation scenarios, the target configuration scheme generated by the middleware processing method can help users realize functions such as automatic beautification of images and generation of one-time QR codes. By arranging different middleware, users can choose appropriate image processing tools and QR code generation libraries according to their needs to meet different image processing and QR code generation requirements.
[0102] The specific implementation environment of the image processing and QR code generation scenario includes application in social media applications, where the orchestration solution can be used to automatically beautify the images uploaded by users, such as adjusting brightness, contrast, filter effects, etc. In addition, a one-time QR code can be generated for each user for sharing or inviting friends to join, improving the dissemination and security of the application.
[0103] The method provided in the embodiments of the present application can be applied to different technical fields, including but not limited to cloud technology, artificial intelligence, computer technology, payment, image processing and other technical fields.
[0104] Reference Figure 3 , Figure 3 A schematic diagram of an optional flow chart of a middleware processing method provided in an embodiment of the present application. The middleware processing method can be executed by a server, and the server can be the above Figure 2 The server 202 in the middleware processing method includes but is not limited to the following steps 301 to 305.
[0105] Step 301: Receive a middleware configuration request sent by a management end, and obtain configuration metadata according to the middleware configuration request.
[0106] In a possible implementation, the middleware configuration request is sent from the management end to the server end. After the user inputs the request operation on the management end, the middleware configuration request can be generated in the management end, and the generated middleware configuration request will be sent to the server end. The middleware configuration request is used to request to view the current candidate middleware related data, so that the user can make corresponding input operations on the middleware arrangement after viewing the data.
[0107] In a possible implementation, configuration metadata is data stored in the server. Configuration metadata is a type of metadata, which refers to data used to describe middleware-related data or information. It can describe the structure, content, attributes, relationships and other information of the data, and provide a detailed description and explanation for the data. In the embodiment of the present application, by storing the data related to the middleware as configuration metadata, it is beneficial to the management and maintenance of the data, and supports operations such as query, analysis and exchange of the data.
[0108] Step 302: Send the configuration metadata to the management end;
[0109] After receiving the configuration metadata, the management end displays candidate configuration schemes according to the configuration metadata, wherein the candidate configuration schemes include a candidate middleware chain, and the candidate middleware chain includes multiple candidate middlewares.
[0110] Before introducing the sending of configuration metadata, the following first introduces the communication method between the server and the management end in the embodiment of the present application:
[0111] In a possible implementation, the server stores a large amount of data related to the orchestration middleware. In order to facilitate data interaction and communication, such as Figure 4 As shown, the server and the management end are connected through the Application Programming Interface (API) layer.
[0112] The main reason for connecting the server and the management side through the API layer is to achieve data interaction and communication. API is a standardized programming interface used for interaction between different software systems. It usually consists of a set of functions, protocols, or a set of rules that enable different software systems to connect to each other and exchange data. In the process of establishing an API layer connection between the server and the management side, the management side can request data from the server through the API layer, and the server can respond to these requests through the API layer and return the corresponding data, thereby achieving data transmission and communication. The API layer can also provide other functions, such as identity authentication, permission control, error handling, etc., to ensure the security, reliability and integrity of the data, which are not specifically limited here.
[0113] It should be noted that a corresponding API interface can also be set to realize data transmission, and the embodiments of the present application do not make specific restrictions. In the embodiments of the present application, an API layer is set between the mode server and the management end for communication as an example. For the convenience of description, the API layer will be omitted in the subsequent description, but it does not represent a limitation on the embodiments of the present application.
[0114] Therefore, it can be seen from the above embodiments that the configuration metadata in the embodiments of the present application is stored in the server. When the management end initiates a middleware configuration request, it is forwarded to the server through the API layer. After the server receives the middleware configuration request, it sends the configuration metadata to the management end through the API layer.
[0115] In a possible implementation, the management end is provided with a visual interactive interface, that is, a display module is provided, and the relevant information can be displayed through a clear and concise display module, so that users can easily create, edit and manage solutions. After receiving the configuration metadata, the management end will parse the configuration metadata, extract candidate configuration schemes from it, and obtain a candidate middleware chain and multiple candidate middleware in the candidate middleware chain from the candidate configuration scheme.
[0116] In a possible implementation, the candidate configuration solution is a middleware orchestration solution pre-stored in the server, which is a solution established historically. Because the configuration solution has not been confirmed by the user, it is not yet certain whether it meets the processing requirements of a certain task, so it is a candidate solution. It can be understood that the candidate configuration solution is stored in the server in the form of configuration metadata, and the corresponding solution can be obtained by parsing the data.
[0117] In one possible implementation, the candidate middleware chain is a middleware chain established in a candidate configuration scheme, in which multiple candidate middlewares are sorted in a pre-arranged order. For example, if there are three middlewares in a candidate middleware chain, namely middleware 1, middleware 2 and middleware 3, then if the configuration scheme formed by the chain is executed by the service user, middleware 1, middleware 2 and middleware 3 will be called in sequence to complete the chain task processing.
[0118] Step 303: receiving an adjustment instruction for a candidate configuration solution sent by the management end, determining multiple target middleware from multiple candidate middleware according to the adjustment instruction, and determining an arrangement order of the multiple target middleware according to the adjustment instruction.
[0119] In a possible implementation, the adjustment instruction is an adjustment instruction made by the user to the candidate configuration scheme, and the adjustment instruction can be for the middleware of the candidate middleware itself, or for the sorting method among the candidate middleware. The scheduling instruction is generated by the management end. The reason why the scheduling instruction is generated is that after viewing the display of the management end display module, the user will adjust the candidate configuration scheme in combination with the requirements of a task that needs to be processed. Therefore, after entering the adjustment operation, the corresponding adjustment instruction will be generated and sent to the server.
[0120] In a possible implementation, the target middleware is the middleware selected from multiple candidate middlewares after responding to the adjustment instruction. These middlewares meet the processing requirements of a certain task currently configured, and are therefore called target middlewares. The target middlewares belong to the candidate middlewares, and their number is less than or equal to the number of candidate middlewares, that is, part of the candidate middlewares can be selected as target middlewares.
[0121] In a possible implementation, the orchestration order is the order information parsed from the scheduling instruction after responding to the scheduling instruction. The orchestration order indicates the position of each target middleware in the chain so that multiple target middleware can be subsequently orchestrated according to the orchestration order.
[0122] Step 304: Arrange multiple target middlewares according to the arrangement order to obtain a target middleware chain.
[0123] In a possible implementation, the orchestration is performed according to the instruction of the orchestration sequence. After the target middleware is determined, in order to meet the chain processing requirements of the task, the target middleware needs to be orchestrated so that after the target middleware is arranged in order, the target middleware can be called in sequence according to the instruction of the orchestration sequence during the subsequent execution of the plan.
[0124] In one possible implementation, the target middleware chain is a chain of target middleware formed after orchestration. Similarly, in the target middleware chain, multiple target middleware are sorted in a pre-arranged order. For example, if there are three middlewares in a target middleware chain, namely middleware 1, middleware 2 and middleware 3, then if the configuration scheme formed by the chain is executed by the service user, middleware 1, middleware 2 and middleware 3 will be called in sequence to complete chain task processing, allowing users to use middleware to perform data flow in multiple containers and realize flexible processing flow.
[0125] Step 305: Generate a target configuration plan according to the target middleware chain, and send the target configuration plan to the management end;
[0126] After receiving the target configuration plan, the management end displays the target configuration plan.
[0127] In a possible implementation, the target configuration scheme is a solution generated based on the target middleware chain. It is understandable that the target configuration scheme is a configuration file that includes relevant information of the target middleware chain. By parsing the target configuration scheme, the target middleware chain set therein can be obtained.
[0128] In a possible implementation, the target configuration scheme is forwarded by the server and sent to the management end. The management end can obtain the configured target middleware chain and the target middleware in the chain by parsing the target configuration scheme, and then the management end displays this information in the display module. Exemplarily, after viewing the displayed target configuration scheme, if the target configuration scheme meets the processing requirements of the task, the user can perform a confirmation operation on the display module. The management end generates a confirmation instruction based on the confirmation operation and sends the confirmation instruction to the server end. The server end receives the confirmation instruction and stores the target configuration scheme so that the target configuration scheme can be sent to the required service user end for execution later.
[0129] Reference Figure 5 As shown, it shows a schematic diagram of the calling of the middleware on the service user after executing the target configuration scheme. Among them, the target middleware chain contains three target middlewares, namely middleware 1, middleware 2 and middleware 3. Figure 5 The times 1, 2, 3, and 4 in the figure are different nodes in the task execution process. Specifically, at the beginning of the task execution, middleware 1 begins to be called and executed. At time 1 and time 2, middleware 1 is called to execute the corresponding task. After time 2 arrives, the task of middleware 1 is completed and it will not run again. Then, starting from time 2, the execution of the task requires the use of middleware 2. At this time, middleware 2 is directly called according to the configuration of the chain. Similarly, after time 3 arrives, the task of middleware 2 is completed and it will not run again. Finally, according to the task requirements, middleware 3 is called in the same way, and finally after time 4 arrives, the task execution is completed.
[0130] from Figure 5 It can be seen from the process that after the call of the middleware is completed under the instruction of the target configuration scheme, the chain processing of the task is realized, and the middleware does not need to be started when the task is needed, which improves the processing efficiency, which enables information and data processing to be carried out smoothly on the basis of high performance and high stability. In addition, if the target configuration scheme is different, the target middleware chain formed is also different, but these are all pre-arranged. Therefore, by using the chain processing method, the embodiment of the present application allows users to use the arranged middleware to flow data in multiple containers, realize flexible processing flow, and users can adjust according to actual needs to meet the data processing needs of different scenarios.
[0131] In summary, in the embodiment of the present application, after receiving the configuration source data sent by the server, the management end can display the candidate configuration schemes. The user can view the candidate middleware chain and the candidate middleware in the chain from the scheme, so that the user can input adjustment instructions for the candidate configuration schemes on the management end according to the middleware configuration requirements during the execution of complex tasks. After receiving the instruction, the server determines multiple target middleware according to the instruction, and arranges the multiple target middleware according to the instruction, and finally forms a target middleware chain that meets the task requirements. Finally, the server generates a target configuration scheme according to the target middleware chain, and sends the target configuration scheme to the management end for display, so that the management end can view the final configuration scheme. Through targeted development, the development cost and operation and maintenance cost of the middleware under complex tasks are reduced. During the execution of the subsequent target configuration scheme, since the scheme configures multiple middleware into a chain according to the instructions, it can efficiently handle complex chain tasks, thereby improving the task processing efficiency.
[0132] In a possible implementation, during the orchestration of the target middleware, the information transmitted between the target middleware also needs to be orchestrated, so as to ensure that the service user can successfully call the target middleware according to the target configuration solution.
[0133] Therefore, the points that need to be paid attention to in the arrangement process are shown in the following embodiment:
[0134] In a possible implementation, it is necessary to determine the data structure transmitted by adjacent target middlewares during the orchestration process and the data processing method of the target middlewares. Specifically, multiple target middlewares may be orchestrated according to the orchestration order to obtain an initial middleware chain; within the initial middleware chain, the data structure transmitted by any target middleware to the downstream adjacent target middleware is determined, and the data processing method of any target middleware is determined; the data structure and data processing method are updated to the initial middleware chain to obtain the target middleware chain.
[0135] In a possible implementation, the initial middleware chain is the middleware chain that is formed after adjusting the target middleware to the corresponding positions according to the instruction of the arrangement order. However, the initial middleware chain cannot be directly used as the final target middleware chain, and on this basis, it is necessary to restrict the messages transmitted between the middleware.
[0136] In a possible implementation, the adjacent target middleware needs to limit the data to be transmitted. This data is the target middleware exposed data structure (exposed Structure), referred to as the data structure, which is used to determine what kind of data of the current middleware is passed backward in what form. The data structure is passed from any target middleware to the downstream adjacent target middleware. That is to say, for any target middleware, after generating the corresponding data structure, it will use the data structure as the input data of the downstream adjacent target middleware, and then input it into the downstream adjacent target middleware, so that the downstream adjacent target middleware can work normally. Therefore, in the embodiment of the present application, by determining the data structure between adjacent target middleware, it can ensure that the target middleware chain can be executed smoothly, and ensure that the next target middleware under the chain instruction can work normally.
[0137] In a possible implementation, the previous target middleware needs to define a data processing method (handler), which is how the next middleware processes data. There are many data processing methods, for example, Simple Network Management Protocol (SNMP), Serial Peripheral Interface (SPI), Command Line Interface (CLI), etc., which are not specifically limited in the embodiments of the present application. Therefore, in the embodiments of the present application, by determining the data processing method of the next target middleware, it is possible to ensure how the next middleware processes data.
[0138] In a possible implementation, the data structure and data processing method are stored in the metadata of any middleware, which can be the initial middleware or the target middleware. That is, when the initial middleware is determined as the target middleware, if the data structure and data processing method it contains meet the requirements, it can be left unchanged. If not, it is necessary to modify the data structure and data processing method, and the modification process can be completed in response to the user's operation.
[0139] In a possible implementation, the configuration metadata includes the metadata of the solution and the metadata of the middleware. Two interfaces can be defined in the API layer to obtain these two types of metadata, including the solution interface and the middleware interface. The solution interface includes the identifier (id), name (name), description (descri ipt ion) and middleware (components) attributes of the corresponding solution, while the component interface includes the identifier (id), name (name), description (descri ipt ion), workload type (work loadType), specification (specification), previous middleware (previous Component), next middleware (nextComponent), exposed Structure and handler attributes of the corresponding middleware.
[0140] In the metadata of the above-mentioned middleware, the previous middleware and the next middleware are determined according to the chain position of the current middleware. Therefore, in the embodiment of the present application, it is necessary not only to determine the exposed Structure and handler attributes, but also to determine the identifier, name, description, workload type, and specification attribute information of the middleware, and finally update the initial middleware chain based on this information, including updating each target middleware, and finally obtaining the target middleware chain.
[0141] In a possible implementation, the data structure is determined after the key and array index indicate the corresponding element. Specifically, the key indication information and array index indication information in the upstream target middleware are determined from any two adjacent target middlewares based on the downstream target middleware; according to at least one of the key indication information and the array index indication information, a value is taken from the upstream target middleware to obtain the target indication element, and the target indication element is used as the data structure passed to the downstream adjacent target middleware.
[0142] In a possible implementation, both the key and the array index are identifiers used to access elements in a data structure, and their role is to uniquely identify a certain element in the data structure.
[0143] Among them, a key is a universal identifier that can be used to access various types of collection data structures, such as hash tables, dictionaries, etc. A key is a unique identifier, usually composed of a string, a number, or other types of objects. When using a key to access an element in a data structure, the embodiment of the present application needs to use a key to uniquely determine the element to be accessed.
[0144] Array index is usually used to specify the position of an element in an array. An array is a linear data structure that can store multiple elements in a continuous memory space in a certain order and use a numeric index to uniquely determine the position of the element. For example, the array index starts from zero, indicating the position of the first element, and increases in sequence. Usually, when accessing an array element, you need to specify the corresponding index value to determine the element to be accessed.
[0145] In one possible implementation, an embodiment of the present application determines the key indication information and array index indication information in the upstream target middleware from any two adjacent target middlewares based on the downstream target middleware, where the key indication information is information obtained through the key indication, and the array index indication information is information obtained through the array index indication.
[0146] In a possible implementation, the formalized mathematical expression of the key indication information and the array index indication information can be expressed as:
[0147] f(O,K1,K2,…,Kn,A1,A2,…,Am)=O.K1.K2…Kn[A1][A2]…[Am]
[0148] Among them, f represents a value function, which represents the value result according to at least one of the key indication information and the array index indication information. The element obtained by the value function after the value is taken is the target indication element, that is, the element indicated by the key and array index. In addition, n represents the number of keys, and m represents the number of array indexes. The keys and array indexes in the embodiments of the present application may appear alternately, depending on the object, that is, the structure of the data involved in the current target middleware.
[0149] In a possible implementation, the array index can use an integer value, and the key can be an object of any type. Therefore, in the embodiment of the present application, the array index indicates the element at a specific position in the target middleware, and the key indicates the unique identification of different elements in the target middleware, and various forms of target indication elements can be formed. In other words, the data structure finally formed can be a complex element in various forms, so that the data input requirements of different middlewares can be met, so that after selecting any middleware that meets the requirements and adding it to the chain in the embodiment of the present application, it can ensure that the data is transmitted between the middleware chains, so that information and data processing can be carried out smoothly on the basis of high performance and high stability.
[0150] In a possible implementation, after parsing the configuration metadata, not only the candidate middleware on the candidate middleware chain can be obtained, but also other middleware pre-stored in the server. Users can select these other middleware as target middleware according to the orchestration needs. In addition, if the pre-stored other middleware still does not meet the orchestration requirements, new middleware can be created. The details are as follows:
[0151] In a possible implementation, before the target middleware is orchestrated, the middleware may be created. Specifically, a middleware creation request sent by the management end may be received, wherein the middleware creation request carries the middleware parameters of the middleware to be created; and according to the middleware creation request, at least one middleware that meets the middleware parameters is selected as the target middleware from the set of middleware currently used to support deployment.
[0152] In one possible implementation, after viewing the display of the management-side display module, if the displayed candidate middleware does not meet the orchestration requirements, the user can perform an input operation on the display module of the management side. In response to the data operation, the management side generates a middleware creation request. In the process of performing the input operation, the user can also enter the required middleware-related middleware parameters, including the middleware identifier, workload type and other basic information. The middleware parameters can be selected and generated by the user after viewing the selection box or list displayed by the management side, and no specific restrictions are made here.
[0153] In a possible implementation, the server pre-establishes a set of middleware that can be deployed. The middleware set contains multiple middlewares that have not yet been deployed on the server, that is, they have not yet been formed in the configuration metadata; supporting deployment means that these middlewares can be created and used. Therefore, in the process of creating middleware in the embodiment of the present application, selection is made from the deployable middlewares.
[0154] In one possible implementation, after a middleware creation request is generated, the management end sends the middleware creation request to the server end. After receiving the middleware creation request, the server end selects at least one middleware that meets the middleware parameters from the current set of middleware used to support deployment and uses it as the target middleware, thereby finally completing the creation of the middleware.
[0155] In a possible implementation, the metadata of the middleware contains multiple attributes, which can serve as a reference in the orchestration process and help users better orchestrate the chain. Therefore, when creating the middleware, these data need to be added to the created middleware. The details are as follows:
[0156] In a possible implementation, after selecting a middleware that meets the middleware parameters as the target middleware, it is also necessary to update the relevant information in the target middleware. Specifically, the middleware type, deployment target information, specification information, and operation and maintenance information corresponding to the target middleware can be obtained; the namespace supported by the current environment can be determined based on the names of multiple candidate middlewares, and the target middleware can be named according to the namespace; and the target middleware can be updated based on at least one of the middleware type, deployment target information, specification information, and operation and maintenance information.
[0157] In a possible implementation, the middleware type can indicate the type of component the middleware belongs to. Common middleware types include message queue, cache system, database connection pool, web server, application server, RPC framework (Remote Procedure Call), message bus, etc. Exemplarily, in the embodiment of the present application, an input box or a selection box of multiple middleware types can be displayed on the display module of the management end. After the user completes the input or selection operation in the box, the corresponding middleware type can be determined.
[0158] In one possible implementation, the deployment target information may indicate the environment information in which the middleware can be deployed, that is, the information of the user end. The relevant situation of the user end has been described in the above embodiments and will not be repeated here. In addition, if the user end is applied on a cluster, the deployment target may be the cluster information. Exemplarily, in an embodiment of the present application, an input box or a selection box for multiple deployment targets may be displayed on the display module of the management end. After the user completes the input or selection operation in the box, the corresponding deployment target information can be determined.
[0159] In one possible implementation, the specification information is the specification of the target middleware, and the specification information is in the form of Record<string,string> , in order to flexibly represent the specific configuration of different middleware, middleware specifications play a vital role in the design and implementation of middleware products, which can ensure the interoperability and compatibility between different middleware products, reduce the difficulty of development and integration of distributed systems, and improve the scalability and maintainability of software systems. Common middleware specification information includes Java Message Service (Java Message Service, JMS) specifications, Java Transaction API (JavaTransaction API, JTA) specifications, Java Database Connectivity (Java Database Connectivity, JDBC) specifications, etc. Exemplarily, in the embodiment of the present application, an input box or a selection box of multiple specifications can be displayed on the display module of the management end, and the user can determine the corresponding specification information after completing the input or selection operation in the box.
[0160] In a possible implementation, the operation and maintenance information includes backup functions and example parameter information related to operation and maintenance. Different middleware will have different operation and maintenance functions, including backup functions, which can select the backup period, which can be accurate to ten seconds, and can also select the backup retention time; it also includes instance parameters, and there will be different data outputs according to the workload types of different middlewares established. For example, redis will require users to fill in host, port, cluster, size, etc., which can be used as example parameters. Exemplarily, in an embodiment of the present application, an input box or a selection box for multiple operation and maintenance information can be displayed on the display module of the management end. After the user completes the input or selection operation in the box, the corresponding operation and maintenance information can be determined.
[0161] In a possible implementation, the namespace is a space in which the created middleware can be named. In the embodiment of the present application, the names of the established candidate middleware can be screened and the namespace can be established accordingly. Exemplarily, in the embodiment of the present application, an input box or multiple naming recommendation selection boxes can be displayed on the display module of the management end, and the user names the target middleware according to the namespace. After completing the input or selection operation in the box, if it coincides with the existing middleware name stored in the namespace, a prompt is issued, otherwise the naming is successful and the corresponding middleware name can be determined.
[0162] In one possible implementation, after the name of the middleware is determined during the creation process and at least one of the middleware type, deployment target information, specification information and operation and maintenance information is obtained, the target middleware can be updated, wherein at least one of the middleware type, deployment target information and operation and maintenance information can be used as the description information of the middleware and stored in the corresponding metadata after being saved to the server.
[0163] Reference Figure 6 As shown, the process of creating middleware in one embodiment is introduced below with reference to the diagram:
[0164] Step 601, GET workloadsList request: The management end initiates a GET workloadsList request to the server end through the API layer (the API layer is omitted here and will not be described in detail later). The GET workloadsList request is a middleware creation request.
[0165] Step 602, returning workloadsList: the server obtains a set of middlewares that can be currently deployed, which should include the middleware category (such as redis) and the unique identifier (uuid) of the middleware, and returns it to the management end;
[0166] Step 603, generate a selection box on the page: generate a selection box on the management end page, the title of the selection box is the middleware category, the content of the selection box is workloadsList return value result display rule is ${workloadTypevalue=uuid$, and finally the middleware type and identifier are obtained;
[0167] Step 604, GET clusters request: the management end initiates a GET clusters request to the server end to obtain a list of middleware deployment target clusters;
[0168] Step 605, returning clusters: the server obtains the target cluster list, including the name of the cluster, the unique identifier of the cluster (clusterId), etc., which the cluster list set should contain, and returns it to the management end;
[0169] Step 606, generating a selection box on the page: generating a selection box on the page, the title of the selection box is cluster, the content is the return value of the clusters request, the display rule is ${clusterName value=clusterId$, and finally the deployment target information is obtained;
[0170] Step 607, GET namespaces request: the management end initiates a GET namespaces request to the server end to obtain all namespaces supported by the current environment;
[0171] Step 608, returning namespaces: after the server obtains all namespaces supported by the current environment, it returns them to the management end;
[0172] Step 609, generating an enhanced selection box on the page: generating an enhanced selection box on the page, including two capabilities, including being able to directly filter existing namespaces, the title of the enhanced selection box is namespace, the content is the return value of the namespaces request, and the display rule is; ${namespace value=namespace$: also includes continuing to enter content when the namespace does not meet the requirements, entering a new namespace, and finally obtaining the named name;
[0173] Step 610, GET specification request: In the selection box of step 603, select workload, use workload type, and workload uuid, and the management end initiates a GET specification request to the server end to obtain the specification list corresponding to the selected middleware;
[0174] Step 611, returning the specification list: after the server obtains the specification list, it returns it to the management end;
[0175] Step 612, generating a selection box on the page: generating a selection box with the title of specification and the display rule of $specification=size[unit]$, including the size and the unit;
[0176] Step 613, POST createSpecification request: The specification obtained in step 612 is created by creating a mapping table on the display module page of the management end. The table stores the supported middleware and the specifications that can be created by this middleware. For example, redis can create CPU, memory, and storage, while cloud storage bucket can only have capacity quota, etc. Through workloadType, the corresponding creatable specification data is obtained and displayed line by line on the page for user input or selection. When the user completes the input or selection, click the Create button, and a POSTcreateSpecification request will be sent;
[0177] Step 614, specification creation is successful: the server finally obtains the specification information according to the creation status of the specification information, and returns information indicating that the specification has been successfully created to the management end;
[0178] Step 615, GET operation and maintenance capability request: Different middlewares have different operation and maintenance functions. Through the workloadType returned in step 602, a request is made to the server to obtain the corresponding operation and maintenance capabilities;
[0179] Step 616, returning the operation and maintenance capability: the server returns the acquired operation and maintenance capability to the management end;
[0180] Step 617, generate an operation and maintenance capability input box on the page: Generate an operation and maintenance capability input box on the page. The capability includes two parts. For example, for the backup function, you can select the backup cycle, accurate to ten seconds, and you can also select the backup retention time; it also includes instance parameters. Different data outputs will be generated according to different workload types. For example, redis requires users to fill in host, port, cluster, size, etc.
[0181] Step 618, POST createWorkload request: After completing the corresponding inputs in the above steps, the management end calls POST createWorkload through the API layer and transmits it to the server end according to at least one of the middleware type, deployment target information, specification information, and operation and maintenance information;
[0182] Step 619, the middleware instance is created successfully: the server generates the corresponding middleware and returns the information that the middleware instance is created successfully to the management end, indicating that the middleware instance is created successfully and can eventually be used as the target middleware.
[0183] In a possible implementation, the management-side display module page filters data by the following method. The data filtering function enables users to quickly find the required solution. Specifically, the configuration metadata sent by the server is set as the input data $D$, which is represented as a tuple $(id, name, description, components)$, where $components$ is an array containing $n$ middlewares, represented as $C={c1, c2, ..., c n}$. For each middleware $c i $, represented as a tuple $(idi , name i ,description i , workloadType i , specification i , previousComponent i , nextComponent i )$. The purpose of the filtering method is to generate a new tuple $(id′, name′, description′, components′)$, where $components′$ is an array containing only the middleware names, represented by $C′={name1, name2, ..., name n}$.
[0184] After filtering by the above means, the management side display module page only displays the relevant information of the candidate middleware chain, including the identifier, name and description information of the candidate middleware, and displays the name of the corresponding candidate middleware in a graphic on the chain, so that users can intuitively see the arrangement of the candidate middleware chain. Figure 7 As shown, the figure shows the specific situation of the candidate configuration scheme, including the identifier, name and description of the candidate middleware chain, and then the candidate middleware chain is displayed in a graphical manner. Under the premise of meeting the requirements of the embodiment of the present application, the middleware chain can also be displayed in a list, such as Figure 8 As shown, in the embodiment of the present application, only Figure 7 The method is described as an example, but it does not limit the embodiments of the present application.
[0185] In a possible implementation, the process of orchestrating middleware can also be performed based on whether the candidate middleware chain meets the requirements, and the candidate middleware chain is adjusted if it does not meet the requirements. Specifically, if any pre-stored candidate middleware chain meets the orchestration order, the candidate middleware chain that meets the orchestration order is used as the target middleware chain; or, if all pre-stored candidate middleware chains do not meet the orchestration order, the middleware chain to be adjusted is determined from multiple candidate middleware chains based on the difference with the orchestration order, and the order in the middleware chain to be adjusted is adjusted to the orchestration order to obtain the target middleware chain.
[0186] In a possible implementation, if any pre-stored candidate middleware chain satisfies the arrangement order, the candidate middleware chain that satisfies the arrangement order can be used as the target middleware chain. Figure 7 There are three candidate middleware chains, among which chain 1 has an ID of 1, including middleware 1, middleware 2, middleware 3 and middleware 4, a total of four candidate middlewares configured in sequence; chain 2 has an ID of 2, including middleware 1, middleware 5, middleware 6 and middleware 7, a total of four candidate middlewares configured in sequence; chain 3 has an ID of 3, including middleware 8, middleware 9 and middleware 10, a total of three candidate middlewares configured in sequence. If the user sees Figure 7 After selecting the three candidate middleware chains, it is determined that chain 1 in the figure meets the orchestration requirements, and the adjustment instruction is an adjustment confirmation instruction. The user directly inputs the operation of selecting chain 1, such as clicking the button on the right side of chain 1. Based on this operation, an adjustment confirmation instruction for chain 1 can be generated, and finally middleware 1, middleware 2, middleware 3 and middleware 4 are used as target middleware, and chain 1 is used as the target middleware chain.
[0187] In a possible implementation, if all pre-stored candidate middleware chains do not satisfy the arrangement order, the user can first select one of the candidate middleware chains and adjust it. For example, after the user selects a candidate middleware chain to be adjusted on the page of the display module, such as clicking Figure 7 Click the button on the right side of Chain 1 in the dialog box, select Chain 1 as the middleware chain to be adjusted, complete the adjustment instruction for selecting the middleware chain, then enter the middleware selection operation to obtain a new adjustment instruction, and adjust the order in the middleware chain to the orchestration order according to the new adjustment instruction to obtain the target middleware chain.
[0188] In a possible implementation, after the user selects the middleware chain to be adjusted, if the candidate middleware in the middleware chain to be adjusted does not meet the orchestration requirements, the user can delete or add middleware, or replace the candidate middleware therein to form the final multiple target middleware.
[0189] The above embodiment is described below with reference to the accompanying drawings:
[0190] like Fig. 9 As shown, after the user selects chain 1 as the middleware chain to be adjusted, multiple optional middleware stored in the server will be displayed below the display module on the management side. If there are n optional middleware, middleware n1, middleware n2, middleware n3 to middleware nn will be displayed. If the current middleware 3 does not meet the orchestration requirements, middleware 3 needs to be replaced after clicking on middleware 3.
[0191] The user can then view information about the optional middleware, such as Fig.10 As shown, after the user clicks on an optional middleware, such as middleware n1, the display module will pop up a corresponding information pop-up window near the middleware n1. The information pop-up window can display the identifier, specifications, description and other information of the middleware n1, which can help the user select the middleware. If the user determines that the middleware n1 meets the requirements, the middleware n1 can be dragged to the position of the original middleware 3 to determine the middleware n1 as one of the target middlewares, and finally form a target middleware chain. It should be noted that if there is no middleware that meets the requirements at this time, the middleware creation step can be entered, which will not be repeated here.
[0192] For example, the user can view the relevant information of the candidate middleware in the middleware chain to be adjusted. Fig.11As shown, the user can click on a candidate middleware in the middleware chain to be adjusted, such as middleware 2, and the display module will pop up a corresponding information pop-up window near middleware 2. The information pop-up window can display the identifier, specifications, description, data section, data processing method, and previous and subsequent middleware of middleware 2, which can help users determine whether this middleware can meet the requirements.
[0193] For example, if the current candidate middleware chain does not meet the requirements, the user can also choose to create a new chain, which makes the solution very scalable and can be easily expanded as user needs change. Fig.12 As shown, similarly, the display module will also display multiple optional middleware. After the user selects an optional middleware, it can be used as the target middleware and added to the newly created chain. In addition, the user can also click the Add button on the right side of the newly created chain to add a new position to the chain to arrange more middleware and finally form a target middleware chain that meets the requirements.
[0194] It should be noted that the target middleware chain formed above will be sent to the server for storage. In addition, if for the same chain, there is no need to modify the candidate middleware, only the arrangement order needs to be adjusted, then the middleware can be shifted on the display module, but the shift must be performed in conjunction with the data structure, that is, the exposed data structure of the previous middleware after the shift must satisfy the input data of the next adjacent middleware. The embodiment of the present application can also be combined with the data input type of the middleware, and a prompt will be issued when the data input type does not match the data structure exposed by the previous middleware.
[0195] Furthermore, in the embodiment of the present application, the next optional middleware can be intelligently recommended in combination with the previous middleware. Specifically, the candidate middleware in the chain contains information about the exposed data structure, and the management end or the service end can recommend the middleware that meets the data input requirements as the optional middleware based on the data structure.
[0196] In addition, in the embodiment of the present application, the task type input by the user can be accepted, and the optional middleware can be recommended according to the task type. For example, the display module of the management end can display an input box or a selection box, and the user can enter or select the target task type, such as image processing, video processing, etc. Subsequently, in the process of recommending middleware, the data structure exposed by the previous candidate middleware may satisfy different types of tasks at the same time, so the next middleware that can be selected can be related to image processing or video processing. If combined with the target task type input or selected by the user, only the optional middleware under the target task type is recommended.
[0197] In summary, a complete execution flow of an embodiment is described below. Fig.13 As shown, the process in one embodiment may be as follows:
[0198] Step 1301, requesting a solution: the management end first requests a solution from the API layer, for example, issuing a middleware configuration request;
[0199] Step 1302, API query configuration metadata: The API layer forwards the request to the server, requesting query configuration metadata;
[0200] Step 1303, return configuration without data: the server returns the configuration metadata to the API layer in response to the middleware configuration request;
[0201] Step 1304, displaying solutions: the API layer forwards the configuration metadata to the management end, and the management end displays solutions after parsing, such as displaying candidate configuration solutions;
[0202] Step 1305: Create a new solution: If the candidate configuration solution does not meet the requirements, the user can create a new solution on the management side, so the relevant request is sent to the API layer;
[0203] Step 1306, collecting solution information: In order to better create a new solution, it is necessary to understand solution-related information, including information about each candidate middleware chain or each middleware, which is also parsed from the configuration metadata;
[0204] Step 1307, API creates a solution: The API layer forwards the request to create a new solution in step 2.5 to the server;
[0205] Step 1308, returning the created solution: after the server creates a new solution according to the request, it returns the created solution to the API layer;
[0206] Step 1309, displaying the created solution: the API layer forwards the created solution to the management end, and the management end displays the created solution after parsing, such as the target configuration solution;
[0207] Step 1310, create new middleware: if there is no middleware that meets the requirements during the creation process, the middleware creation process needs to be carried out;
[0208] Step 1311, collecting middleware information: In order to better create new middleware, it is necessary to understand the information related to the middleware, which has been described in the above embodiment and will not be repeated here;
[0209] Step 1312, API creates middleware: the API layer forwards the request to create the middleware in step 2.10 to the server;
[0210] Step 1313, returning the created middleware: after the server creates new middleware according to the request, it returns the created middleware to the API layer;
[0211] Step 1314, displaying the created middleware: the API layer forwards the created middleware to the management end, and the management end parses and displays the created middleware;
[0212] Step 1315, selecting and arranging middleware: the management end selects based on the candidate middleware or the newly created middleware, determines the target middleware, arranges the order of the target middleware, and sends the adjustment instruction to the API layer;
[0213] Step 1316, API updates solution: After receiving the adjustment instruction, the API layer forwards it to the server to update the solution;
[0214] Step 1317, returning the updated solution: the server arranges the target middleware according to the adjustment instruction to form the final target middleware chain, forms the corresponding target configuration plan, and finally returns the target configuration plan to the API layer;
[0215] Step 1318, display the updated solution: the API layer forwards the updated solution to the management end, and the management end parses and displays the updated solution.
[0216] In a possible implementation, the state of the target middleware can also be determined in the scheme, and whether to destroy the target middleware is determined based on the state, so it is necessary to configure the state judgment condition in the scheme in advance. Specifically, the state judgment condition can be configured for the target middleware based on the target field generated when the target middleware is called, and the state judgment condition is added to the target configuration scheme; wherein, after the target configuration scheme is executed, the state judgment condition is used to trigger the adjustment of the state of the target middleware to the state to be destroyed when it is satisfied.
[0217] In a possible implementation, the status judgment condition is a judgment condition for judging whether the target middleware has been executed. After the target configuration scheme is executed, if the status judgment condition is met, it means that the task of the target middleware has been executed and it is no longer needed in the future. In order to optimize resource utilization, reduce resource occupation, and avoid unnecessary resource waste, the embodiment of the present application triggers the state of the target middleware to be destroyed (the status status is marked as false). After the user recognizes the state of the target middleware to be destroyed, it will destroy the target middleware; if the status judgment condition is not met, it means that the target middleware needs to process tasks in the future. The embodiment of the present application triggers the state of the target middleware to be retained (the status status is marked as true). After the user recognizes the reserved state of the target middleware, it will retain the target middleware.
[0218] In a possible implementation, during the calling process, the target middleware will generate the corresponding target field as the task is processed. In the embodiment of the present application, the state judgment condition can be configured for the target middleware according to the target field, and the state judgment condition is added to the target configuration scheme. After the target configuration scheme is executed, if the corresponding target field is generated, it is judged that the state judgment condition is met; if the corresponding target field is not generated, it is judged that the state judgment condition is not met.
[0219] In a possible implementation, the server can directly send the target configuration scheme to the user. In addition, if it is applied in a distributed scenario, such as a cluster environment such as a private cloud scenario, the target configuration scheme cannot be directly sent to the user. Therefore, in the embodiment of the present application, the target configuration scheme will be sent to the corresponding edge node through the cloud, and then the target configuration scheme will be sent to the user through the edge node.
[0220] like Fig.14 As shown, the server sends the target configuration plan to the cloud. In a cluster environment, the cloud communicates with multiple edge nodes, including edge node 1, edge node 2, edge node 3 to edge node n. Then, by selecting a suitable edge node to send the target configuration plan, it can ensure that users get a high-quality service experience.
[0221] In a possible implementation, improving the service experience is to select a reasonable edge node according to the location of the user end. Each edge node in the cluster can be used as a candidate edge node. This application determines the target edge node from multiple candidate edge nodes according to multiple methods, as follows:
[0222] In a possible implementation, the server can also send the target configuration scheme to the user, and the user can call and execute the middleware according to the target configuration scheme, wherein the server can select the closest edge node according to the Internet Protocol address of the user to send the target configuration scheme. Specifically, the Internet Protocol address of the user and the location coordinates of multiple candidate edge nodes are obtained, the geographical area where the user is located is determined according to the Internet Protocol address, and the candidate edge node with the closest distance between the location coordinates and the center of the geographical area is used as the target edge node, and the target configuration scheme is sent to the user through the target edge node.
[0223] In a possible implementation, an Internet Protocol address (IP) is a unified address format provided by the IP protocol, which assigns a logical address to each network and each host on the Internet, thereby shielding the difference in physical addresses. In the embodiment of the present application, the IP address of the user end can be obtained, the geographic location of the user end can be determined by the IP address, and the location coordinates of multiple candidate edge nodes can be obtained. By analyzing the user's IP address and calculating the distance between the two locations, the user's geographic location can be determined, and finally the candidate edge node with the closest distance between the location coordinates and the center of the geographic area is used as the target edge node, and the target configuration plan is sent to the user end through the target edge node.
[0224] In a possible implementation, the server can also select the nearest edge node according to the satellite positioning address of the user to send the target configuration solution. Specifically, the satellite positioning address of the user and the position coordinates of multiple candidate edge nodes are obtained, and the candidate edge node with the closest distance between the position coordinates and the satellite positioning address is used as the target edge node, and the target configuration solution is sent to the user through the target edge node.
[0225] In one possible implementation, if the user end including mobile devices such as smartphones and tablets can perform satellite positioning, the satellite positioning address of the user end can be obtained. The satellite positioning address includes addresses obtained by different positioning systems, including the Global Positioning System (GPS) or the Beidou Navigation Satellite System (BDS), which can determine the user's precise location. In addition, the location coordinates of multiple candidate edge nodes are obtained, and finally the candidate edge node with the closest distance between the location coordinates and the satellite positioning address is used as the target edge node, and the target configuration plan is sent to the user end through the target edge node.
[0226] In a possible implementation, the server can also select the edge node with the lowest latency to send the target configuration plan based on the network latency between the user and the server. Specifically, multiple candidate edge nodes can be used to communicate with the user respectively, the network latency during the network communication process can be calculated, and the candidate edge node with the lowest network latency can be used as the target edge node, and the target configuration plan can be sent to the user through the target edge node.
[0227] In one possible implementation, each candidate edge node can perform network communication with the user end respectively, complete the network delay test, and calculate the network delay between each candidate edge node and the user end during the network communication process. The network delay can also be called response time. Finally, the candidate edge node with the lowest network delay is selected as the target edge node, and the target configuration plan is sent to the user end through the target edge node.
[0228] In a possible implementation, the target configuration scheme can also be sent by establishing an anycast network and selecting an edge node in the anycast network that is closest to the user end or has the lowest latency. Specifically, the anycast network can be established, and autonomous systems can be established on multiple candidate edge nodes respectively, and the same target protocol address is allocated to each candidate edge node through the anycast network. When the user end is connected to the anycast network through the target protocol address, the autonomous system determines the target edge node in the anycast network that is closest to the user end or has the lowest latency among multiple candidate edge nodes, and sends the target configuration scheme to the user end through the target edge node.
[0229] In one possible implementation, anycast refers to a group of routers or servers with the same IP address that provide the same service or resource together, but only one of the instances is visible and reachable to external users, and that instance is usually the closest to the user and has the most advantages. In simple terms, anycast is a multicast technology based on IP addresses that can distribute traffic to the node in the network that is most suitable for processing requests.
[0230] In a possible implementation, the embodiment of the present application can form an anycast network with multiple candidate edge nodes, and establish autonomous systems on multiple candidate edge nodes, such as establishing a Border Gateway Protocol (BGP) system. The BGP system is a dynamic routing protocol that can be used between different autonomous systems (Autonomous System, AS) and within the same AS. The implementation of this application does not impose specific restrictions on this. In the Anycast network, each edge node needs to configure BGP and announce the shared IP address as a routable prefix to other autonomous systems.
[0231] Therefore, in the embodiment of the present application, the same target protocol address, that is, a selected IP address, is assigned to each candidate edge node through the anycast network. When the user end is connected to the anycast network through the target protocol address, other autonomous systems will know how to route traffic to these edge nodes. When the user end tries to access this IP address, the anycast system will automatically connect to the target edge node that is closest or has the lowest latency, and finally send the target configuration plan to the user end through the target edge node.
[0232] In summary, if Fig.15 As shown, the present application embodiment illustrates the application process with reference to the diagram:
[0233] During the application of the target configuration scheme, the user end needs to first determine the user end's location in the cluster, and find a suitable edge node as the target edge node through IP address geolocation, GPS positioning, network delay testing, and establishing Anycast. After the target edge node sends the target configuration scheme to the user end, it uses the target configuration scheme for data processing / service response.
[0234] Next, the middleware will operate according to the specific arrangement content in the target configuration scheme. For example, if the target configuration scheme contains three middlewares, namely middleware 1, middleware 2, and middleware 3, during operation, middleware 1 processes the input data, and then selects the data to be exposed to the next middleware 2 according to the defined exposed data structure. Middleware 1 passes the processed data to middleware 2 through the specified data processing method. After receiving the data, middleware 2 continues to process and passes the result to the next middleware 3. This process will continue along the target middleware chain until all middlewares in the chain have completed processing. Among them, after each middleware call is completed, it will automatically determine whether it should be retained based on its current state. For example, a database component or a middleware for preprocessing cloud functions will be judged according to the target field (type) when it is called. If its status is marked as true, it will be retained, and if the status is marked as false, it will be destroyed.
[0235] Reference Fig.16 , Fig.16 A schematic diagram of an optional flow chart of a middleware processing method provided in another embodiment of the present application. The middleware processing method can be executed by a management end, and the management end can be the above Figure 2 The terminal 201 in the middleware processing method includes but is not limited to the following steps 1601 to 1604.
[0236] Step 1601, sending a middleware configuration request to the server;
[0237] After receiving the middleware configuration request, the server obtains the configuration metadata according to the middleware configuration request;
[0238] Step 1602, receiving configuration metadata sent by the server, and displaying candidate configuration solutions according to the configuration metadata;
[0239] The candidate configuration scheme includes a candidate middleware chain, and the candidate middleware chain includes multiple candidate middlewares;
[0240] Step 1603, in response to the selection operation of determining multiple target middlewares from multiple candidate middlewares and the arrangement operation of adjusting the arrangement order of the multiple target middlewares, generating an adjustment instruction for the candidate configuration scheme, and sending the adjustment instruction to the server;
[0241] After receiving the adjustment instruction, the server determines multiple target middleware from multiple candidate middleware according to the adjustment instruction, determines the arrangement order of the multiple target middleware according to the adjustment instruction, arranges the multiple target middleware according to the arrangement order, obtains the target middleware chain, and generates the target configuration plan according to the target middleware chain;
[0242] Step 1604, receiving the target configuration plan sent by the server, and displaying the target configuration plan.
[0243] In an embodiment of the present application, the management end can send a middleware configuration request to the server end and receive the configuration metadata sent by the server end. After receiving the configuration source data sent by the server end, the candidate configuration scheme can be displayed, and the user can view the candidate middleware chain and the candidate middleware in the chain from the scheme, so that the user can input the adjustment instruction of the candidate configuration scheme on the management end according to the middleware configuration requirements in the process of executing complex tasks. After receiving the instruction, the server end determines multiple target middleware according to the instruction, and arranges the multiple target middleware according to the instruction, and finally forms a target middleware chain that meets the task requirements. Finally, the server end generates a target configuration scheme according to the target middleware chain, and sends the target configuration scheme to the management end for display, so that the management end can view the final configuration scheme. Through targeted development, the development cost and operation and maintenance cost of the middleware under complex tasks are reduced. In the subsequent target configuration scheme, since the scheme configures multiple middleware into a chain according to the instruction, it can efficiently handle complex chain tasks, thereby improving the processing efficiency of the task.
[0244] The middleware processing method in the embodiment of the present application is similar to the content of the middleware processing method applied on the server side, except that it is executed on different execution entities. Therefore, other contents of the middleware processing method applied on the management side can refer to the description in the above embodiment and will not be repeated here.
[0245] Reference Fig.17 , Fig.17 An optional structural diagram of a middleware processing device provided in an embodiment of the present application, the middleware processing device 1700 includes:
[0246] The request receiving module 1701 is used to receive the middleware configuration request sent by the management end, and obtain the configuration metadata according to the middleware configuration request;
[0247] The metadata sending module 1702 is used to send the configuration metadata to the management end, so that the management end can display the candidate configuration schemes according to the configuration metadata, wherein the candidate configuration schemes include a candidate middleware chain, and the candidate middleware chain includes multiple candidate middlewares;
[0248] The instruction receiving module 1703 is used to receive an adjustment instruction for a candidate configuration scheme sent by the management end, determine multiple target middleware from multiple candidate middleware according to the adjustment instruction, and determine the arrangement order of the multiple target middleware according to the adjustment instruction;
[0249] The orchestration module 1704 is used to orchestrate multiple target middlewares according to the orchestration sequence to obtain a target middleware chain;
[0250] The solution generation module 1705 is used to generate a target configuration solution according to the target middleware chain, and send the target configuration solution to the management end so that the management end can display the target configuration solution.
[0251] Furthermore, the above arrangement module 1704 is specifically used for:
[0252] Arrange multiple target middlewares according to the arrangement order to obtain an initial middleware chain;
[0253] In the initial middleware chain, determine the data structure that any target middleware transmits to the downstream adjacent target middleware, and determine the data processing method of any target middleware;
[0254] Update the data structure and data processing method to the initial middleware chain to obtain the target middleware chain.
[0255] Furthermore, the arrangement module 1704 is also used for:
[0256] From any two adjacent target middlewares, based on the target middleware located downstream, determine the key indication information and array index indication information in the target middleware located upstream;
[0257] According to at least one of the key indication information and the array index indication information, a value is taken from the upstream target middleware to obtain a target indication element, and the target indication element is used as a data structure transmitted to the downstream adjacent target middleware.
[0258] Furthermore, the middleware processing device 1700 is also provided with a state configuration module, and the state configuration module is specifically used for:
[0259] According to the target field generated when the target middleware is called, configure the status judgment condition for the target middleware, and add the status judgment condition to the target configuration scheme;
[0260] Among them, after the target configuration scheme is executed, the state judgment condition is used to trigger the state of the target middleware to be adjusted to a to-be-destroyed state when it is met.
[0261] Furthermore, the middleware processing device 1700 is also provided with a middleware creation module, and the middleware creation module is specifically used for:
[0262] Receive a middleware creation request sent by the management end, wherein the middleware creation request carries middleware parameters of the middleware to be created;
[0263] According to the middleware creation request, at least one middleware that meets the middleware parameters is selected as the target middleware from the middleware set currently used to support the deployment.
[0264] Furthermore, the above middleware creation module is also used to:
[0265] Obtain the middleware type, deployment target information, specification information, and operation and maintenance information corresponding to the target middleware;
[0266] Determine the namespace supported by the current environment based on the names of multiple candidate middlewares, and name the target middleware according to the namespace;
[0267] The target middleware is updated according to at least one of the middleware type, deployment target information, specification information, and operation and maintenance information.
[0268] Furthermore, the arrangement module 1704 is also used for:
[0269] If any of the pre-stored candidate middleware chains meets the arrangement order, the candidate middleware chain that meets the arrangement order is used as the target middleware chain;
[0270] Alternatively, if none of the pre-stored candidate middleware chains satisfy the orchestration order, the middleware chain to be adjusted is determined from multiple candidate middleware chains according to the difference from the orchestration order, and the order in the middleware chain to be adjusted is adjusted to the orchestration order to obtain the target middleware chain.
[0271] Furthermore, the middleware processing device 1700 is further provided with a solution sending module, and the solution sending module is specifically used for:
[0272] Obtaining the Internet Protocol address of the user end and the location coordinates of multiple candidate edge nodes, determining the geographical area where the user end is located according to the Internet Protocol address, taking the candidate edge node with the closest distance between the location coordinates and the center of the geographical area as the target edge node, and sending the target configuration plan to the user end through the target edge node;
[0273] Alternatively, the satellite positioning address of the user end and the position coordinates of multiple candidate edge nodes are obtained, the candidate edge node with the closest distance between the position coordinate and the satellite positioning address is used as the target edge node, and the target configuration solution is sent to the user end through the target edge node;
[0274] Alternatively, multiple candidate edge nodes are respectively communicated with the user end through the network, the network delay in the network communication process is calculated, the candidate edge node with the lowest network delay is used as the target edge node, and the target configuration solution is sent to the user end through the target edge node;
[0275] Alternatively, an anycast network is established, and autonomous systems are respectively established on multiple candidate edge nodes, and the same target protocol address is allocated to each candidate edge node through the anycast network. When the user end is connected to the anycast network through the target protocol address, the autonomous system determines the target edge node in the anycast network that is closest to the user end or has the lowest latency among the multiple candidate edge nodes, and sends the target configuration plan to the user end through the target edge node.
[0276] The above-mentioned middleware processing device 1700 and the middleware processing method applied on the server are based on the same inventive concept. After receiving the configuration source data sent by the server, the candidate configuration scheme can be displayed. The user can view the candidate middleware chain and the candidate middleware in the chain from the scheme, so that the user can input adjustment instructions for the candidate configuration scheme on the management side according to the middleware configuration requirements during the execution of complex tasks. After receiving the instruction, the server determines multiple target middleware according to the instruction, and arranges the multiple target middleware according to the instruction, and finally forms a target middleware chain that meets the task requirements. Finally, the server generates a target configuration scheme according to the target middleware chain, and sends the target configuration scheme to the management side for display, so that the management side can view the final configuration scheme. Through targeted development, the development cost and operation and maintenance cost of the middleware under complex tasks are reduced. In the subsequent execution of the target configuration scheme, since the scheme configures multiple middleware into a chain according to the instructions, complex chain tasks can be efficiently processed, thereby improving the processing efficiency of the task.
[0277] Reference Fig.18 , Fig.18 This is an optional structural diagram of another middleware processing device provided in an embodiment of the present application. The middleware processing device 1800 includes:
[0278] The request sending module 1801 is used to send a middleware configuration request to the server, so that the server obtains configuration metadata according to the middleware configuration request;
[0279] The metadata receiving module 1802 is used to receive the configuration metadata sent by the server, and display the candidate configuration schemes according to the configuration metadata, wherein the candidate configuration schemes include a candidate middleware chain, and the candidate middleware chain includes multiple candidate middlewares;
[0280] The instruction sending module 1803 is used to generate an adjustment instruction for the candidate configuration scheme in response to the selection operation of determining multiple target middleware from multiple candidate middlewares and the arrangement operation of adjusting the arrangement order of the multiple target middlewares, and send the adjustment instruction to the server, so that the server determines multiple target middlewares from the multiple candidate middlewares according to the adjustment instruction, determines the arrangement order of the multiple target middlewares according to the adjustment instruction, arranges the multiple target middlewares according to the arrangement order, obtains a target middleware chain, and generates a target configuration scheme according to the target middleware chain;
[0281] The solution receiving module 1804 is used to receive the target configuration solution sent by the server and display the target configuration solution.
[0282] The above-mentioned middleware processing device 1800 and the middleware processing method applied to the management end are based on the same inventive concept. The management end can send a middleware configuration request to the server end and receive the configuration metadata sent by the server end. After receiving the configuration source data sent by the server end, the candidate configuration scheme can be displayed. The user can view the candidate middleware chain and the candidate middleware in the chain from the scheme, so that the user can input the adjustment instruction of the candidate configuration scheme on the management end according to the middleware configuration requirements in the execution process of complex tasks. After receiving the instruction, the server end determines multiple target middleware according to the instruction, and arranges the multiple target middleware according to the instruction, and finally forms a target middleware chain that meets the task requirements. Finally, the server end generates a target configuration scheme according to the target middleware chain, and sends the target configuration scheme to the management end for display, so that the management end can view the final configuration scheme. Through targeted development, the development cost and operation and maintenance cost of the middleware under complex tasks are reduced. In the subsequent execution process of the target configuration scheme, since the scheme configures multiple middleware into a chain according to the instruction, the complex chain task can be efficiently processed, thereby improving the processing efficiency of the task.
[0283] The electronic device for executing the above-mentioned middleware processing method provided in the embodiment of the present application may be a terminal. Fig.19 , Fig.19This is a partial structural block diagram of a terminal provided in an embodiment of the present application. The terminal includes: a camera assembly 1910, a memory 1920, an input unit 1930, a display unit 1940, a sensor 1950, an audio circuit 1960, a wireless fidelity (WiFi) module 1970, a processor 1980, and a power supply 1990. Those skilled in the art can understand that Fig.19 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0284] The camera assembly 1910 can be used to capture images or videos. Optionally, the camera assembly 1910 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal, and the rear camera is disposed on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions.
[0285] The memory 1920 may be used to store software programs and modules. The processor 1980 executes various functional applications and data processing of the terminal by running the software programs and modules stored in the memory 1920 .
[0286] The input unit 1930 may be used to receive input digital or character information and generate key signal input related to the terminal's settings and function control. Specifically, the input unit 1930 may include a touch panel 1931 and other input devices 1932 .
[0287] The display unit 1940 may be used to display input information or provided information and various menus of the terminal. The display unit 1940 may include a display panel 1941 .
[0288] The audio circuit 1960, the speaker 1961, and the microphone 1962 may provide an audio interface.
[0289] The power source 1990 may be alternating current, direct current, a disposable battery, or a rechargeable battery.
[0290] The number of sensors 1950 may be one or more, and the one or more sensors 1950 include but are not limited to: acceleration sensors, gyroscope sensors, pressure sensors, optical sensors, etc. Among them:
[0291] The acceleration sensor can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal. For example, the acceleration sensor can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 1980 can control the display unit 1940 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor. The acceleration sensor can also be used for collecting game or user motion data.
[0292] The gyroscope sensor can detect the body direction and rotation angle of the terminal, and the gyroscope sensor can cooperate with the acceleration sensor to collect the user's 3D actions on the terminal. The processor 1980 can implement the following functions based on the data collected by the gyroscope sensor: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0293] The pressure sensor can be set in the side frame of the terminal and / or the lower layer of the display unit 1940. When the pressure sensor is set in the side frame of the terminal, the user's holding signal of the terminal can be detected, and the processor 1980 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor. When the pressure sensor is set in the lower layer of the display unit 1940, the processor 1980 controls the operability controls on the UI interface according to the user's pressure operation on the display unit 1940. The operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0294] The optical sensor is used to collect the ambient light intensity. In one embodiment, the processor 1980 can control the display brightness of the display unit 1940 according to the ambient light intensity collected by the optical sensor. Specifically, when the ambient light intensity is high, the display brightness of the display unit 1940 is increased; when the ambient light intensity is low, the display brightness of the display unit 1940 is decreased. In another embodiment, the processor 1980 can also dynamically adjust the shooting parameters of the camera assembly 1910 according to the ambient light intensity collected by the optical sensor.
[0295] In this embodiment, the processor 1980 included in the terminal can execute the middleware processing method of the previous embodiment.
[0296] The electronic device for executing the above-mentioned middleware processing method provided in the embodiment of the present application may also be a server, referring to Fig. 20 , Fig. 20Partial structural block diagram of the server provided in the embodiment of the present application. The server 2000 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 2022 (for example, one or more processors) and memory 2032, and one or more storage media 2030 (for example, one or more mass storage devices) storing application programs 2042 or data 2044. Among them, the memory 2032 and the storage medium 2030 can be short-term storage or permanent storage. The program stored in the storage medium 2030 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server 2000. Furthermore, the central processing unit 2022 can be configured to communicate with the storage medium 2030 and execute a series of instruction operations in the storage medium 2030 on the server 2000.
[0297] The server 2000 may also include one or more power supplies 2026, one or more wired or wireless network interfaces 2050, one or more input and output interfaces 2058, and / or one or more operating systems 2041, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0298] The processor in the server 2000 can be used to execute the middleware processing method.
[0299] An embodiment of the present application also provides a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the middleware processing methods of the aforementioned embodiments.
[0300] The embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the above-mentioned middleware processing method.
[0301] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate to describe the embodiments of the present application, for example, it can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0302] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0303] It should be understood that in the description of the embodiments of the present application, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood to not include the number, and above, below, within, etc. are understood to include the number.
[0304] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0305] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0306] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0307] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.
[0308] It should also be understood that the various implementations provided in the embodiments of the present application can be combined arbitrarily to achieve different technical effects.
[0309] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above implementation mode. Technical personnel familiar with the field can also make various equivalent modifications or substitutions under the shared conditions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.
Claims
1. A middleware processing method, characterized in that: include: Receive a middleware configuration request sent by the management end, and obtain configuration metadata according to the middleware configuration request; Sending the configuration metadata to the management end, so that the management end displays candidate configuration schemes according to the configuration metadata, wherein the candidate configuration schemes include a candidate middleware chain, and the candidate middleware chain includes a plurality of candidate middlewares; receiving an adjustment instruction for the candidate configuration scheme sent by the management end, determining a plurality of target middlewares from the plurality of candidate middlewares according to the adjustment instruction, and determining an arrangement order of the plurality of target middlewares according to the adjustment instruction; Arrange the plurality of target middlewares according to the arrangement order to obtain a target middleware chain; A target configuration scheme is generated according to the target middleware chain, and the target configuration scheme is sent to the management end so that the management end displays the target configuration scheme.
2. The middleware processing method according to claim 1, characterized in that: The step of arranging the plurality of target middlewares according to the arrangement order to obtain a target middleware chain includes: Arrange the plurality of target middlewares according to the arrangement order to obtain an initial middleware chain; In the initial middleware chain, determining a data structure transmitted by any one of the target middlewares to the downstream adjacent target middlewares, and determining a data processing method of any one of the target middlewares; The data structure and the data processing method are updated to the initial middleware chain to obtain a target middleware chain.
3. The middleware processing method according to claim 2, characterized in that: The determining of the data structure that any one of the target middleware transmits to the downstream adjacent target middleware includes: From any two adjacent target middlewares, based on the target middleware located downstream, determine the key indication information and array index indication information in the target middleware located upstream; According to at least one of the key indication information and the array index indication information, a value is taken from the target middleware located upstream to obtain a target indication element, and the target indication element is used as a data structure for transmission to the downstream adjacent target middleware.
4. The middleware processing method according to claim 1, characterized in that: The method further comprises: According to the target field generated when the target middleware is called, configuring a state judgment condition for the target middleware, and adding the state judgment condition to the target configuration scheme; Wherein, after the target configuration scheme is executed, the state judgment condition is used to trigger the state of the target middleware to be adjusted to a to-be-destroyed state when being satisfied.
5. The middleware processing method according to claim 1, characterized in that: Before arranging the plurality of target middlewares according to the arrangement order to obtain a target middleware chain, the method further includes: Receiving a middleware creation request sent by the management end, wherein the middleware creation request carries middleware parameters of the middleware to be created; According to the middleware creation request, at least one middleware that meets the middleware parameters is selected from the middleware set currently used to support deployment as the target middleware.
6. The middleware processing method according to claim 5, characterized in that: After selecting at least one middleware that meets the middleware parameters as the target middleware from the middleware set currently used to support deployment according to the middleware creation request, the method further includes: Obtaining the middleware type, deployment target information, specification information, and operation and maintenance information corresponding to the target middleware; Determine the namespace supported by the current environment according to the names of the plurality of candidate middlewares, and name the target middleware according to the namespace; The target middleware is updated according to at least one of the middleware type, the deployment target information, the specification information, and the operation and maintenance information.
7. The middleware processing method according to claim 1, characterized in that: The step of arranging the plurality of target middlewares according to the arrangement order to obtain a target middleware chain includes: If any of the pre-stored candidate middleware chains meets the arrangement order, the candidate middleware chain that meets the arrangement order is used as the target middleware chain; Alternatively, if none of the pre-stored candidate middleware chains satisfies the orchestration order, a middleware chain to be adjusted is determined from a plurality of the candidate middleware chains based on the difference from the orchestration order, and the order of the middleware chains to be adjusted is adjusted to the orchestration order to obtain the target middleware chain.
8. The middleware processing method according to claim 1, characterized in that: The method further comprises: Acquire an Internet Protocol address of a user end and location coordinates of a plurality of candidate edge nodes, determine a geographical area where the user end is located according to the Internet Protocol address, take the candidate edge node with the shortest distance between the location coordinates and the center of the geographical area as a target edge node, and send the target configuration scheme to the user end through the target edge node; Alternatively, the satellite positioning address of the user end and the position coordinates of multiple candidate edge nodes are obtained, the candidate edge node with the shortest distance between the position coordinates and the satellite positioning address is used as the target edge node, and the target configuration scheme is sent to the user end through the target edge node; Alternatively, multiple candidate edge nodes are respectively communicated with the user end through a network, the network delay in the network communication process is calculated, the candidate edge node with the lowest network delay is used as the target edge node, and the target configuration scheme is sent to the user end through the target edge node; Alternatively, an anycast network is established, and autonomous systems are respectively established on multiple candidate edge nodes, and the same target protocol address is allocated to each of the candidate edge nodes through the anycast network. When the user end is connected to the anycast network through the target protocol address, the autonomous system determines, among the multiple candidate edge nodes, a target edge node in the anycast network that is closest to the user end or has the lowest latency, and sends the target configuration plan to the user end through the target edge node.
9. A middleware processing method, characterized in that: include: Sending a middleware configuration request to a server, so that the server obtains configuration metadata according to the middleware configuration request; Receiving the configuration metadata sent by the server, and displaying candidate configuration schemes according to the configuration metadata, wherein the candidate configuration schemes include a candidate middleware chain, and the candidate middleware chain includes multiple candidate middlewares; In response to a selection operation of determining a plurality of target middlewares from a plurality of candidate middlewares and an arrangement operation of adjusting an arrangement order of the plurality of target middlewares, an adjustment instruction for the candidate configuration scheme is generated, and the adjustment instruction is sent to the server, so that the server determines a plurality of target middlewares from the plurality of candidate middlewares according to the adjustment instruction, determines an arrangement order of the plurality of target middlewares according to the adjustment instruction, arranges the plurality of target middlewares according to the arrangement order to obtain a target middleware chain, and generates a target configuration scheme according to the target middleware chain; The target configuration scheme sent by the server is received, and the target configuration scheme is displayed.
10. A middleware processing device, characterized in that: include: A request receiving module, used to receive a middleware configuration request sent by a management terminal, and obtain configuration metadata according to the middleware configuration request; A metadata sending module, used to send the configuration metadata to the management end, so that the management end displays candidate configuration schemes according to the configuration metadata, wherein the candidate configuration schemes include a candidate middleware chain, and the candidate middleware chain includes multiple candidate middlewares; An instruction receiving module, configured to receive an adjustment instruction for the candidate configuration scheme sent by the management terminal, determine a plurality of target middlewares from the plurality of candidate middlewares according to the adjustment instruction, and determine an arrangement order of the plurality of target middlewares according to the adjustment instruction; An orchestration module, used for orchestrating the plurality of target middlewares according to the orchestration sequence to obtain a target middleware chain; A solution generation module is used to generate a target configuration solution according to the target middleware chain, and send the target configuration solution to the management end so that the management end can display the target configuration solution.
11. A middleware processing device, characterized in that: include: A request sending module, used for sending a middleware configuration request to a server, so that the server obtains configuration metadata according to the middleware configuration request; A metadata receiving module, configured to receive the configuration metadata sent by the server, and display candidate configuration schemes according to the configuration metadata, wherein the candidate configuration schemes include a candidate middleware chain, and the candidate middleware chain includes a plurality of candidate middlewares; an instruction sending module, configured to generate an adjustment instruction for the candidate configuration scheme in response to a selection operation of determining a plurality of target middlewares from a plurality of the candidate middlewares and an arrangement operation of adjusting an arrangement order of the plurality of the target middlewares, and to send the adjustment instruction to the server, so that the server determines a plurality of target middlewares from the plurality of the candidate middlewares according to the adjustment instruction, determines an arrangement order of the plurality of the target middlewares according to the adjustment instruction, arranges the plurality of the target middlewares according to the arrangement order to obtain a target middleware chain, and generates a target configuration scheme according to the target middleware chain; The solution receiving module is used to receive the target configuration solution sent by the server and display the target configuration solution.
12. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, it implements the middleware processing method described in any one of claims 1 to 8, or implements the middleware processing method described in claim 9.
13. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the middleware processing method described in any one of claims 1 to 8, or implements the middleware processing method described in claim 9.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the middleware processing method described in any one of claims 1 to 8, or implements the middleware processing method described in claim 9.
