Network agent implementation method and device based on plug-in architecture and storage medium

By detecting and executing plug-in configuration in the network proxy, the problem in the prior art that plug-ins need to adapt to all interfaces is solved, the efficiency and flexibility of business updates are achieved, and processing efficiency is improved.

CN120658793APending Publication Date: 2025-09-16CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410295257.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-14
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

In the existing technology, plug-ins for data processing services need to adapt to all common interfaces, and plug-ins cannot be developed for specific services. As a result, network agents need to be replaced when services are updated, affecting processing efficiency.

Method used

By detecting business and plug-in configurations in the network proxy, pausing the original execution process and executing the plug-in logic, and continuing to execute the original process after the plug-in logic ends, plug-in business updates are implemented and network proxy replacement is avoided.

Benefits of technology

It enables targeted business updates without affecting the original business operations, improves business processing efficiency and the convenience of plug-in development, and reduces the cost of business updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120658793A_ABST
    Figure CN120658793A_ABST
Patent Text Reader

Abstract

The invention provides a network agent implementation method and device based on a plug-in architecture and a storage medium, and is applied to the field of computer networks. The method comprises the steps that a network agent is started and operated, processing requests of services are received based on the network agent, and the network agent can receive the processing requests of different types of services; whether plug-in development exists in the service is judged based on the configuration file of the service, if yes, plug-in configuration detection is carried out in the execution process of the processing request of the service, and a node with plug-in configuration is determined as a pause node; stopping executing the processing request of the service at the pause node, executing plug-in logic corresponding to plug-in configuration, and continuing to execute the processing request of the service on the basis of the pause node of the processing request of the service after the plug-in logic is executed; and if not, executing the processing request of the service based on the execution flow of the processing request of the service and the network agent. According to the method, the technical effect of improving the business processing efficiency is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer networks, and in particular to a method, device, and storage medium for implementing a network proxy based on a plug-in architecture. Background Art

[0002] With the development of the information age, the update frequency of data processing services has increased. When the applications corresponding to the data processing services are running online, how to complete the application updates and function additions without affecting the business operations has become an important direction of existing technical research.

[0003] In the existing technology, when the application corresponding to the data processing business needs to be updated, the application is updated through a plug-in, a common interface of the application is defined, and the common interface is used to expand and adapt different components and different application versions required by the application; thereby realizing the functional update of the application and adding additional data processing business to the original data processing business.

[0004] In the existing technology, if a plug-in needs to be expanded, the plug-in needs to adapt to all interfaces at the same time, and it is not possible to develop a specific plug-in for a specific business. At the same time, in the existing technology, when providing proxy services for data processing businesses through network proxies, adding functions to the proxy services requires coding to implement the interfaces and then replacing the original proxy services. It is impossible to achieve plug-in business expansion and development without replacing the original proxy services. Therefore, in the existing technology, there is a technical problem of low business processing efficiency. Summary of the Invention

[0005] The present application provides a network proxy implementation method, device and storage medium based on a plug-in architecture to solve the technical problem of low business processing efficiency in the prior art.

[0006] In a first aspect, the present application provides a method for implementing a network proxy based on a plug-in architecture, comprising:

[0007] Starting and running a network proxy, and receiving a processing request for a service based on the network proxy, wherein the network proxy can receive processing requests for different types of services;

[0008] Based on the business configuration file, determine whether the business has plug-in development. If so, perform plug-in configuration detection during the execution of the business processing request, and determine the node with the plug-in configuration as the pause node in the execution of the business processing request; stop executing the business processing request at the pause node, and execute the plug-in logic corresponding to the plug-in configuration. After the execution of the plug-in logic is completed, continue to execute the business processing request based on the pause node of the business processing request;

[0009] If not, the processing request of the business is executed based on the execution flow of the processing request of the business and the network agent.

[0010] Optionally, judging whether a business has plug-in development based on the business configuration file includes:

[0011] Read the business configuration file and obtain the business configuration information, and determine whether the configuration information contains identification information for identifying plug-in development based on the business configuration information; if so, determine that the business has plug-in development, if not, determine that the business does not have plug-in development.

[0012] Optionally, execute the plugin logic corresponding to the plugin configuration, including:

[0013] Determine the storage address of the plug-in logic corresponding to the plug-in configuration in the storage database based on the business configuration information; wherein the storage database is used to store the plug-in logic corresponding to each type of business;

[0014] Based on the storage address of the plug-in logic in the storage database, the plug-in logic is read from the storage database and executed.

[0015] Optionally, performing plug-in configuration detection during the execution of the service processing request and determining a node having the plug-in configuration as a pause node during the execution of the service processing request includes at least one of the following:

[0016] Before executing a service processing request based on a network proxy, a plug-in configuration detection is performed. If a plug-in configuration before service processing is detected, the node with the plug-in configuration is determined as a pause node before service processing.

[0017] Perform plug-in configuration detection when a business processing request is being executed. If a plug-in configuration is detected during business processing, the node with the plug-in configuration is determined as a paused node in business processing.

