Method and apparatus for managing and controlling separated link data based on micro service
By adopting a microservice-based decoupled data management approach, the separation of front-end and back-end data is achieved, which solves the redundancy problem caused by front-end and back-end data interaction and improves the smoothness of data operation and the stability of back-end services.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-09
- Publication Date
- 2026-03-24
AI Technical Summary
In existing technologies, the front-end and back-end data interaction design is too closely integrated, resulting in redundant data, affecting the smoothness of data operation, poor page performance, and low scalability.
A microservice-based decoupled link data management method is adopted. By detecting addressing commands, the interaction object is determined, and data interaction operations are performed according to the microservice architecture and interaction interface to achieve separate management and control of front-end and back-end data.
It improved the efficiency and accuracy of data management, enhanced the decoupling of front-end and back-end data, and improved the stability and flexibility of back-end services.
Smart Images

Figure CN115567581B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data management technology, and in particular to a method and apparatus for managing and controlling separated link data based on microservices. Background Technology
[0002] With the development and application of computer languages, from a macro-application perspective, computer data can be simply divided into front-end data and back-end data. The two complement each other and are the cornerstone of most computer technologies today. However, with the development and application of front-end and back-end languages, there will inevitably be corresponding defects in the process of data interaction and auxiliary function implementation.
[0003] The presentation and display of front-end data relies on back-end data interaction for its underlying logic and data interaction. Conversely, after processing and interacting with the back-end data, it also needs to be presented to the user through the front-end interface, creating a close coupling between the two. However, the overly close interaction between front-end and back-end data in existing technologies leads to redundant and mixed front-end and back-end data, limiting the overall smoothness of data operation. Significant drawbacks include poor page and program performance and low scalability. Therefore, providing a method to resolve the mixing of front-end and back-end data and improve the overall smoothness of data operation is crucial. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method and apparatus for managing and controlling separated link data based on microservices, which can realize the separate management and control of front-end and back-end data, and improve the efficiency and accuracy of data management and control.
[0005] To address the aforementioned technical problems, the first aspect of this invention discloses a method for managing and controlling separated link data based on microservices, the method comprising:
[0006] Detect the presence of an addressing instruction, wherein the addressing instruction is used to request access to the interaction address of the target link service, and the interaction address is used to access the target link service;
[0007] When the addressing instruction is detected, the addressing object is determined. The addressing object includes a first interaction object and a second interaction object. The first interaction object is the object whose instruction request end is front-end page data, and the second interaction object is the object whose instruction request end is back-end service data.
[0008] When the addressing object is determined to be the first interaction object, according to the target interaction requirements of the first interaction object, the link interaction service corresponding to the target interaction requirements in the target link service is called, so as to realize the data interaction function between the first interaction object and the target link service through the link interaction service;
[0009] When the addressing object is determined to be the second interaction object, based on the preset microservice architecture and the interaction interface corresponding to the microservice architecture, data interaction operations are performed between the second interaction object and the target link service.
[0010] As an optional implementation, in the first aspect of the present invention, before invoking the link interaction service in the target link service according to the target interaction requirements of the first interactive object and the interaction type corresponding to the target interaction requirements, the method further includes:
[0011] Obtain the data interaction requirements of the first interaction object, and use them as the target interaction requirements of the first interaction object;
[0012] Analyze the target interaction requirements to obtain the corresponding interaction types, which include cross-business domain interaction types or non-cross-business domain interaction types.
[0013] The step of invoking the link interaction service corresponding to the target interaction requirement in the target link service according to the target interaction requirement of the first interaction object includes:
[0014] Based on the target interaction requirements of the first interaction object and the interaction type, the link interaction service corresponding to the target interaction requirements and the interaction type in the target link service is invoked.
[0015] As an optional implementation, in the first aspect of the present invention, after invoking the link interaction service corresponding to the target interaction requirement and the interaction type in the target link service according to the target interaction requirement and the interaction type of the first interaction object, the method further includes:
[0016] According to the link interaction service, a requirement transformation operation is performed on the target interaction requirement to obtain the interaction parameters corresponding to the target interaction requirement. The interaction parameters include an interaction identifier, which is used to determine the target data layer for processing the interaction parameter. The target data layer belongs to the backend service data layer.
[0017] Based on the link interaction service and the interaction identifier, the interaction parameters are forwarded to the target data layer, and after receiving the feedback information, the feedback information is transmitted back to the data layer where the first interaction object is located. The feedback information is the information fed back after the interaction parameters have been processed by a preset data layer.
[0018] As an optional implementation, in the first aspect of the present invention, before performing data interaction operations between the second interaction object and the target link service based on a preset microservice architecture and the corresponding interaction interface of the microservice architecture, the method further includes:
[0019] Collect the running data of the target link service and analyze the running data to obtain the service call status corresponding to the target link service. The service call status includes the interactive status or non-interactive status that requires access to the backend service data layer corresponding to the second interactive object.
[0020] The process of performing data interaction operations between the second interaction object and the target link service based on the preset microservice architecture and the corresponding interaction interface of the microservice architecture includes:
[0021] When it is determined that the service call status is the non-interactive status, a standby flag is generated. The standby flag is used to indicate that there is no need to perform data interaction operations between the second interaction object and the target link service.
[0022] When the service call status is determined to be the interaction status, the target interaction data corresponding to the interaction status is determined according to the running data, and data interaction operations are performed on the second interaction object, the target interaction data and the target link service based on the preset microservice architecture and the interaction interface corresponding to the microservice architecture.
[0023] As an optional implementation, in the first aspect of the present invention, the method further includes:
[0024] Based on the preset resource server and application server, and combined with the preset separation architecture construction scheme, a first separation architecture for managing and controlling front-end data is constructed. The resource server is used to manage and control front-end static resources, and the application server is used to manage and control front-end application functions.
[0025] According to the first separation architecture, the front-end data is monitored to obtain data change information of the front-end data. When the data change information indicates that it is necessary to perform link data interaction with the back-end program, a front-end addressing instruction corresponding to the data change information is generated according to the first separation architecture and the data change information, and the operation of detecting whether there is an addressing instruction is triggered. The addressing instruction includes the front-end addressing instruction.
[0026] As an optional implementation, in the first aspect of the present invention, after generating the front-end addressing instruction corresponding to the data change information based on the first separation architecture and the data change information, the method further includes:
[0027] Based on the preset microservice architecture and combined with the separation architecture construction scheme, a second separation architecture for managing and controlling backend data is constructed.
[0028] Based on the first separation architecture and the second separation architecture, a target separation architecture for managing target link data is constructed, wherein the target link data includes the front-end data and the back-end data;
[0029] And the detection of the presence of an addressing instruction includes:
[0030] Based on the target separation architecture, detect whether there is an addressing instruction in the target link data.
[0031] As an optional implementation, in the first aspect of the present invention, after determining the addressing object, the method further includes:
[0032] Based on the addressing object and the registration information corresponding to the target link service, the access permission type of the addressing object is determined. The access permission type includes full access permission type, half access permission type or no access permission type. The full access permission type is the type that allows calling all the target link services. The half access permission type is the type that allows calling the target link services within a preset service range. The no access permission type is the type that cannot call the target service.
[0033] When the access permission type of the addressing object is determined to be the full permission type or the half permission type, the addressing object is authorized to access the target link service;
[0034] When it is determined that the access type of the addressing object is no access type, an addressing record is generated for the addressing object according to the addressing type and the addressing object. The addressing record is used to provide the processing program responsible for the no access type, so that the processing program can perform a preset data correction operation on the addressing object corresponding to the no access type according to the addressing record.
[0035] A second aspect of this invention discloses a microservice-based device for managing and controlling decoupled link data, the device comprising:
[0036] The detection module is used to detect whether there is an addressing instruction, which is used to request access to the interaction address of the target link service, and the interaction address is used to access the target link service.
[0037] The determination module is used to determine the addressing object when the addressing instruction is detected. The addressing object includes a first interaction object and a second interaction object. The first interaction object is the object whose instruction request end of the addressing instruction is front-end page data, and the second interaction object is the object whose instruction request end of the addressing instruction is back-end service data.
[0038] When the addressing object is determined to be the first interaction object, the calling module calls the link interaction service corresponding to the target interaction requirement in the target link service according to the target interaction requirement of the first interaction object, so as to realize the data interaction function between the first interaction object and the target link service through the link interaction service;
[0039] The data interaction module is used to perform data interaction operations between the second interaction object and the target link service based on a preset microservice architecture and the interaction interface corresponding to the microservice architecture when the determined addressing object is the second interaction object.
[0040] As an optional implementation, in a second aspect of the invention, the apparatus further includes:
[0041] The acquisition module is used to acquire the data interaction requirements of the first interactive object as the target interaction requirements of the first interactive object before the calling module calls the link interaction service in the target link service according to the target interaction requirements of the first interactive object and the interaction type corresponding to the target interaction requirements.
[0042] The analysis module is used to analyze the target interaction requirements and obtain the interaction type corresponding to the target interaction requirements. The interaction type includes cross-business domain interaction types or non-cross-business domain interaction types.
[0043] The method by which the calling module calls the link interaction service corresponding to the target interaction requirement in the target link service according to the target interaction requirement of the first interaction object specifically includes:
[0044] Based on the target interaction requirements of the first interaction object and the interaction type, the link interaction service corresponding to the target interaction requirements and the interaction type in the target link service is invoked.
[0045] As an optional implementation, in a second aspect of the invention, the apparatus further includes:
[0046] The data conversion module is used to perform a requirement conversion operation on the target interaction requirement according to the link interaction service corresponding to the target interaction requirement and the interaction type in the target link service after the calling module calls the link interaction service according to the target interaction requirement and the interaction type of the first interaction object. The result is to obtain the interaction parameters corresponding to the target interaction requirement. The interaction parameters include an interaction identifier, which is used to determine the target data layer for processing the interaction parameters. The target data layer belongs to the backend service data layer.
[0047] The data interaction module is further configured to forward the interaction parameters to the target data layer according to the link interaction service and the interaction identifier, and after receiving the feedback information, transmit the feedback information back to the data layer where the first interaction object is located. The feedback information is the information fed back after the interaction parameters have been processed by a preset data layer.
[0048] As an optional implementation, in a second aspect of the invention, the apparatus further includes:
[0049] The data processing module is used to collect the running data of the target link service and analyze the running data to obtain the service call status corresponding to the target link service before the data interaction module performs data interaction operations on the second interaction object and the target link service based on the preset microservice architecture and the interaction interface corresponding to the microservice architecture. The service call status includes the interaction status or non-interaction status that requires access to the backend service data layer corresponding to the second interaction object.
[0050] The data interaction module, based on a preset microservice architecture and the corresponding interaction interface of the microservice architecture, performs data interaction operations between the second interaction object and the target link service in the following specific ways:
[0051] When it is determined that the service call status is the non-interactive status, a standby flag is generated. The standby flag is used to indicate that there is no need to perform data interaction operations between the second interaction object and the target link service.
[0052] When the service call status is determined to be the interaction status, the target interaction data corresponding to the interaction status is determined according to the running data, and data interaction operations are performed on the second interaction object, the target interaction data and the target link service based on the preset microservice architecture and the interaction interface corresponding to the microservice architecture.
[0053] As an optional implementation, in a second aspect of the invention, the apparatus further includes:
[0054] The building module is used to build a first separation architecture for managing front-end data based on a preset resource server and application server, combined with a preset separation architecture building scheme. The resource server is used to manage front-end static resources, and the application server is used to manage front-end application functions.
[0055] The instruction processing module is used to monitor the front-end data according to the first separation architecture, obtain the data change information of the front-end data, and when the data change information indicates that it is necessary to perform link data interaction with the back-end program, generate a front-end addressing instruction corresponding to the data change information according to the first separation architecture and the data change information, and trigger the detection module to perform the operation of detecting whether there is an addressing instruction. The addressing instruction includes the front-end addressing instruction.
[0056] As an optional implementation, in the second aspect of the present invention, the construction module is further configured to, after the instruction processing module generates a front-end addressing instruction corresponding to the data change information based on the first separation architecture and the data change information, construct a second separation architecture for managing and controlling back-end data based on a preset microservice architecture and in conjunction with the separation architecture construction scheme.
[0057] The construction module is further configured to construct a target separation architecture for managing target link data based on the first separation architecture and the second separation architecture, wherein the target link data includes the front-end data and the back-end data;
[0058] The specific methods by which the detection module detects the presence of an addressing instruction include:
[0059] Based on the target separation architecture, detect whether there is an addressing instruction in the target link data.
[0060] As an optional implementation, in a second aspect of the present invention, the determining module is further configured to, after determining the addressing object, determine the access permission type of the addressing object based on the addressing object and the registration information corresponding to the target link service. The access permission type includes a full access permission type, a partial access permission type, or a no access permission type. The full access permission type is a type that allows calling all the target link services, the partial access permission type is a type that allows calling the target link services within a preset service range, and the no access permission type is a type that cannot call the target link service.
[0061] The device further includes:
[0062] The authorization module is used to authorize the addressing object to access the target link service when it is determined that the access type of the addressing object is the full access type or the partial access type;
[0063] The generation module is used to generate an addressing record for the addressing object based on the addressing type and the addressing object when it is determined that the access type of the addressing object is no access type. The addressing record is used to provide the processing program responsible for the no access type, so that the processing program can perform a preset data correction operation on the addressing object corresponding to the no access type based on the addressing record.
[0064] A third aspect of the present invention discloses another microservice-based device for managing and controlling discrete link data, the device comprising:
[0065] Memory containing executable program code;
[0066] A processor coupled to the memory;
[0067] The processor calls the executable program code stored in the memory to execute the microservice-based split link data management method disclosed in the first aspect of the present invention.
[0068] The fourth aspect of the present invention discloses a computer storage medium storing computer instructions, which, when invoked, are used to execute the microservice-based split link data management and control method disclosed in the first aspect of the present invention.
[0069] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0070] This invention provides a microservice-based method for managing and controlling separated link data. The method includes: detecting the existence of an addressing instruction, wherein the addressing instruction requests access to an interaction address of a target link service, and the interaction address is used to access the target link service; when the addressing instruction is detected, determining an addressing object, wherein the addressing object includes a first interaction object and a second interaction object, wherein the first interaction object is an object whose request end of the addressing instruction is front-end page data, and the second interaction object is an object whose request end of the addressing instruction is back-end service data; when the addressing object is determined to be the first interaction object, calling a link interaction service corresponding to the target interaction requirement in the target link service according to the target interaction requirement of the first interaction object, so as to realize the data interaction function between the first interaction object and the target link service through the link interaction service; when the addressing object is determined to be the second interaction object, performing a data interaction operation between the second interaction object and the target link service based on a preset microservice architecture and the corresponding interaction interface of the microservice architecture. As can be seen, implementing this invention can automatically execute programs matching different addressing objects, realizing the separation and management of front-end data and back-end data, as well as the separation and management of dynamic resources and static resources. This is beneficial to improving the efficiency and accuracy of front-end and back-end data management, and enhancing the service stability of back-end services. Attached Figure Description
[0071] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0072] Figure 1 This is a flowchart illustrating a microservice-based method for managing and controlling discrete link data, as disclosed in an embodiment of the present invention.
[0073] Figure 2 This is a flowchart illustrating another microservice-based method for managing and controlling discrete link data, as disclosed in an embodiment of the present invention.
[0074] Figure 3 This is a schematic diagram of the structure of a microservice-based split link data management and control device disclosed in an embodiment of the present invention;
[0075] Figure 4 This is a schematic diagram of another microservice-based split link data management and control device disclosed in an embodiment of the present invention;
[0076] Figure 5This is a schematic diagram of another microservice-based split link data management and control device disclosed in an embodiment of the present invention;
[0077] Figure 6 This is a schematic diagram of the architecture of a microservice-based split link data management method disclosed in an embodiment of the present invention. Detailed Implementation
[0078] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0079] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or end that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or ends.
[0080] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0081] This invention discloses a microservice-based method and apparatus for managing and controlling separated link data. It can automatically execute programs matching different addressing objects, achieving separate management and control of front-end and back-end data, as well as separate management and control of dynamic and static resources. This improves the efficiency and accuracy of front-end and back-end data management and enhances the service stability of back-end services. Detailed descriptions follow.
[0082] Example 1
[0083] Please see Figure 1 , Figure 1 This is a flowchart illustrating a microservice-based, decoupled link data management method disclosed in an embodiment of the present invention. Figure 1The described microservice-based method for managing and controlling separated link data can be applied to microservice-based devices for managing and controlling separated link data; however, this invention does not limit its application. Figure 1 As shown, this microservice-based method for managing and controlling decoupled link data may include the following operations:
[0084] 101. Detect whether there is an addressing instruction. The addressing instruction is used to request access to the interactive address of the target link service. The interactive address is used to access the target link service.
[0085] In this embodiment of the invention, the target link service can specifically be a REST service, and this embodiment of the invention does not limit it.
[0086] 102. When an addressing instruction is detected, the addressing object is determined. The addressing object includes the first interaction object and the second interaction object.
[0087] In this embodiment of the invention, the first interactive object is an object of front-end page data for the instruction requesting end of the addressing instruction, and the second interactive object is an object of back-end service data for the instruction requesting end of the addressing instruction.
[0088] 103. When the addressing object is determined to be the first interaction object, the link interaction service corresponding to the target interaction requirement in the target link service is called according to the target interaction requirement of the first interaction object.
[0089] In this embodiment of the invention, the link interaction service is used to realize the data interaction function between the first interaction object and the target link service; in practical applications, the front-end page data interacts with the link interaction service through HTTP REST, which helps to shield the impact of the back-end technology implementation on the front-end application.
[0090] 104. When the determined addressing object is the second interaction object, based on the preset microservice architecture and the corresponding interaction interface of the microservice architecture, perform data interaction operations between the second interaction object and the target link service.
[0091] In this embodiment of the invention, data interaction between backend data and backend microservices is carried out using RPC via Dubbo, which facilitates the splitting and aggregation of backend services. Furthermore, the use of RPC interfaces can improve the transmission efficiency of data, thereby increasing the speed of processing user requests.
[0092] In this embodiment of the invention, before step 104, based on a preset microservice architecture and the corresponding interaction interface of the microservice architecture, performs data interaction operations between the second interaction object and the target link service, the method may further include the following operations:
[0093] Collect and analyze the runtime data of the target link service to obtain the service call status corresponding to the target link service. The service call status includes the interactive or non-interactive status of the backend service data layer that needs to be accessed by the second interactive object.
[0094] The above-mentioned method for performing data interaction operations between the second interaction object and the target link service based on the preset microservice architecture and the corresponding interaction interface of the microservice architecture may specifically include the following operations:
[0095] When it is determined that the service call status is non-interactive, a standby flag is generated. The standby flag is used to indicate that there is no need to perform data interaction operations between the second interaction object and the target link service.
[0096] When the service call status is determined to be in an interactive state, the target interactive data corresponding to the interactive state is determined based on the running data, and data interaction operations are performed on the second interactive object, the target interactive data and the target link service based on the preset microservice architecture and the corresponding interactive interface of the microservice architecture.
[0097] It is evident that implementation Figure 1 The described microservice-based decoupled link data management method can automatically execute programs matching different addressing objects, realizing the separate management of front-end and back-end data, as well as the separate management of dynamic and static resources. This is beneficial to improving the efficiency and accuracy of front-end and back-end data management, and enhancing the service stability of back-end services.
[0098] In an optional embodiment, the method may further include the following operations:
[0099] Based on the preset resource server and application server, and combined with the preset separation architecture construction scheme, a first separation architecture is constructed for managing front-end data. The resource server is used to manage front-end static resources, and the application server is used to manage front-end application functions.
[0100] According to the first separation architecture, the front-end data is monitored to obtain data change information of the front-end data. When the data change information indicates that it is necessary to perform link data interaction with the back-end program, the front-end addressing instruction corresponding to the data change information is generated according to the first separation architecture and the data change information, and the above-mentioned operation of checking whether there is an addressing instruction is triggered. The addressing instruction includes the front-end addressing instruction.
[0101] In this optional embodiment, further, after generating the front-end addressing instruction corresponding to the data change information based on the first separation architecture and the data change information, the method may further include the following operations:
[0102] Based on the pre-defined microservice architecture and combined with the separation architecture construction scheme, a second separation architecture is constructed for managing and controlling backend data.
[0103] Based on the first separation architecture and the second separation architecture, a target separation architecture is constructed for managing target link data, which includes front-end data and back-end data.
[0104] The methods for detecting the presence of addressing instructions specifically include:
[0105] Based on the target separation architecture, detect whether there are addressing instructions in the target link data.
[0106] In this optional embodiment, it should be noted that, please refer to... Figure 6 , Figure 6 This is a schematic diagram of the architecture of a microservice-based split link data management and control method disclosed in an embodiment of the present invention. In practical applications, after the data interaction management and control service is started based on the preset service call method selection, it will automatically register a REST service registry. The front-end page and the back-end service address the REST service registry through the gateway. The back-end microservices interact with each other using RPC through Dubbo. This embodiment of the present invention does not impose any limitations.
[0107] As can be seen, in this optional embodiment, by constructing the first and second separation architectures, precise control over front-end data and back-end data is achieved, thereby constructing the final target separation architecture, realizing the decoupling of the front-end and back-end, solving the impact of mixed front-end and back-end data, and improving the flexibility and stability of back-end services; in addition, the separation structure is conducive to improving the flexibility and efficiency of front-end data calling back-end services.
[0108] Example 2
[0109] Please see Figure 2 , Figure 2 This is a flowchart illustrating another microservice-based method for managing and controlling separated link data, as disclosed in an embodiment of the present invention. Figure 2 The described microservice-based method for managing and controlling separated link data can be applied to microservice-based devices for managing and controlling separated link data; however, this invention does not limit its application. Figure 2 As shown, this microservice-based method for managing and controlling decoupled link data may include the following operations:
[0110] 201. Detect the existence of an addressing instruction. The addressing instruction is used to request the interaction address of the target link service, and the interaction address is used to access the target link service.
[0111] 202. When an addressing instruction is detected, the addressing object is determined. The addressing object includes the first interaction object and the second interaction object.
[0112] In this embodiment of the invention, after determining the addressing object in step 202, the method may further include the following operations:
[0113] Based on the registration information corresponding to the addressing object and the target link service, the access permission type of the addressing object is determined. The access permission type includes full access permission type, half access permission type or no access permission type. Full access permission type is the type that allows calling all target link services, half access permission type is the type that allows calling target link services within the preset service range, and no access permission type is the type that cannot call target link services.
[0114] When the access permission type of the addressed object is determined to be either full permission type or partial permission type, the addressed object is authorized to access the target link service;
[0115] When the access type of the addressed object is determined to be no access type, an addressing record is generated for the addressed object based on the addressing type and the addressed object. The addressing record is provided to the processing program responsible for the no access type so that the processing program can perform a preset data correction operation on the addressed object corresponding to the no access type based on the addressing record.
[0116] 203. When the addressing object is determined to be the first interaction object, the data interaction requirements of the first interaction object are obtained and used as the target interaction requirements of the first interaction object.
[0117] 204. Analyze the target interaction requirements to obtain the corresponding interaction types.
[0118] In this embodiment of the invention, the interaction type includes cross-business domain interaction types or non-cross-business domain interaction types.
[0119] 205. Based on the target interaction requirements and interaction type of the first interaction object, call the link interaction service in the target link service that corresponds to the target interaction requirements and interaction type.
[0120] 206. When the determined addressing object is the second interaction object, based on the preset microservice architecture and the corresponding interaction interface of the microservice architecture, perform data interaction operations between the second interaction object and the target link service.
[0121] For further descriptions of steps 201-202 and 206 in this embodiment of the invention, please refer to the other specific descriptions of steps 101-102 and 104 in Embodiment 1. These descriptions will not be repeated in this embodiment of the invention.
[0122] In this embodiment of the invention, optionally, after invoking the link interaction service corresponding to the target interaction requirement and interaction type in the target link service according to the target interaction requirement and interaction type of the first interaction object, the method may further include the following operations:
[0123] Based on the link interaction service, a requirement transformation operation is performed on the target interaction requirement to obtain the interaction parameters corresponding to the target interaction requirement. The interaction parameters include an interaction identifier, which is used to determine the target data layer for processing the interaction parameter. The target data layer belongs to the backend service data layer.
[0124] Based on the link interaction service and interaction identifier, the interaction parameters are forwarded to the target data layer. After receiving the feedback information, the feedback information is transmitted back to the data layer where the first interaction object is located. The feedback information is the information returned after the interaction parameters have been processed by the preset data layer.
[0125] It is evident that implementation Figure 2 The described microservice-based method for managing and controlling discrete link data determines the interaction type based on data interaction requirements before calling the link interaction service for the first interaction object, thereby calling the link interaction service corresponding to that interaction type, which improves the accuracy of the called service and reduces the occurrence of data call errors.
[0126] Example 3
[0127] Please see Figure 3 , Figure 3 This is a schematic diagram of a microservice-based split-link data management and control device disclosed in an embodiment of the present invention. The microservice-based split-link data management and control device can be a microservice-based split-link data management and control terminal, a microservice-based split-link data management and control device, a microservice-based split-link data management and control system, or a microservice-based split-link data management and control server. The microservice-based split-link data management and control server can be a local server, a remote server, or a cloud server (also known as a cloud server). When the microservice-based split-link data management and control server is a non-cloud server, it can communicate with the cloud server. This embodiment of the invention does not impose any limitations. Figure 3 As shown, the microservice-based split-link data management and control device may include a detection module 301, a determination module 302, a calling module 303, and a data interaction module 304, wherein:
[0128] The detection module 301 is used to detect whether there is an addressing instruction. The addressing instruction is used to request access to the interactive address of the target link service, and the interactive address is used to access the target link service.
[0129] The determination module 302 is used to determine the addressing object when an addressing instruction is detected. The addressing object includes a first interaction object and a second interaction object. The first interaction object is the object whose instruction request end is the front-end page data, and the second interaction object is the object whose instruction request end is the back-end service data.
[0130] When module 303 determines that the addressing object is the first interaction object, it calls the link interaction service corresponding to the target interaction requirement in the target link service according to the target interaction requirement of the first interaction object, so as to realize the data interaction function between the first interaction object and the target link service through the link interaction service.
[0131] The data interaction module 304 is used to perform data interaction operations between the second interaction object and the target link service based on the preset microservice architecture and the corresponding interaction interface of the microservice architecture when the determined addressing object is the second interaction object.
[0132] It is evident that implementation Figure 3 The described microservice-based split link data management and control device can automatically execute programs matching different addressing objects, realizing the separate management and control of front-end data and back-end data, as well as the separate management and control of dynamic resources and static resources. This is conducive to improving the management and control efficiency and accuracy of front-end and back-end data, and improving the service stability of back-end services.
[0133] In an optional embodiment, such as Figure 4 As shown, the device may further include an acquisition module 305 and an analysis module 306, wherein:
[0134] The acquisition module 305 is used to acquire the data interaction requirements of the first interactive object as the target interaction requirements of the first interactive object before the calling module 303 calls the link interaction service in the target link service based on the target interaction requirements of the first interactive object and the interaction type corresponding to the target interaction requirements.
[0135] Analysis module 306 is used to analyze the target interaction requirements and obtain the interaction types corresponding to the target interaction requirements. The interaction types include cross-business domain interaction types or non-cross-business domain interaction types.
[0136] The specific methods by which module 303 invokes the link interaction service corresponding to the target interaction requirement in the target link service according to the target interaction requirement of the first interaction object include:
[0137] Based on the target interaction requirements of the first interactive object obtained by the acquisition module 305 and the interaction type determined by the analysis module 306, the link interaction service corresponding to the target interaction requirements and interaction type in the target link service is called.
[0138] In this optional embodiment, the device may further include a data conversion module 307, wherein:
[0139] The data conversion module 307 is used to perform a requirement conversion operation on the target interaction requirement based on the link interaction service corresponding to the target interaction requirement and interaction type in the target link service after the calling module 303 calls the link interaction service based on the target interaction requirement and interaction type of the first interaction object. The interaction parameter is an interaction identifier, which is used to determine the target data layer for processing the interaction parameter. The target data layer belongs to the backend service data layer.
[0140] The data interaction module 304 is also used to forward the interaction parameters to the target data layer according to the link interaction service and the interaction identifier, and after receiving the feedback information, transmit the feedback information back to the data layer where the first interaction object is located. The feedback information is the information fed back after the interaction parameters have been processed by the preset data layer.
[0141] In this optional embodiment, the device may further include a data processing module 308, wherein:
[0142] The data processing module 308 is used to collect the running data of the target link service and analyze the running data before the data interaction module 304 performs data interaction operations between the second interaction object and the target link service based on the preset microservice architecture and the corresponding interaction interface of the microservice architecture. The service call status includes the interaction status or non-interaction status of needing to access the backend service data layer corresponding to the second interaction object.
[0143] The data interaction module 304, based on a preset microservice architecture and the corresponding interaction interface, performs data interaction operations between the second interaction object and the target link service in the following specific ways:
[0144] When it is determined that the service call status is non-interactive, a standby flag is generated. The standby flag is used to indicate that there is no need to perform data interaction operations between the second interaction object and the target link service.
[0145] When the service call status is determined to be in an interactive state, the target interactive data corresponding to the interactive state is determined based on the running data, and data interaction operations are performed on the second interactive object, the target interactive data and the target link service based on the preset microservice architecture and the corresponding interactive interface of the microservice architecture.
[0146] It is evident that implementation Figure 4The described microservice-based split link data management and control device determines the interaction type based on data interaction requirements before calling the link interaction service for the first interaction object, thereby calling the link interaction service corresponding to the interaction type, which improves the accuracy of the called service and reduces the occurrence of data call errors.
[0147] In another alternative embodiment, such as Figure 4 As shown, the device may further include a construction module 309 and an instruction processing module 310, wherein:
[0148] Module 309 is used to construct a first separation architecture for managing front-end data based on preset resource servers and application servers, combined with preset separation architecture construction schemes. The resource server is used to manage front-end static resources, and the application server is used to manage front-end application functions.
[0149] The instruction processing module 310 is used to monitor the front-end data according to the first separation architecture, obtain the data change information of the front-end data, and when the data change information indicates that it is necessary to perform link data interaction with the back-end program, generate the front-end addressing instruction corresponding to the data change information according to the first separation architecture and the data change information, and trigger the detection module 301 to perform the above-mentioned operation of detecting whether there is an addressing instruction. The addressing instruction includes the front-end addressing instruction.
[0150] Furthermore, the construction module 309 is also used by the instruction processing module 310 to generate the front-end addressing instruction corresponding to the data change information based on the first separation architecture and the data change information, and then, based on the preset microservice architecture and the separation architecture construction scheme, to construct the second separation architecture for managing and controlling the back-end data.
[0151] The construction module 309 is also used to construct a target separation architecture for managing target link data, which includes front-end data and back-end data, based on the first separation architecture and the second separation architecture.
[0152] The specific methods by which the detection module 301 detects the presence of an addressing instruction include:
[0153] Based on the target separation architecture, detect whether there are addressing instructions in the target link data.
[0154] Optionally, the determining module 302 is further configured to, after determining the addressing object, determine the access permission type of the addressing object based on the registration information corresponding to the addressing object and the target link service. The access permission type includes full access permission type, half access permission type or no access permission type. The full access permission type is the type that allows calling all target link services, the half access permission type is the type that allows calling target link services within a preset service range, and the no access permission type is the type that cannot call target link services.
[0155] like Figure 4 As shown, the device may also include an authorization module 311 and a generation module 312:
[0156] The authorization module 311 is used to authorize the addressing object to access the target link service when it is determined that the access type of the addressing object is full access type or half access type.
[0157] The generation module 312 is used to generate an addressing record for the addressing object based on the addressing type and the addressing object when the access type of the addressing object is determined to be no access type. The addressing record is used to provide the processing program responsible for the no access type so that the processing program can perform a preset data correction operation on the addressing object corresponding to the no access type based on the addressing record.
[0158] It is evident that implementation Figure 4 The described microservice-based split-link data management device achieves precise control over front-end and back-end data by constructing a first and second split architecture, thereby building the final target split architecture, decoupling the front-end and back-end, solving the impact of mixed front-end and back-end data, and improving the flexibility and stability of back-end services. In addition, the split structure is conducive to improving the flexibility and efficiency of front-end data calling back-end services.
[0159] Example 4
[0160] Please see Figure 5 , Figure 5 This is a schematic diagram of another microservice-based split-link data management and control device disclosed in an embodiment of the present invention. Figure 5 As shown, the microservice-based decoupled link data management and control device may include:
[0161] Memory 401 storing executable program code;
[0162] Processor 402 coupled to memory 401;
[0163] The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the microservice-based split link data management method described in Embodiment 1 or Embodiment 2 of the present invention.
[0164] Example 5
[0165] This invention discloses a computer storage medium storing computer instructions. When these computer instructions are invoked, they are used to execute the steps in the microservice-based split link data management method described in Embodiment 1 or Embodiment 2 of this invention.
[0166] Example 6
[0167] This invention discloses a computer program product, which includes a non-transitory computer storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps in the microservice-based split link data management method described in Embodiment 1 or Embodiment 2.
[0168] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0169] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, 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 can be stored in a computer storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0170] Finally, it should be noted that the microservice-based split link data management method and apparatus disclosed in the embodiments of the present invention are merely preferred embodiments of the present invention and are only used to illustrate the technical solutions of the present invention, not to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for managing and controlling decoupled link data based on microservices, characterized in that, The method includes: Detect the presence of an addressing instruction, wherein the addressing instruction is used to request an interaction address for accessing the target link service, and the interaction address is used to access the target link service; When the addressing instruction is detected, the addressing object is determined. The addressing object includes a first interaction object and a second interaction object. The first interaction object is the object whose instruction request end is front-end page data, and the second interaction object is the object whose instruction request end is back-end service data. When the addressing object is determined to be the first interaction object, according to the target interaction requirements of the first interaction object, the link interaction service corresponding to the target interaction requirements in the target link service is called, so as to realize the data interaction function between the first interaction object and the target link service through the link interaction service; When the addressing object is determined to be the second interaction object, based on the preset microservice architecture and the interaction interface corresponding to the microservice architecture, data interaction operations are performed between the second interaction object and the target link service.
2. The method for managing and controlling separated link data based on microservices according to claim 1, characterized in that, Before invoking the link interaction service corresponding to the target interaction requirement in the target link service according to the target interaction requirement of the first interaction object, the method further includes: Obtain the data interaction requirements of the first interaction object, and use them as the target interaction requirements of the first interaction object; Analyze the target interaction requirements to obtain the corresponding interaction types, which include cross-business domain interaction types or non-cross-business domain interaction types. The step of invoking the link interaction service corresponding to the target interaction requirement in the target link service according to the target interaction requirement of the first interaction object includes: Based on the target interaction requirements of the first interaction object and the interaction type, the link interaction service corresponding to the target interaction requirements and the interaction type in the target link service is invoked.
3. The method for managing and controlling separated link data based on microservices according to claim 2, characterized in that, After invoking the link interaction service corresponding to the target interaction requirement and the interaction type in the target link service according to the target interaction requirement and the interaction type of the first interaction object, the method further includes: According to the link interaction service, a requirement transformation operation is performed on the target interaction requirement to obtain the interaction parameters corresponding to the target interaction requirement. The interaction parameters include an interaction identifier, which is used to determine the target data layer for processing the interaction parameter. The target data layer belongs to the backend service data layer. Based on the link interaction service and the interaction identifier, the interaction parameters are forwarded to the target data layer, and after receiving the feedback information, the feedback information is transmitted back to the data layer where the first interaction object is located. The feedback information is the information fed back after the interaction parameters have been processed by a preset data layer.
4. The method for managing and controlling separated link data based on microservices according to claim 1, characterized in that, Before performing data interaction operations between the second interaction object and the target link service based on the preset microservice architecture and the corresponding interaction interface of the microservice architecture, the method further includes: Collect the running data of the target link service and analyze the running data to obtain the service call status corresponding to the target link service. The service call status includes the interactive status or non-interactive status that requires access to the backend service data layer corresponding to the second interactive object. The process of performing data interaction operations between the second interaction object and the target link service based on the preset microservice architecture and the corresponding interaction interface of the microservice architecture includes: When it is determined that the service call status is the non-interactive status, a standby flag is generated. The standby flag is used to indicate that there is no need to perform data interaction operations between the second interaction object and the target link service. When the service call status is determined to be the interaction status, the target interaction data corresponding to the interaction status is determined according to the running data, and data interaction operations are performed on the second interaction object, the target interaction data and the target link service based on the preset microservice architecture and the interaction interface corresponding to the microservice architecture.
5. The method for managing and controlling separated link data based on microservices according to claim 1, characterized in that, The method further includes: Based on the preset resource server and application server, and combined with the preset separation architecture construction scheme, a first separation architecture for managing and controlling front-end data is constructed. The resource server is used to manage and control front-end static resources, and the application server is used to manage and control front-end application functions. According to the first separation architecture, the front-end data is monitored to obtain data change information of the front-end data. When the data change information indicates that it is necessary to perform link data interaction with the back-end program, a front-end addressing instruction corresponding to the data change information is generated according to the first separation architecture and the data change information, and the operation of detecting whether there is an addressing instruction is triggered. The addressing instruction includes the front-end addressing instruction.
6. The method for managing and controlling separated link data based on microservices according to claim 5, characterized in that, After generating the front-end addressing instruction corresponding to the data change information based on the first separation architecture and the data change information, the method further includes: Based on the preset microservice architecture and combined with the separation architecture construction scheme, a second separation architecture for managing and controlling backend data is constructed. Based on the first separation architecture and the second separation architecture, a target separation architecture for managing target link data is constructed, wherein the target link data includes the front-end data and the back-end data; And the detection of the presence of an addressing instruction includes: Based on the target separation architecture, detect whether there is an addressing instruction in the target link data.
7. The method for managing and controlling microservice-based decoupled link data according to claim 3 or 6, characterized in that, After determining the addressing object, the method further includes: Based on the addressing object and the registration information corresponding to the target link service, the access permission type of the addressing object is determined. The access permission type includes full access permission type, half access permission type or no access permission type. The full access permission type is the type that allows calling all the target link services. The half access permission type is the type that allows calling the target link services within a preset service range. The no access permission type is the type that cannot call the target service. When the access permission type of the addressing object is determined to be the full permission type or the half permission type, the addressing object is authorized to access the target link service; When the access type of the addressing object is determined to be no access type, an addressing record is generated for the addressing object based on the access type and the addressing object. The addressing record is provided to the processing program responsible for the no access type so that the processing program can perform a preset data correction operation on the addressing object corresponding to the no access type based on the addressing record.
8. A microservice-based decoupled link data management and control device, characterized in that, The device includes: The detection module is used to detect whether there is an addressing instruction, which is used to request access to the interaction address of the target link service, and the interaction address is used to access the target link service. The determination module is used to determine the addressing object when the addressing instruction is detected. The addressing object includes a first interaction object and a second interaction object. The first interaction object is the object whose instruction request end of the addressing instruction is front-end page data, and the second interaction object is the object whose instruction request end of the addressing instruction is back-end service data. When the addressing object is determined to be the first interaction object, the calling module calls the link interaction service corresponding to the target interaction requirement in the target link service according to the target interaction requirement of the first interaction object, so as to realize the data interaction function between the first interaction object and the target link service through the link interaction service; The data interaction module is used to perform data interaction operations between the second interaction object and the target link service based on a preset microservice architecture and the interaction interface corresponding to the microservice architecture when the determined addressing object is the second interaction object.
9. A microservice-based decoupled link data management and control device, characterized in that, The device includes: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the microservice-based split link data management method as described in any one of claims 1-7.
10. A computer storage medium, characterized in that, The computer storage medium stores computer instructions, which, when invoked, are used to execute the microservice-based split link data management and control method as described in any one of claims 1-7.
Citation Information
Patent Citations
Data processing method and device, electronic equipment and storage medium
CN113343150A
Web data interactive system and interactive method and electronic equipment
CN113590998A