Micro-service-based data processing method, device and equipment and readable storage medium
By using a microservice-based data processing approach and connecting various functional components with pre-defined middleware, the problem of existing technologies being limited to executing services for a specific purpose is solved. This enables unified execution services for multiple products, thereby improving data processing efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WEBANK (CHINA)
- Filing Date
- 2019-07-19
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, open-source products can only perform certain execution services and lack a unified execution service that can connect to multiple products simultaneously, resulting in low data processing efficiency.
It adopts a microservice-based data processing approach, connects various functional components through pre-set middleware, determines the target functional component to which the code execution request instruction points, and obtains the corresponding code execution result data, supporting unified execution services for multiple products.
It improves data processing efficiency, avoids the problems of multiple entry points and unclear calling relationships found in open source products, and achieves unified execution services for multiple products.
Smart Images

Figure CN110333917B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of financial technology (Fintech), and in particular to a data processing method, apparatus, device, and readable storage medium based on microservices. Background Technology
[0002] With the continuous development of financial technology (Fintech), especially internet-based financial technology, more and more technologies are being applied in the financial field. Data processing in the financial sector involves numerous technological applications. However, currently, due to the multiple and inconsistent external entry points of open-source products, unclear calling relationships and hierarchical structures, most can only perform certain execution services and lack a unified execution service that can simultaneously connect to multiple products. This directly affects the data processing efficiency of business products, thus reducing data processing efficiency. Summary of the Invention
[0003] The main objective of this invention is to provide a microservice-based data processing method, apparatus, device, and readable storage medium, aiming to solve the technical problem in the prior art where open-source products can only perform certain execution services and lack a unified execution service that can simultaneously interface with multiple products, thus reducing data processing efficiency.
[0004] To achieve the above objectives, embodiments of the present invention provide a microservice-based data processing method, the microservice-based data processing method comprising:
[0005] When a code execution request instruction is detected, the target functional component pointed to by the code execution request instruction is determined based on a preset middleware, wherein the preset middleware connects various functional components based on microservices;
[0006] Based on the target functional component, obtain the code execution result data pointed to by the code execution request instruction.
[0007] Optionally, when a code execution request instruction is detected, the step of determining the target functional component pointed to by the code execution request instruction based on a preset middleware, wherein the preset middleware connects the various functional components based on microservices includes:
[0008] When a code execution request instruction is detected, the type of the code execution request instruction is obtained;
[0009] The target functional component pointed to by the code execution request instruction is determined based on the preset middleware and the type of the code execution request instruction.
[0010] The preset middleware connects various functional components based on microservices. Each functional component includes a microservice interface, which is a one-way functional interface distributed on various platforms that matches the code execution request type.
[0011] Optionally, the step of obtaining the code execution result data pointed to by the code execution request instruction based on the target functional component includes:
[0012] Based on the target functional components, determine whether an available engine exists;
[0013] If an available engine is identified, the code execution request instruction is sent to the available engine to obtain the code execution result data returned by the available engine.
[0014] Optionally, the step of determining whether an available engine exists based on the target functional component further includes:
[0015] If it is determined that no available engine exists, a new available engine will be generated;
[0016] The code execution request instruction is sent to the new available engine to obtain the code execution result data fed back by the new available engine.
[0017] Optionally, the step of generating a new available engine when it is determined that no available engine exists includes:
[0018] If it is determined that no available engine exists, the target engine manager is determined through the preset resource manager, and a new available engine is requested in the target engine manager for the code execution request instruction.
[0019] Optionally, the step of sending the code execution request instruction to the available engine to obtain the code execution result data returned by the available engine when it is determined that an available engine exists further includes:
[0020] If an available engine is determined to exist, the code execution request instruction is sent to the available engine, and the available engine is locked in order to obtain the code execution result data fed back by the available engine.
[0021] After obtaining the code execution result data fed back by the available engine, the available engine that has been locked is unlocked.
[0022] Optionally, the step of obtaining the code execution result data pointed to by the code execution request instruction based on the target functional component includes:
[0023] The available engine is released, and a prompt message indicating that the code execution result data has been obtained is generated.
[0024] The topic information to be sent is deduplicated based on the multiple-send identifier of the topic information to be sent.
[0025] The present invention also provides a microservice-based data processing device, the microservice-based data processing device comprising:
[0026] The detection module is used to determine the target functional component pointed to by the code execution request instruction based on a preset middleware when a code execution request instruction is detected, wherein the preset middleware connects various functional components based on microservices;
[0027] The acquisition module is used to acquire the code execution result data pointed to by the code execution request instruction based on the target functional component.
[0028] Optionally, the detection module includes:
[0029] The first acquisition unit is used to acquire the type of the code execution request instruction when a code execution request instruction is detected;
[0030] The first determining unit is used to determine the target functional component pointed to by the code execution request instruction based on the preset middleware and the type of the code execution request instruction;
[0031] The preset middleware connects various functional components based on microservices. Each functional component includes a microservice interface, which is a one-way functional interface distributed on various platforms that matches the code execution request type.
[0032] Optionally, the acquisition module includes:
[0033] The second determining unit is used to determine whether an available engine exists based on the target functional component;
[0034] The second acquisition unit is used to send the code execution request instruction to the available engine if it is determined that an available engine exists, so as to obtain the code execution result data fed back by the available engine.
[0035] Optionally, the acquisition module includes:
[0036] The generation unit is used to generate a new available engine if it is determined that no available engine exists.
[0037] The third acquisition unit is used to send the code execution request instruction to the new available engine in order to obtain the code execution result data fed back by the new available engine.
[0038] Optionally, the generation unit includes:
[0039] The application subunit is used to determine the target engine manager through a preset resource manager when it is determined that no available engine exists, and to apply for a new available engine in the target engine manager for the code execution request instruction.
[0040] Optionally, the second acquisition unit includes:
[0041] The acquisition subunit is used to send the code execution request instruction to the available engine when it is determined that there is an available engine, and to lock the available engine in order to obtain the code execution result data fed back by the available engine;
[0042] The unlocking subunit is used to unlock the locked available engine after obtaining the code execution result data fed back by the available engine.
[0043] Optionally, the microservice-based data processing device includes:
[0044] The generation module is used to release the available engine and generate a prompt message indicating that the code execution result data has been obtained.
[0045] The present invention also provides a readable storage medium storing a microservice-based data processing program, wherein when the microservice-based data processing program is executed by a processor, it implements the steps of the microservice-based data processing method described above.
[0046] When a code execution request instruction is detected, this invention determines the target functional component pointed to by the code execution request instruction based on preset middleware, wherein the preset middleware connects various functional components based on microservices; based on the target functional component, the code execution result data pointed to by the code execution request instruction is obtained. In this application, because there is a preset middleware that connects to various functional components based on microservices, the preset middleware for each functional component based on microservices can simultaneously connect to a unified execution service of multiple products, rather than just targeting a certain execution service. Therefore, it can directly avoid the problems of multiple and inconsistent external entry points, unclear call relationships and hierarchical structures in open source products, and achieve the technical effect of improving data processing efficiency. Attached Figure Description
[0047] Figure 1 This is a flowchart illustrating the first embodiment of the microservice-based data processing method of the present invention.
[0048] Figure 2This is a detailed flowchart illustrating the steps of connecting various functional components based on microservices in the second embodiment of the microservice-based data processing method of the present invention, in which a code execution request instruction is detected, and the target functional component pointed to by the code execution request instruction is determined based on a preset middleware.
[0049] Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the method of the embodiment of the present invention.
[0050] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0051] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0052] This invention provides a microservice-based data processing method. In one embodiment of the microservice-based data processing method, refer to... Figure 1 The microservice-based data processing method includes:
[0053] Step S10: When a code execution request instruction is detected, the target functional component pointed to by the code execution request instruction is determined based on a preset middleware, wherein the preset middleware connects various functional components based on microservices;
[0054] Step S20: Based on the target functional component, obtain the code execution result data pointed to by the code execution request instruction.
[0055] The specific steps are as follows:
[0056] Step S10: When a code execution request instruction is detected, the target functional component pointed to by the code execution request instruction is determined based on a preset middleware, wherein the preset middleware connects various functional components based on microservices;
[0057] It should be noted that in this embodiment, the microservice-based data processing method is applied to a microservice-based data processing system. Microservices refer to data processing functionality implemented based on small, single-function services. Due to the presence of pre-defined middleware, this microservice-based data processing system can interface with multiple external business systems, such as loan and insurance systems. In addition to interfacing with these external business systems, the system also interfaces with upper-layer data processing tools, such as integrated development environments (IDEs), based on the pre-defined middleware. These IDEs contain business code written in various languages, and the microservice-based data processing system is responsible for backend parsing and executing this business code. In other words, the microservice-based data processing system can perform execution functions. Furthermore, the microservice-based data processing system can also handle functions such as computation, storage, resource management, access control, data integration, metadata management, and workflow development result visualization. It can also provide offline processing of massive amounts of data, data modeling, ad-hoc query analysis, and data mining.
[0058] When a code execution request instruction is detected, the target functional component pointed to by the code execution request instruction is determined based on a preset middleware. This code execution request instruction may be sent by API interfaces of multiple external business systems. After receiving the code execution request instruction sent by the API interfaces of multiple external business systems, the microservice-based data processing system processes the code execution request instruction. The code execution request instruction may be an execution request instruction type or a data retrieval request instruction type, etc. In addition, the execution request instruction type refers to the business code type in the integrated development environment (IDE) platform, and the data retrieval request instruction type refers to the data query request of multiple external business systems. The target functional component pointed to by the code execution request instruction is determined based on the preset middleware. The preset middleware connects the various functional components based on microservices. That is, the middleware of the microservice-based data processing system can decouple the calls to specific functions for each specific business or develop microservice interfaces corresponding to the code execution environment, thereby realizing various functions.
[0059] Reference Figure 2 The step of determining the target functional component pointed to by the code execution request instruction based on preset middleware when a code execution request instruction is detected includes:
[0060] Step S11: When a code execution request instruction is detected, obtain the type of the code execution request instruction;
[0061] In this embodiment, when a code execution request instruction is detected, the type of the code execution request instruction is obtained. Specifically, it is determined whether the code execution request instruction is an execution request instruction type or a data retrieval request instruction type, or more specifically, it is determined whether the code execution request instruction is an execution request instruction type for a specific environment or a specific data retrieval request instruction type.
[0062] Step S12: Determine the target functional component pointed to by the code execution request instruction based on the preset middleware and the type of the code execution request instruction;
[0063] The target functional component pointed to by the code execution request instruction is determined based on the preset middleware and the type of the code execution request instruction. For example, if the type of the code execution request instruction is a data acquisition request instruction, the target functional component pointed to by the code execution request instruction is determined to be a first category of target functional components based on the preset middleware and the type of the code execution request instruction. If the type of the code execution request instruction is an execution request instruction, the target functional component pointed to by the code execution request instruction is determined to be a second category of target functional components based on the preset middleware and the type of the code execution request instruction. If the type of the code execution request instruction is a data query subtype of the data acquisition request instruction, the target functional component pointed to by the code execution request instruction is a query subtype functional component of the first category of target functional components based on the preset middleware and the data query subtype.
[0064] The preset middleware connects various functional components based on microservices. Each functional component includes a microservice interface, which is a one-way functional interface distributed on various platforms that matches the code execution request type.
[0065] In other words, for each specific business or code execution environment, a microservice-based data processing system has multiple microservice interfaces. These microservice interfaces have a one-to-one mapping relationship with the specific business functions or code execution environments corresponding to that specific business. That is, different specific business functions require different microservice interfaces, and different specific code execution environments require different microservice interfaces. In essence, a microservice interface is a set of pre-defined standard API interfaces designed based on the specific business or code execution environment of the enterprise. Different microservice interfaces have different pre-defined rules or functions to achieve a single function, such as querying business data or executing a certain type of code. It should be noted that since the same business or the same code execution environment is carried out simultaneously on multiple platforms, for the same business or execution environment, there are microservice interfaces corresponding to different platforms or interfacing with different platforms for the same function.
[0066] In a microservice-based data processing system, functional components are also set up. This involves encapsulating functional components on microservice interfaces corresponding to different platforms or interfacing with different platforms for the same function. This allows for the management of various microservice interfaces for the same business or the same function within the same code execution environment on different platforms. For example, in a microservice-based data processing system, various microservice interfaces with different functions are developed for the Q loan business. One of these microservice interfaces queries the application status of the B loan business based on the policy number. Since the Q loan business operates on platforms such as q1 and q2, the microservice-based data processing system includes different microservice interfaces that connect to platforms q1 and q2 for querying the application status of the Q loan business based on the policy number. The functional components are what manage these different microservice interfaces for querying the application status of the Q loan business based on the policy number on different platforms.
[0067] Step S20: Based on the target functional component, obtain the code execution result data pointed to by the code execution request instruction.
[0068] After the target functional component is determined, since the functional component implements various microservice interfaces that manage the same business on different platforms or the same function in the same code execution environment, the code execution result data pointed to by the code execution request instruction can be obtained based on the various microservice interfaces of the same business on different platforms or the same function in the same code execution environment. The code execution result data includes code execution progress, code execution status, code execution log, or business acquisition data, etc.
[0069] When a code execution request instruction is detected, this invention determines the target functional component pointed to by the code execution request instruction based on a preset middleware, wherein the preset middleware connects to various functional components based on microservices; based on the target functional component, the code execution result data pointed to by the code execution request instruction is obtained. In this application, because there is a preset middleware that connects to various functional components based on microservices, the preset middleware of each functional component based on microservices can simultaneously connect to a unified execution service of multiple products, rather than just targeting a certain execution service. Therefore, it can directly avoid the problems of multiple and inconsistent external entry points, unclear call relationships and hierarchical structures in open source products, and achieve the technical effect of improving data processing efficiency. That is, it solves the technical problem in the prior art that open source products can only target a certain execution service and lack a unified execution service that can simultaneously connect to multiple products, thus reducing data processing efficiency.
[0070] Furthermore, the present invention provides another embodiment of a microservice-based data processing method, wherein the step of obtaining the code execution result data pointed to by the code execution request instruction based on the target functional component includes:
[0071] Step S21: Based on the target functional component, determine whether an available engine exists;
[0072] In this embodiment, the target functional component communicates with various platforms through microservice interfaces. During the communication with various platforms, it is necessary to determine whether there is an available engine service on each platform, that is, to determine whether there is an available engine (composed of modules with feedback data function). This is achieved by sending a query request to a preset resource manager (associated with each platform) to determine whether there is an available engine service on each platform, i.e., whether there is an available engine, so as to determine whether the relevant data corresponding to the code execution request instruction can be obtained from each platform.
[0073] Step S22: If it is determined that there is an available engine, the code execution request instruction is sent to the available engine to obtain the code execution result data fed back by the available engine.
[0074] In this embodiment, if it is determined that there is an available engine or an idle engine, the code execution request instruction is sent to the available engine through the microservice interfaces of each functional component connected to the preset middleware, so as to obtain the code execution result data fed back by the available engine.
[0075] The step of determining whether an available engine exists based on the target functional component further includes:
[0076] Step S23: If it is determined that no available engine exists, generate a new available engine;
[0077] In this embodiment, a query request is sent to a preset resource manager to determine whether an available engine service exists on each platform, i.e., whether an available engine exists. If no available engine exists, a new available engine is generated. This is to avoid the inability to obtain the relevant data corresponding to the code execution request instruction.
[0078] The step of generating a new available engine when it is determined that no available engine exists includes:
[0079] Step S231: If it is determined that no available engine exists, the target engine manager is determined through the preset resource manager, and a new available engine is requested in the target engine manager for the code execution request instruction.
[0080] In this embodiment, there is a preset resource manager. This preset resource manager sets permission information uniformly for each user or tenant, eliminating the need for users to repeatedly configure defined environment variables, upload dependent material files, customize functions, and apply for resources in various systems. It should be noted that the preset resource manager also sets up a unified resource management service for each user, i.e., each tenant.
[0081] In this embodiment, if it is determined that no available engine exists, a target engine manager is determined through a preset resource manager associated with each platform. This is used to request a new available engine from the target engine manager for the code execution request instruction. Specifically, by requesting new resources corresponding to the code execution request instruction from the preset resource managers associated with each platform, the user information carried in the code execution request instruction is first obtained. Based on the current tenant isolation status in the preset resource managers, the engine manager corresponding to the user information is determined from the preset resource managers. After determining the engine manager corresponding to the user information, the target data type carried in the code execution request instruction is also obtained. A target engine manager is selected from the engine managers corresponding to the user information based on the target data type. In other words, a new available engine is requested from the target engine manager for the code execution request instruction based on the target engine manager.
[0082] Step S24: Send the code execution request instruction to the new available engine to obtain the code execution result data fed back by the new available engine.
[0083] In this embodiment, based on the target functional component, it is determined whether an available engine exists. If an available engine is found, the code execution request instruction is sent to the available engine to obtain the code execution result data fed back by the available engine. In this embodiment, accurate acquisition of code execution result data is achieved.
[0084] Furthermore, the present invention provides another embodiment of a microservice-based data processing method. In this embodiment, the step of sending the code execution request instruction to the available engine to obtain the code execution result data fed back by the available engine when it is determined that an available engine exists further includes:
[0085] Step S25: If it is determined that there is an available engine, the code execution request instruction is sent to the available engine, and the available engine is locked to obtain the code execution result data fed back by the available engine;
[0086] In this embodiment, during the process of obtaining code execution result data, if it is determined that there is an available engine, the code execution request instruction is sent to the available engine, and the available engine is locked so that the available engine is dedicated to processing the code execution request instruction, thereby avoiding the processing chaos caused by one available engine processing multiple code execution request instructions at the same time, so as to obtain the code execution result data fed back by the available engine.
[0087] Step S26: After obtaining the code execution result data fed back by the available engine, the available engine that has been locked is unlocked.
[0088] After obtaining the code execution result data fed back by the available engine, the available engine that has been locked is unlocked or released so that the unlocked available engine can process other instructions, thereby avoiding waste of resources.
[0089] In this embodiment, if an available engine is determined to exist, the code execution request instruction is sent to the available engine, and the available engine is locked to obtain the code execution result data returned by the available engine. After obtaining the code execution result data returned by the available engine, the locked available engine is unlocked. In this embodiment, the fault tolerance of the code execution request instruction is improved by locking and unlocking the available engine.
[0090] Furthermore, the present invention provides another embodiment of a microservice-based data processing method. In this embodiment, after the step of obtaining the code execution result data pointed to by the code execution request instruction based on the target functional component, the method includes:
[0091] Step S40: Release the available engine and generate a prompt message indicating that the code execution result data has been obtained.
[0092] In this embodiment, after obtaining the code execution result data pointed to by the code execution request instruction, the available engine is released, and a prompt message indicating that the code execution result data has been obtained is generated so that the user can obtain the code execution result data in a timely manner, thereby improving the user experience.
[0093] Reference Figure 3 , Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention.
[0094] The data processing device based on microservices in this embodiment of the invention can be a PC, or a terminal device such as a smartphone, tablet, or portable computer.
[0095] like Figure 3 As shown, the microservice-based data processing device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to establish communication between the processor 1001 and the memory 1005. The memory 1005 may be high-speed RAM or stable non-volatile memory, such as disk storage. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0096] Optionally, the microservice-based data processing device may also include a target user interface, a network interface, a camera, RF (Radio Frequency) circuitry, sensors, audio circuitry, a WiFi module, etc. The target user interface may include a display screen and an input unit such as a keyboard; optionally, the target user interface may also include a standard wired interface or a wireless interface. The network interface may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0097] Those skilled in the art will understand that Figure 3 The microservice-based data processing device architecture shown in the figure does not constitute a limitation on the microservice-based data processing device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0098] like Figure 3 As shown, the memory 1005, as a computer storage medium, may include an operating system, a network communication module, and a microservices-based data processing program. The operating system is a program that manages and controls the hardware and software resources of the microservices-based data processing device, supporting the operation of the microservices-based data processing program and other software and / or programs. The network communication module is used to enable communication between the various components within the memory 1005, as well as communication with other hardware and software in the microservices-based data processing device.
[0099] exist Figure 3 In the microservice-based data processing device shown, the processor 1001 is used to execute the microservice-based data processing program stored in the memory 1005 to implement the steps of the microservice-based data processing method described above.
[0100] The specific implementation of the microservice-based data processing device of the present invention is basically the same as the embodiments of the microservice-based data processing method described above, and will not be repeated here.
[0101] Furthermore, embodiments of the present invention also propose a microservice-based data processing device, the microservice-based data processing device comprising:
[0102] The detection module is used to determine the target functional component pointed to by the code execution request instruction based on a preset middleware when a code execution request instruction is detected, wherein the preset middleware connects various functional components based on microservices;
[0103] The acquisition module is used to acquire the code execution result data pointed to by the code execution request instruction based on the target functional component.
[0104] Optionally, the detection module includes:
[0105] The first acquisition unit is used to acquire the type of the code execution request instruction when a code execution request instruction is detected;
[0106] The first determining unit is used to determine the target functional component pointed to by the code execution request instruction based on the preset middleware and the type of the code execution request instruction;
[0107] The preset middleware connects various functional components based on microservices. Each functional component includes a microservice interface, which is a one-way functional interface distributed on various platforms that matches the code execution request type.
[0108] Optionally, the acquisition module includes:
[0109] The second determining unit is used to determine whether an available engine exists based on the target functional component;
[0110] The second acquisition unit is used to send the code execution request instruction to the available engine if it is determined that an available engine exists, so as to obtain the code execution result data fed back by the available engine.
[0111] Optionally, the acquisition module includes:
[0112] The generation unit is used to generate a new available engine if it is determined that no available engine exists.
[0113] The third acquisition unit is used to send the code execution request instruction to the new available engine in order to obtain the code execution result data fed back by the new available engine.
[0114] Optionally, the generation unit includes:
[0115] The application subunit is used to determine the target engine manager through a preset resource manager when it is determined that no available engine exists, and to apply for a new available engine in the target engine manager for the code execution request instruction.
[0116] Optionally, the second acquisition unit includes:
[0117] The acquisition subunit is used to send the code execution request instruction to the available engine when it is determined that there is an available engine, and to lock the available engine in order to obtain the code execution result data fed back by the available engine;
[0118] The unlocking subunit is used to unlock the locked available engine after obtaining the code execution result data fed back by the available engine.
[0119] Optionally, the microservice-based data processing device includes:
[0120] The generation module is used to release the available engine and generate a prompt message indicating that the code execution result data has been obtained.
[0121] The specific implementation of the microservice-based data processing device of the present invention is basically the same as the embodiments of the microservice-based data processing method described above, and will not be repeated here.
[0122] Furthermore, this invention also proposes a microservice-based data processing device, which includes a memory 109, a processor 110, and a microservice-based data processing program stored in the memory 109 and executable on the processor 110. When the microservice-based data processing program is executed by the processor 110, it implements the steps of the above-described embodiments of the microservice-based data processing method.
[0123] Furthermore, the present invention provides a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement the steps of the embodiments of the microservice-based data processing method described above.
[0124] The extended content of the specific implementation of the device and readable storage medium (i.e., computer-readable storage medium) of the present invention is basically the same as the various embodiments of the microservice-based data processing method described above, and will not be repeated here.
[0125] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0126] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0127] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0128] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A data processing method based on microservices, characterized in that, The microservice-based data processing method includes: When a code execution request instruction is detected, the type of the code execution request instruction is obtained; If the type of the code execution request instruction is a data acquisition request instruction type, the target functional component pointed to by the code execution request instruction is determined to be the first category of target functional components based on the preset middleware and the type of the code execution request instruction. If the type of the code execution request instruction is an execution request instruction type, the target functional component pointed to by the code execution request instruction is determined to be the second major category of target functional components based on the preset middleware and the type of the code execution request instruction. If the type of the code execution request instruction is a data query subtype in the data acquisition request instruction type, the target functional component pointed to by the code execution request instruction is determined to be a query subtype functional component in the first major category of target functional components based on the preset middleware and the data query subtype; wherein, the preset middleware connects various functional components based on microservices, and each functional component includes various microservice interfaces, and each microservice interface is a one-way functional interface distributed on various platforms that matches the code execution request type; Based on the target functional components, determine whether an available engine exists; If an available engine is determined to exist, the code execution request instruction is sent to the available engine, and the available engine is locked to obtain the code execution result data returned by the available engine; after obtaining the code execution result data returned by the available engine, the locked available engine is unlocked. If it is determined that no available engine exists, the target engine manager is determined by the preset resource manager, and a new available engine is requested in the target engine manager for the code execution request instruction; The code execution request instruction is sent to the new available engine to obtain the code execution result data fed back by the new available engine.
2. The microservice-based data processing method as described in claim 1, characterized in that, The step of obtaining the code execution result data pointed to by the code execution request instruction based on the target functional component includes: The available engine is released, and a prompt message indicating that the code execution result data has been obtained is generated.
3. A microservice-based data processing device, characterized in that, The microservice-based data processing device includes: A detection module is used to determine the target functional component pointed to by a code execution request instruction based on a preset middleware when a code execution request instruction is detected. Specifically, when a code execution request instruction is detected, the module obtains the type of the code execution request instruction. If the type of the code execution request instruction is a data acquisition request instruction, the module determines the target functional component pointed to by the code execution request instruction as a first category of target functional components based on the preset middleware and the type of the code execution request instruction. If the type of the code execution request instruction is an execution request instruction, the module determines the target functional component pointed to by the code execution request instruction as a second category of target functional components based on the preset middleware and the type of the code execution request instruction. If the type of the code execution request instruction is a data query subtype within a data acquisition request instruction, the module determines the target functional component pointed to by the code execution request instruction as a query subtype functional component within the first category of target functional components based on the preset middleware and the data query subtype. The preset middleware connects various functional components based on microservices, and each functional component includes various microservice interfaces, which are unidirectional functional interfaces distributed across various platforms that match the code execution request type. The acquisition module is used to acquire the code execution result data pointed to by the code execution request instruction based on the target functional component; The acquisition module includes: The second determining unit is used to determine whether an available engine exists based on the target functional component; The second acquisition unit is used to send the code execution request instruction to the available engine when it is determined that there is an available engine, so as to obtain the code execution result data fed back by the available engine; The acquisition module includes: a generation unit, used to generate a new available engine if it is determined that no available engine exists; The third acquisition unit is used to send the code execution request instruction to the new available engine in order to obtain the code execution result data fed back by the new available engine. The generation unit includes: The application subunit is used to determine the target engine manager through a preset resource manager when it is determined that no available engine exists, and to apply for a new available engine in the target engine manager for the code execution request instruction. The second acquisition unit includes: The acquisition subunit is used to send the code execution request instruction to the available engine and lock the available engine if it is determined that there is an available engine, so as to obtain the code execution result data fed back by the available engine.
4. A microservice-based data processing device, characterized in that, The device includes: a memory, a processor, and a microservice-based data processing program stored in the memory and executable on the processor, wherein the microservice-based data processing program, when executed by the processor, implements the steps of the microservice-based data processing method as described in claim 1 or 2.
5. A readable storage medium, characterized in that, The readable storage medium stores a microservice-based data processing program, which, when executed by a processor, implements the steps of the microservice-based data processing method as described in claim 1 or 2.
Citation Information
Patent Citations
Business operation and maintenance method, device and equipment and readable storage medium
CN109784503A