[0018] When the business processing request is completed and the network agent does not receive a new business processing request, the plug-in configuration is detected. If the plug-in configuration after the business processing is completed is detected, the node of the plug-in configuration after the business processing is completed is determined as the pause node after the business processing is completed.

[0019] Optionally, after the business processing request is completed, the following steps are further included:

[0020] If the network agent receives an agent termination signal, it determines whether there is a plug-in configuration before the network agent is terminated. If there is a plug-in configuration before the network agent is terminated, the plug-in logic corresponding to the plug-in configuration before the network agent is terminated is executed, and the network agent is terminated after the plug-in logic is executed.

[0021] Optionally, before starting and running the network proxy and processing a service request received by the network proxy, the method further includes:

[0022] Determine whether there is a new type of data processing business;

[0023] If so, a business reminder is initiated based on the newly added data processing business type, and the plug-in logic corresponding to the newly added data processing business type is obtained; wherein the business reminder is used to instruct the development department to develop a plug-in based on the newly added data processing business type and determine the plug-in logic corresponding to the newly added data processing business type;

[0024] The plug-in logic corresponding to the newly added type of data processing business is saved in the storage database, and the business configuration file is updated based on the plug-in logic and the storage address of the plug-in logic in the storage database.

[0025] Optionally, start and run a network proxy, including:

[0026] Start the network proxy, configure the traffic forwarding path of the network proxy based on the network proxy, and detect whether there is a plug-in configuration after the traffic forwarding path configuration of the network proxy is completed. If so, execute the plug-in logic corresponding to the plug-in configuration, and run the network proxy after the plug-in logic execution is completed.

[0027] In a second aspect, the present application provides a network proxy implementation device based on a plug-in architecture, comprising:

[0028] An acquisition module is used to start and run a network agent, and receive a processing request for a service based on the network agent, wherein the network agent can receive processing requests for different types of services;

[0029] A first processing module is configured to determine whether a plug-in is developed for the business based on a business configuration file. If so, the plug-in configuration is detected during the execution of the business processing request, and the node where the plug-in configuration exists is determined as a pause node in the execution of the business processing request; the execution of the business processing request is stopped at the pause node, and the plug-in logic corresponding to the plug-in configuration is executed. After the execution of the plug-in logic is completed, the execution of the business processing request is resumed based on the pause node of the business processing request;

[0030] The second processing module is used to execute the processing request of the business based on the execution flow of the processing request of the business and the network agent when there is no plug-in development in the business.

[0031] Optionally, the device is also used to:

[0032] Read the business configuration file and obtain the business configuration information, and determine whether the configuration information contains identification information for identifying plug-in development based on the business configuration information; if so, determine that the business has plug-in development, if not, determine that the business does not have plug-in development.

[0033] Optionally, the device is also used to:

[0034] Determine the storage address of the plug-in logic corresponding to the plug-in configuration in the storage database based on the business configuration information; wherein the storage database is used to store the plug-in logic corresponding to each type of business;

[0035] Based on the storage address of the plug-in logic in the storage database, the plug-in logic is read from the storage database and executed.

[0036] Optionally, the device is also used to:

[0037] Before executing a service processing request based on a network proxy, a plug-in configuration detection is performed. If a plug-in configuration before service processing is detected, the node with the plug-in configuration is determined as a pause node before service processing.

[0038] Perform plug-in configuration detection when a business processing request is being executed. If a plug-in configuration is detected during business processing, the node with the plug-in configuration is determined as a paused node in business processing.

[0039] When the business processing request is completed and the network agent does not receive a new business processing request, the plug-in configuration is detected. If the plug-in configuration after the business processing is completed is detected, the node of the plug-in configuration after the business processing is completed is determined as the pause node after the business processing is completed.

[0040] Optionally, the device is also used to:

[0041] If the network agent receives an agent termination signal, it determines whether there is a plug-in configuration before the network agent is terminated. If there is a plug-in configuration before the network agent is terminated, the plug-in logic corresponding to the plug-in configuration before the network agent is terminated is executed, and the network agent is terminated after the plug-in logic is executed.

[0042] Optionally, the device is also used to:

[0043] Determine whether there is a new type of data processing business;

[0044] If so, a business reminder is initiated based on the newly added data processing business type, and the plug-in logic corresponding to the newly added data processing business type is obtained; wherein the business reminder is used to instruct the development department to develop a plug-in based on the newly added data processing business type and determine the plug-in logic corresponding to the newly added data processing business type;

[0045] The plug-in logic corresponding to the newly added type of data processing business is saved in the storage database, and the business configuration file is updated based on the plug-in logic and the storage address of the plug-in logic in the storage database.

[0046] Optionally, the device is also used to:

[0047] Start the network proxy, configure the traffic forwarding path of the network proxy based on the network proxy, and detect whether there is a plug-in configuration after the traffic forwarding path configuration of the network proxy is completed. If so, execute the plug-in logic corresponding to the plug-in configuration, and run the network proxy after the plug-in logic execution is completed.

[0048] A third aspect of the present application provides a network proxy implementation device based on a plug-in architecture, comprising:

[0049] processor and memory;

[0050] Memory stores computer-executable instructions;

[0051] The processor executes the computer-executable instructions stored in the memory, so that the network proxy implementation device based on the plug-in architecture executes any one of the network proxy implementation methods based on the plug-in architecture in the first aspect.

[0052] In a fourth aspect, the present application provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, they are used to implement a network proxy implementation method based on a plug-in architecture as described in any one of the first aspects.

[0053] The present application provides a network proxy implementation method, device, and storage medium based on a plug-in architecture. The method includes: starting and running a network proxy, receiving a service processing request based on the network proxy, wherein the network proxy can receive service processing requests of different types; determining whether a service has plug-in development based on the service configuration file; if so, performing a plug-in configuration check during the execution of the service processing request, and determining the node with the plug-in configuration as a pause node during the execution of the service processing request; stopping the execution of the service processing request at the pause node, and executing the plug-in logic corresponding to the plug-in configuration; after the execution of the plug-in logic is completed, continuing the execution of the service processing request based on the pause node of the service processing request; if not, executing the service processing request based on the execution process of the service processing request and the network proxy. Compared with the existing technology, in which plug-in updates are performed on services based on general interfaces, resulting in the inability to update services in a targeted manner and the need to replace the network agent when updating services, the present application detects the services and the plug-in configurations of the network agent during the network agent process; suspends the original execution process when the plug-in configuration is detected, and executes the plug-in logic based on the detected plug-in configuration, and continues to execute the original execution process after the plug-in logic is executed; thereby, when there is an update to the business, the plug-in logic corresponding to the updated part is executed without affecting the operation of the original business; at the same time, each type of business is detected, and the plug-in configuration corresponding to different types of businesses is obtained to realize targeted data processing of the business; thereby solving the problem that the business cannot be updated in a targeted manner, and using plug-ins to obtain updates to the network agent, avoiding the need to replace the corresponding network agent after the business is updated; thereby achieving the technical effect of improving business processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0055] Figure 1 The process of implementing the network proxy method based on the plug-in architecture provided in the embodiment of the present application Figure 1 ;

[0056] Figure 2 The process of implementing the network proxy method based on the plug-in architecture provided in the embodiment of the present application Figure 2 ;

[0057] Figure 3 The process of implementing the network proxy method based on the plug-in architecture provided in the embodiment of the present application Figure 3 ;

[0058] Figure 4 The process of implementing the network proxy method based on the plug-in architecture provided in the embodiment of the present application Figure 4 ;

[0059] Figure 5 A schematic diagram of the structure of a network proxy implementation device based on a plug-in architecture provided in an embodiment of the present application;

[0060] Figure 6 This is a hardware structure diagram of a network proxy implementation device based on a plug-in architecture provided in an embodiment of the present application.

[0061] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0062] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0063] In the prior art, when the application corresponding to the data processing business needs to be updated, in order to reduce the impact on the business operation, it will be updated through a plug-in; a general business interface is defined, and the components and updated versions required by the application are expanded and adapted through the general interface; thereby updating the application and being able to perform additional data processing on the basis of the original data processing business. Since the plug-in of the data processing business needs to use a general interface, if a plug-in needs to be developed for a certain business, the plug-in of this business needs to adapt to all general interfaces, so it is impossible to develop a plug-in for a certain business; when the business is updated, the network agent that provides services for the business needs to adapt to the updated business, so the original network agent will be replaced, which limits the business update and the update of the network agent; thus leading to the technical problem of low business processing efficiency.

[0064] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0065] Figure 1 The process of implementing the network proxy method based on the plug-in architecture provided in the embodiment of the present application Figure 1 .like Figure 1As shown, the network proxy implementation method based on the plug-in architecture provided in the embodiment of the present application includes:

[0066] S101, start and run the network proxy, and receive a service request based on the network proxy;

[0067] In this embodiment, the network proxy can receive processing requests for different types of services;

[0068] Optionally, a specific implementation method of starting and running the network proxy is:

[0069] Start the network proxy, configure the traffic forwarding path of the network proxy based on the network proxy, and detect whether there is a plug-in configuration after the traffic forwarding path configuration of the network proxy is completed. If so, execute the plug-in logic corresponding to the plug-in configuration, and run the network proxy after the plug-in logic execution is completed.

[0070] In this embodiment, after the network proxy is started and operated, the network proxy will receive processing requests for one or more types of services, and the network proxy can process processing requests for multiple services.

[0071] In the first example, the business received by the network proxy does not have a persistence function. When the business is restarted, the business data can be restored based on the plug-in for data recovery; the network proxy and the business can be bound and determined as a group of services. When the business is restarted, the corresponding network proxy will also be restarted. After the network proxy is restarted, if local data recovery is detected, the local data can be restored to the business with the processing request in the form of a network request based on the plug-in logic corresponding to the data recovery plug-in.

[0072] S102: Determine whether a plug-in is developed for the business based on the business configuration file. If so, perform plug-in configuration detection during the execution of the business processing request, and determine the node where the plug-in configuration exists as a pause node in the execution of the business processing request; stop executing the business processing request at the pause node, and execute the plug-in logic corresponding to the plug-in configuration. After the execution of the plug-in logic is completed, continue executing the business processing request based on the pause node of the business processing request;

[0073] In this embodiment, plug-in configuration detection is performed during the execution of the business processing request, and message data during the execution of the processing request can also be obtained through an event-driven message interception mechanism; and the message data that can trigger the event drive is determined based on the information in the configuration file, that is, whether there is a plug-in configuration, and when the plug-in configuration is detected, the plug-in logic corresponding to the plug-in configuration is executed based on the event-driven message interception mechanism, and after the plug-in logic ends, the intercepted message data is transmitted according to the execution process of the business processing request.

[0074] Optionally, a specific implementation method of determining whether a business has plug-in development based on the business configuration file is:

[0075] Read the business configuration file and obtain the business configuration information, and determine whether the configuration information contains identification information for identifying plug-in development based on the business configuration information; if so, determine that the business has plug-in development, if not, determine that the business does not have plug-in development.

[0076] Optionally, a specific implementation of the plug-in logic corresponding to the plug-in configuration is:

[0077] Determine the storage address of the plug-in logic corresponding to the plug-in configuration in the storage database based on the business configuration information; wherein the storage database is used to store the plug-in logic corresponding to each type of business;

[0078] Based on the storage address of the plug-in logic in the storage database, the plug-in logic is read from the storage database and executed.

[0079] In this embodiment, one implementation method for reading and executing the plug-in logic from a stored database may be: reading the storage address of the plug-in logic from the database; downloading the plug-in logic code or script from the database based on the read storage address; loading the downloaded plug-in logic code or script into the running program of the network agent, and executing the plug-in logic. It should be noted that when executing the plug-in logic, it is necessary to ensure the security and reliability of the plug-in logic. In this application, security measures can be taken for security protection before executing the plug-in logic; security checks can be performed on the plug-in logic, and the permissions of the plug-in logic can be restricted, thereby ensuring the security of business data in the process of the network agent providing proxy services for the business.

[0080] S103: If not, execute the service processing request based on the execution flow of the service processing request and the network agent.

[0081] In this embodiment, when there is no plug-in development in the business, the network proxy receives the business processing request from the client, analyzes the business processing request based on the business processing request, and sends the processing request to the back-end business processing system corresponding to the business; after the back-end business processing system accepts the business processing request, it processes it according to the business logic and generates the result after the business processing; the back-end business processing system returns the business processing result to the network proxy; the network proxy receives the business processing result, forwards or stores the business processing result, and returns the processing result to the client that initiated the business processing request.

[0082] The present application provides a method for implementing a network proxy based on a plug-in architecture. The method includes: starting and running a network proxy, receiving a service processing request based on the network proxy, wherein the network proxy can receive service processing requests of different types; judging whether a service has plug-in development based on the service configuration file; if so, performing a plug-in configuration check during the execution of the service processing request, and determining the node with the plug-in configuration as a pause node during the execution of the service processing request; stopping the execution of the service processing request at the pause node, and executing the plug-in logic corresponding to the plug-in configuration; after the execution of the plug-in logic is completed, continuing the execution of the service processing request based on the pause node of the service processing request; if not, executing the service processing request based on the execution process of the service processing request and the network proxy. Compared with the prior art, which designs plug-ins for business updates based on general interfaces, the existing business cannot be updated in a targeted manner, and the business update requires the replacement of the network agent, which affects the business processing efficiency. The present application detects the plug-in configuration after the business and network agent are updated, and in response to the detected plug-in configuration, obtains the address of the plug-in logic storage corresponding to the plug-in configuration from the corresponding configuration file, thereby obtaining and loading the plug-in logic, and completing the updated additional data processing business by executing the plug-in logic; and suspends the execution of the business processing request when the plug-in configuration is detected, and marks the corresponding pause node; after the execution of the plug-in logic is completed, the original processing request is continued at the pause node; thereby allowing the plug-in logic to be dynamically inserted during the business execution process to achieve the expansion of business functions or customization requirements; and can implement the new data processing requirements of the network agent corresponding to the business in the form of a plug-in; thereby achieving business updates without replacing the network agent; solving the technical problem of low business processing efficiency in the prior art; thereby achieving the technical effect of improving business processing efficiency.

[0083] Figure 2 The process of implementing the network proxy method based on the plug-in architecture provided in the embodiment of the present application Figure 2 , Figure 3 The process of implementing the network proxy method based on the plug-in architecture provided in the embodiment of the present application Figure 3 In the above Figure 1 Based on the embodiment shown, Figure 2 As shown, a specific generation method of performing plug-in configuration detection during the execution of the service processing request in the above step 102 and determining the node with the plug-in configuration as the pause node during the execution of the service processing request includes at least one of the following:

[0084] S201: before executing a service processing request based on a network proxy, performing a plug-in configuration detection, if a plug-in configuration before service processing is detected, determining the node with the plug-in configuration as a pause node before service processing;

[0085] In this embodiment, if there is an additional data processing business before the business processing, the addition of the additional data processing business can be achieved by adding a plug-in configuration and its corresponding plug-in logic; by detecting the plug-in configuration, and determining the node where the plug-in configuration existed before the business processing as the pause node before the business processing; then executing the plug-in logic, and continuing to execute the business processing request based on the pause node after the plug-in logic is executed. In the second example, if it is necessary to obtain the number of times the business processing request is initiated, a plug-in configuration for request link counting can be added before the business processing, and the plug-in logic corresponding to the plug-in configuration can be saved in the storage database; when performing plug-in detection, by obtaining the business processing request, plug-in detection is performed, and the plug-in configuration for request connection counting that existed before the business processing is detected; thereby executing the corresponding plug-in logic for request counting; the function of counting the business processing request is realized, and the business processing can continue after the processing is completed, without affecting the normal processing flow of the business.

[0086] S202: Perform plug-in configuration detection while a service processing request is being executed. If a plug-in configuration in service processing is detected, determine the node with the plug-in configuration as a paused node in service processing.

[0087] In this embodiment, a plug-in configuration is detected at the beginning of business processing. When the plug-in configuration is detected, the plug-in logic corresponding to the plug-in configuration can be called through the plug-in configuration and the configuration file; after the plug-in logic ends, the business processing needs to be resumed, and a pause node for the business processing needs to be determined for resuming the business processing. In particular, a state management mechanism and a task scheduling mechanism can be added when executing the plug-in logic and determining the pause node; when the plug-in configuration is detected, while determining the pause node, it is necessary to modify the business processing state, set the business processing state to the pause state, and save the business data of the business processing at the pause node; at the same time, the plug-in logic is called according to the plug-in configuration, and the state of the plug-in logic is set to the execution state, then the plug-in logic can be executed, and after the execution of the plug-in logic is completed, the plug-in logic can be set to the completion state; the business processing can modify the pause state to the execution state according to the completion state of the plug-in logic, and continue the business processing according to the pause node and the saved business data.

[0088] S203. When the processing request of the business is completed and the network proxy does not receive a new processing request for the business, a plug-in configuration check is performed. If a plug-in configuration after the business processing is completed is detected, the node of the plug-in configuration after the business processing is completed is determined as a pause node after the business processing is completed.

[0089] In this embodiment, after the execution of the service processing request is completed, the network agent can receive a new service processing request; Figure 3 As shown, in the third example, after the business processing is completed, it is necessary to detect whether there is a plug-in configuration. At this time, the agent has not yet received a new business processing request. If a plug-in configuration is detected, the node with the plug-in configuration is treated as a pause node and the corresponding plug-in logic is executed. After the plug-in logic ends, the original execution process continues, and the network agent cyclically accepts business processing requests. The plug-in configuration after the business processing is completed can be a plug-in that develops data persistence functions for the business. After the business processing is completed, the business data generated by the business processing is stored to achieve data persistence. The data storage method can be: database storage, file storage, object storage, and storing the data in cache.

[0090] Optionally, after the business processing request is completed, the following steps are further included:

[0091] If the network agent receives an agent termination signal, it determines whether there is a plug-in configuration before the network agent is terminated. If there is a plug-in configuration before the network agent is terminated, the plug-in logic corresponding to the plug-in configuration before the network agent is terminated is executed, and the network agent is terminated after the plug-in logic is executed.

[0092] In this embodiment, Figure 3 In the third example shown, after receiving the agent termination signal, the network agent needs to stop the current network agent, perform plug-in configuration detection before exiting the network agent, execute the plug-in logic corresponding to the plug-in configuration, and terminate and exit the network agent after the plug-in logic execution is completed. A specific implementation method can be: the agent service receives the agent termination signal; the agent service performs a cleanup operation before termination; during the cleanup operation, a detection mechanism for plug-in configuration detection is triggered and the existing plug-in configuration is detected; based on the plug-in configuration, plug-in configuration information in the plug-in list or plug-in database is obtained; the plug-in logic is obtained through the plug-in configuration information, and the plug-in logic is called and executed; during the execution of the plug-in logic, data generated in the process of providing services by the network agent may be exposed, and external systems and data generated by external systems may be involved; after the plug-in logic execution is completed, the network agent termination cleanup operation is continued; after the cleanup operation is completed, the network agent is terminated.

[0093] In this embodiment, by performing plug-in detection during the execution of a business processing request, the plug-in configuration existing after the business update is obtained, and by executing the plug-in logic corresponding to the plug-in configuration, additional data processing business for executing the business update is implemented; thereby, additional business processing is implemented without changing the business operator code and without affecting the normal business processing; the stability of business operation is maintained; the plug-in logic execution based on detection can also enable targeted updates based on different business types when the business is updated. The plug-in detection method can identify the plug-in configured for the business update, and does not require the business to use a general interface for plug-in development, thereby improving the convenience of the business update development process; avoiding the low efficiency of business updates caused by plug-in development, thereby affecting the processing efficiency of the business; at the same time, the plug-in configuration is detected after the network agent ends, which is used to process the data processing requirements of the network agent end; ensuring the data security of the network agent in the process of providing business processing for the business; thereby utilizing the plug-in detection mechanism and plug-in architecture to update and process the business, achieving the technical effect of improving business processing efficiency.

[0094] Figure 4 The process of implementing the network proxy method based on the plug-in architecture provided in the embodiment of the present application Figure 4 On appeal Figure 1 Based on the embodiment shown, Figure 4 As shown, in the above step 101 of starting and running the network agent, the network agent also includes updating the service before receiving the service processing request. A specific implementation method of the service update includes:

[0095] S401. Determine whether there is a new type of data processing business;

[0096] In the fourth example, the judgment of the newly added type of data processing business can be made by monitoring the data source of the business to see whether there is new data that needs to be processed; the current data and the previous round of data can be compared through periodic polling to determine whether there is abnormal data or new data that requires additional data processing, thereby determining whether additional data processing is required; an event-driven architecture for business updates can be designed to determine whether corresponding functional requirements need to be generated when new abnormal data is added, and determine the need to develop a new type of data processing business when the functional requirement design is triggered, or to add a new data processing business based on the basic business requirement architecture.

[0097] S402: If yes, initiate a service reminder based on the newly added data processing service type and obtain the plug-in logic corresponding to the newly added data processing service type;

[0098] In this embodiment, the business reminder is used to instruct the development department to develop a plug-in based on the newly added type of data processing business and determine the plug-in logic corresponding to the newly added type of data processing business; the plug-in logic can be a script file or a binary file.

[0099] In this embodiment, the initiation of business reminders can be achieved by designing a business reminder system so as to send reminders to the development department when a new type of data processing business is discovered, thereby promoting the development department to develop corresponding plug-ins.

[0100] S403: Save the plug-in logic corresponding to the newly added type of data processing service in the storage database, and update the service configuration file based on the plug-in logic and the storage address of the plug-in logic in the storage database.

[0101] In this embodiment, the plug-in logic is stored in the database, and a database schema design is required to determine the database table structure for storing the plug-in logic. When saving the plug-in logic, it is necessary to ensure that access to and management of the storage database are secure, which can be achieved by restricting access rights and encrypting sensitive data. At the same time, when updating the business configuration file, modifications to the configuration file also need to be restricted to avoid unauthorized modifications and enhance the security of business processing. When designing the plug-in logic, it is necessary to consider the version management of the plug-in logic. A data table for storing previous versions can be created for each plug-in logic in the storage database to implement plug-in updates and plug-in version rolling during business processing. When the network agent loads and uses the plug-in logic, monitoring and logging can be added to detect and troubleshoot problems in the plug-in logic. When loading and executing the plug-in logic, a fault-tolerant mechanism for plug-in logic execution failure and plug-in logic invalidity can be added to prevent the business being processed from being interrupted when there is a problem with the plug-in logic.

[0102] In this embodiment, before the network proxy is started, corresponding plug-in development is required for business updates. According to the newly added data processing business types of the business, corresponding plug-in development is carried out, and business reminders are sent to the back-end development department. After obtaining the plug-in logic corresponding to the plug-in development, the plug-in logic is saved in the storage database, and the storage information of the plug-in logic in the storage database and the plug-in logic are updated to the business configuration file, which is used to perform plug-in development detection and plug-in logic calling during the network proxy process. Compared with the prior art, in which plug-in development is based on a general interface, this embodiment can carry out targeted plug-in development according to the newly added data processing requests corresponding to each type of business. Plug-in development is only for businesses that require business updates, which reduces the cost of plug-in development. It also avoids the request for proxy service replacement caused by business updates, thereby improving the efficiency of business updates and achieving the technical effect of improving business processing efficiency.

[0103] Figure 5 This is a schematic diagram of the structure of a network proxy implementation device based on a plug-in architecture provided in an embodiment of the present application. The device of this embodiment can be in the form of software and / or hardware. Figure 5 As shown, an embodiment of the present application provides a network proxy implementation device 500 based on a plug-in architecture, the device includes: an acquisition module 501, a first processing module 502 and a second processing module,

[0104] An acquisition module is used to start and run a network agent, and receive a processing request for a service based on the network agent, wherein the network agent can receive processing requests for different types of services;

[0105] A first processing module is configured to determine whether a plug-in is developed for the business based on a business configuration file. If so, the plug-in configuration is detected during the execution of the business processing request, and the node where the plug-in configuration exists is determined as a pause node in the execution of the business processing request; the execution of the business processing request is stopped at the pause node, and the plug-in logic corresponding to the plug-in configuration is executed. After the execution of the plug-in logic is completed, the execution of the business processing request is resumed based on the pause node of the business processing request;

[0106] The second processing module is used to execute the processing request of the business based on the execution flow of the processing request of the business and the network agent when there is no plug-in development in the business.

[0107] In one possible implementation, the device is further configured to:

[0108] Read the business configuration file and obtain the business configuration information, and determine whether the configuration information contains identification information for identifying plug-in development based on the business configuration information; if so, determine that the business has plug-in development, if not, determine that the business does not have plug-in development.

[0109] In one possible implementation, the device is further configured to:

[0110] Determine the storage address of the plug-in logic corresponding to the plug-in configuration in the storage database based on the business configuration information; wherein the storage database is used to store the plug-in logic corresponding to each type of business;

[0111] Based on the storage address of the plug-in logic in the storage database, the plug-in logic is read from the storage database and executed.

[0112] In one possible implementation, the device is further configured to:

[0113] Before executing a service processing request based on a network proxy, a plug-in configuration detection is performed. If a plug-in configuration before service processing is detected, the node with the plug-in configuration is determined as a pause node before service processing.

[0114] Perform plug-in configuration detection when a business processing request is being executed. If a plug-in configuration is detected during business processing, the node with the plug-in configuration is determined as a paused node in business processing.

[0115] When the business processing request is completed and the network agent does not receive a new business processing request, the plug-in configuration is detected. If the plug-in configuration after the business processing is completed is detected, the node of the plug-in configuration after the business processing is completed is determined as the pause node after the business processing is completed.

[0116] In one possible implementation, the device is further configured to:

[0117] If the network agent receives an agent termination signal, it determines whether there is a plug-in configuration before the network agent is terminated. If there is a plug-in configuration before the network agent is terminated, the plug-in logic corresponding to the plug-in configuration before the network agent is terminated is executed, and the network agent is terminated after the plug-in logic is executed.

[0118] In one possible implementation, the device is further configured to:

[0119] Determine whether there is a new type of data processing business;

[0120] If so, a business reminder is initiated based on the newly added data processing business type, and the plug-in logic corresponding to the newly added data processing business type is obtained; wherein the business reminder is used to instruct the development department to develop a plug-in based on the newly added data processing business type and determine the plug-in logic corresponding to the newly added data processing business type;

[0121] The plug-in logic corresponding to the newly added type of data processing business is saved in the storage database, and the business configuration file is updated based on the plug-in logic and the storage address of the plug-in logic in the storage database.

[0122] In one possible implementation, the device is further configured to:

[0123] Start the network proxy, configure the traffic forwarding path of the network proxy based on the network proxy, and detect whether there is a plug-in configuration after the traffic forwarding path configuration of the network proxy is completed. If so, execute the plug-in logic corresponding to the plug-in configuration, and run the network proxy after the plug-in logic execution is completed.

[0124] The present application provides a network proxy implementation device based on a plug-in architecture. The device includes: an acquisition module for starting and running a network proxy, and receiving a service processing request based on the network proxy, wherein the network proxy can receive service processing requests of different types; a first processing module for determining whether a service has plug-in development based on a service configuration file; if so, performing a plug-in configuration detection during the execution of the service processing request, and determining the node with the plug-in configuration as a pause node during the execution of the service processing request; stopping the execution of the service processing request at the pause node, and executing the plug-in logic corresponding to the plug-in configuration; after the execution of the plug-in logic is completed, continuing the execution of the service processing request based on the pause node of the service processing request; and a second processing module for executing the service processing request based on the execution process of the service processing request and the network proxy when no plug-in development exists in the service. Compared with the existing technology, the present application utilizes plug-in configuration detection in the network proxy process to detect the plug-in corresponding to the business update of each business, triggering and executing different plug-in logic for different businesses; solving the problem that businesses in the existing technology cannot update rows; at the same time, in the present application, the corresponding network agent will be adjusted according to the business update, and the network proxy service will be updated by using the plug-in configuration, solving the problem that the network agent needs to be replaced after the business update in the existing technology; the present application realizes the processing of the updated business by pausing node marking, continuing the execution of the business after the execution of the plug-in logic, and detecting the plug-in configuration at different stages, while maintaining data security in the business processing process and achieving the technical effect of improving business processing efficiency.

[0125] Figure 6 The hardware structure diagram of the network proxy implementation device based on the plug-in architecture provided in the embodiment of the present application. Figure 6 As shown, the network proxy implementation device 600 based on the plug-in architecture includes:

[0126] Processor 601 and memory 602;

[0127] Memory stores computer-executable instructions;

[0128] The processor executes the computer-executable instructions stored in the memory 602 , so that the network proxy implementation device based on the plug-in architecture executes the network proxy implementation method based on the plug-in architecture as described above.

[0129] It should be understood that the above-mentioned processor 601 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention can be directly implemented as being executed by a hardware processor, or can be implemented by a combination of hardware and software modules in the processor. The memory 602 may include high-speed random access memory (RAM), and may also include non-volatile memory (NVM), such as at least one disk storage, and can also be a USB flash drive, a mobile hard disk, a read-only memory, a disk or an optical disk, etc.

[0130] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, they are used to implement a network proxy implementation method based on a plug-in architecture.

[0131] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all optional embodiments, and the actions and modules involved are not necessarily required by this application.

[0132] It should be further noted that, although the various steps in the flowchart are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps may be performed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but may be performed at different times. The execution order of these sub-steps or stages is not necessarily to be performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0133] It should be understood that the above-described device embodiments are merely illustrative, and the device of the present application may also be implemented in other ways. For example, the division of units / modules in the above-described embodiments is merely a logical functional division, and actual implementations may employ other division methods. For example, multiple units, modules, or components may be combined or integrated into another system, or some features may be omitted or not implemented.

[0134] In addition, unless otherwise specified, the functional units / modules in the various embodiments of the present application may be integrated into a single unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The aforementioned integrated units / modules may be implemented in the form of hardware or software program modules.

[0135] If the integrated unit / module is implemented in hardware, the hardware may be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor may be any appropriate hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC. Unless otherwise specified, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as resistive random access memory (RRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (EDRAM), high-bandwidth memory (HBM), hybrid memory cube (HMC), etc.

[0136] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0137] In the above embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a particular embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined in any way. To keep the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0138] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0139] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A network proxy implementation method based on a plug-in architecture, characterized in that: include: Starting and running a network agent, and receiving a service processing request based on the network agent, wherein the network agent can receive service processing requests of different types; Determine whether a plug-in is developed for the business based on a configuration file of the business; if so, perform plug-in configuration detection during the execution of a processing request of the business, and determine a node where the plug-in configuration exists as a pause node during the execution of the processing request of the business; stop executing the processing request of the business at the pause node, and execute the plug-in logic corresponding to the plug-in configuration; after the execution of the plug-in logic is completed, continue executing the processing request of the business based on the pause node of the processing request of the business; If not, the processing request of the service is executed based on the execution flow of the processing request of the service and the network agent.

2. The method according to claim 1, characterized in that The determining, based on the configuration file of the business, whether plug-in development exists for the business includes: Read the configuration file of the business and obtain the configuration information of the business, and determine whether there is identification information for identifying plug-in development in the configuration information based on the configuration information of the business; if so, determine that plug-in development exists for the business, and if not, determine that there is no plug-in development for the business.

3. The method according to claim 2, characterized in that The executing the plug-in logic corresponding to the plug-in configuration includes: Determining a storage address of the plug-in logic corresponding to the plug-in configuration in a storage database based on the configuration information of the business; wherein the storage database is used to store the plug-in logic corresponding to each type of business; Based on the storage address of the plug-in logic in the storage database, the plug-in logic is read from the storage database and executed.

4. The method according to claim 3, characterized in that The performing plug-in configuration detection during the execution of the processing request of the service and determining a node having the plug-in configuration as a pause node during the execution of the processing request of the service includes at least one of the following: Before executing the processing request of the service based on the network proxy, a plug-in configuration detection is performed, and if the plug-in configuration before the service processing is detected, the node with the plug-in configuration is determined as a pause node before the service processing; Performing a plug-in configuration detection when a processing request of the service is being executed, and if a plug-in configuration in the service processing is detected, determining the node where the plug-in configuration exists as a paused node in the service processing; When the processing request of the business is completed and the network agent does not receive a new processing request for the business again, a plug-in configuration detection is performed. If a plug-in configuration after the business processing is completed is detected, the node of the plug-in configuration after the business processing is completed is determined as a pause node after the business processing is completed.

5. The method according to claim 4, characterized in that After the processing request of the business is completed, the method further includes: If the network agent receives an agent termination signal, it determines whether there is a plug-in configuration before the network agent is terminated. If there is a plug-in configuration before the network agent is terminated, the plug-in logic corresponding to the plug-in configuration before the network agent is terminated is executed, and after the execution of the plug-in logic is completed, the network agent is terminated.

6. The method according to claim 1, characterized in that Before the network proxy is started and operated and a processing request for a service is received based on the network proxy, the method further includes: Determine whether the business has a new type of data processing business; If so, a business reminder is initiated based on the newly added type of data processing business of the business, and the plug-in logic corresponding to the newly added type of data processing business is obtained; wherein the business reminder is used to instruct the development department to develop a plug-in based on the newly added type of data processing business and determine the plug-in logic corresponding to the newly added type of data processing business; The plug-in logic corresponding to the newly added type of data processing service is stored in a storage database, and a configuration file of the service is updated based on the plug-in logic and a storage address of the plug-in logic in the storage database.

7. The method according to claim 1, characterized in that Starting and running the network proxy includes: Start the network proxy, configure the traffic forwarding path of the network proxy based on the network proxy, and detect whether the network proxy has a plug-in configuration after the traffic forwarding path configuration is completed. If so, execute the plug-in logic corresponding to the plug-in configuration, and run the network proxy after the plug-in logic is executed.

8. A network proxy implementation device based on a plug-in architecture, characterized in that: include: An acquisition module, configured to start and run a network agent, and receive a service processing request based on the network agent, wherein the network agent can receive service processing requests of different types; A first processing module is configured to determine, based on a configuration file of the business, whether a plug-in has been developed for the business; if so, perform plug-in configuration detection during the execution of a processing request of the business, and determine a node where the plug-in configuration exists as a pause node during the execution of the processing request of the business; stop executing the processing request of the business at the pause node, and execute the plug-in logic corresponding to the plug-in configuration; and continue executing the processing request of the business based on the pause node of the processing request of the business after the execution of the plug-in logic is completed; The second processing module is configured to execute the processing request of the business based on the execution flow of the processing request of the business and the network agent when the plug-in development does not exist in the business.

9. A network proxy implementation device based on a plug-in architecture, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the network proxy implementation method based on the plug-in architecture according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the network proxy implementation method based on a plug-in architecture as described in any one of claims 1 to 7.