Front-end operation interception processing method and device, computer device and storage medium

By creating interception capability processor objects and interception capability objects, the problem that the front-end operation plugin interface interception in the existing technology only supports a single item type is solved, realizing flexible interception processing of multiple operation types, and improving system development efficiency and stability.

CN116303486BActive Publication Date: 2026-06-16SHENZHEN FULIN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN FULIN TECH CO LTD
Filing Date
2023-01-03
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

In existing technologies, the plugin interface interception for front-end operations only supports a single item type, which cannot achieve agile system development, and the code is highly intrusive, making it difficult to effectively judge the operation action and type.

Method used

By creating interception capability processor objects and interception capability objects, the operation type and action of the front-end operation request are determined, and the corresponding plugin is called to intercept and process it. It supports the interception of multiple operation types and reduces code redundancy through object-oriented programming.

🎯Benefits of technology

It enables flexible interception and processing of various front-end operation types, reduces intrusion into the original system code, and improves system development efficiency and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116303486B_ABST
    Figure CN116303486B_ABST
Patent Text Reader

Abstract

The embodiment of the application belongs to the technical field of data processing, and relates to a front-end operation interception processing method and device, computer equipment and a storage medium. The method comprises the following steps: receiving a front-end operation request, obtaining an operation type and an operation action according to the front-end operation request; creating an interception capability processor object based on the front-end operation request, and creating at least one interception capability object based on the interception capability processor object; judging whether there is an interception capability object matched with the operation type and the operation action; if yes, calling a corresponding plug-in to intercept and process the front-end operation request based on the interception capability processor object and the matched interception capability object, otherwise, directly processing the front-end operation request; updating a database according to the processing result of the front-end operation request, and feeding back the processing result to the front end. The application can realize the interception of various operation types of front-end operations, has little invasiveness to the system, and is beneficial to improving the system development efficiency and stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a front-end operation interception processing method, apparatus, computer equipment, and storage medium. Background Technology

[0002] For systems with front-end and back-end, when the front-end initiates a request to add or update data for an item operation, the back-end interface intercepts the request, processes the data through a plugin, and returns the processing result to add or update data in the database, then feeds the added or updated data back to the front-end. Currently, common plugin interface interception behaviors are limited to interception at the middle slice layer of the back-end interface, making it difficult to determine the operation and item type. Furthermore, current interception methods only support single item type interception; adding other item types requires a large amount of repetitive and redundant code, hindering agile system development. Different processing methods must be written for different item types, and the plugin processing code is highly intrusive, potentially disrupting the original system code. Summary of the Invention

[0003] The purpose of this application is to provide a front-end operation interception processing method, apparatus, computer device and storage medium to solve the problem that existing technologies cannot determine the operation action and operation type when intercepting front-end operations for data processing and updating, and only support single operation type interception processing.

[0004] To address the aforementioned technical problems, this application provides a front-end operation interception processing method, the method comprising:

[0005] Receive a front-end operation request, and obtain the operation type and operation action based on the front-end operation request;

[0006] An interception capability processor object is created based on the front-end operation request, and at least one interception capability object is created based on the interception capability processor object. It is then determined whether there is an interception capability object that matches the operation type and the operation action.

[0007] If it is included, the corresponding plugin is invoked based on the interception capability processor object and the matching interception capability object, and the front-end operation request is intercepted and processed through the plugin; otherwise, the front-end operation request is processed directly.

[0008] The database is updated based on the processing result of the front-end operation request, and the processing result is fed back to the front-end.

[0009] Further, the step of creating at least one interception capability object based on the interception capability processor object and determining whether there is an interception capability object that matches the operation type and the operation action includes:

[0010] Obtain the interception capability list field of the interception capability processor object, and initialize it based on the interception capability list field to obtain the interception capability list;

[0011] At least one interception capability object is created based on the field values ​​in the interception capability list. The interception capability object contains at least a concern operation type field and a concern operation action field.

[0012] Determine whether the field values ​​of the attention operation type field and the attention operation action field match the operation type and the operation action, so as to obtain the interception capability object that matches the operation type and the operation action.

[0013] Furthermore, when there are multiple matched interception capability objects, the step of intercepting the front-end operation request through the plugin includes:

[0014] According to the front-end operation request, the data to be operated is obtained, the operation type, the operation action and the data to be operated are sent to multiple plugins, the initial processing results of multiple plugins are received, and the multiple initial processing results are merged to obtain the processing result.

[0015] Furthermore, after the step of sending the operation type, the operation action, and the data to be operated to multiple plugins, the method further includes:

[0016] Obtain preprocessing information generated by each plugin based on the operation type, the operation action, and the data to be operated;

[0017] Based on the preprocessed information, it is determined whether each plugin is ready, and the front-end operation request is intercepted and processed based on the ready plugin.

[0018] Furthermore, when the values ​​of the attention operation type field and the attention operation action field are empty, the method further includes:

[0019] Obtain an interception capability object whose field values ​​for the "Focus Operation Type" field and the "Focus Operation Action" field are empty, and use it as an interception capability object that matches the operation type and the operation action.

[0020] Furthermore, the step of obtaining the operation type and operation action based on the front-end operation request includes:

[0021] Read the request information of the front-end operation request, parse the request information to obtain the operation type and the operation action; or

[0022] The GraphQL interface is invoked according to the front-end operation request, the interface parameters of the GraphQL interface are read, and the interface parameters are parsed to obtain the operation type and the operation action.

[0023] Furthermore, prior to the step of creating at least one interception capability object based on the field values ​​of the interception capability list field, the method further includes:

[0024] Obtain the configuration files of multiple plugins, and retrieve the field values ​​of the attention operation type field and attention operation action field of the corresponding plugin from each configuration file;

[0025] An interception capability list is generated based on multiple field values ​​obtained from the configuration file, corresponding to the fields in the interception capability list.

[0026] To address the aforementioned technical problems, this application also provides a front-end operation interception processing device, comprising:

[0027] The receiving module is used to receive front-end operation requests and obtain the operation type and operation action according to the front-end operation requests;

[0028] The processing module is used to create an interception capability processor object based on the front-end operation request, and create at least one interception capability object based on the interception capability processor object. It determines whether there is an interception capability object that matches the operation type and the operation action. If there is, it calls the corresponding plugin based on the interception capability processor object and the matching interception capability object, and intercepts the front-end operation request through the plugin. Otherwise, it directly processes the front-end operation request.

[0029] The update feedback module is used to update the database based on the processing result of the front-end operation request and to feed back the processing result to the front-end.

[0030] To address the aforementioned technical problems, this application also provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the front-end operation interception processing method described above.

[0031] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the front-end operation interception processing method described above.

[0032] Compared with the prior art, the embodiments of this application have the following main advantages:

[0033] The solution in this application is based on an object-oriented approach. By creating interception capability processor objects and interception capability objects, the corresponding plugins are determined to intercept and process front-end operation requests. This can achieve interception of various types of front-end operations and can handle different types of front-end operations without modifying the original system code to handle different front-end operation types. This approach has minimal invasiveness to the system and is beneficial for improving system development efficiency and stability. Attached Figure Description

[0034] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0035] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;

[0036] Figure 2 This is a flowchart of an embodiment of the front-end operation interception processing method according to this application;

[0037] Figure 3 This is a schematic diagram of the structure of one embodiment of the front-end operation interception processing device according to this application;

[0038] Figure 4 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation

[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.

[0040] 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 this application. 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.

[0041] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0042] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0043] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.

[0044] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0045] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.

[0046] It should be noted that the front-end operation interception processing method provided in this application embodiment is generally executed by the server, and correspondingly, the front-end operation interception processing device is generally set in the server.

[0047] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0048] Continue to refer to Figure 2 A flowchart illustrating an embodiment of the front-end operation interception processing method according to this application is shown. The front-end operation interception processing method includes the following steps S201 to S206:

[0049] Step S201: Receive a front-end operation request and obtain the operation type and operation action according to the front-end operation request.

[0050] In this embodiment, when a user enters the operation interface on the front end and operates on the item on the interface, an operation request will be sent to the back end. After receiving the operation request from the front end, the back end can obtain the operation type (ItemType) and operation action (action) based on the operation request, so as to perform subsequent processing based on the operation type and operation action.

[0051] In this embodiment, the front-end operation interception processing method runs on an electronic device (e.g., Figure 1 The server shown can receive front-end operation requests via wired or wireless connection. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra-wideband) connections, and other currently known or future wireless connection methods.

[0052] In some embodiments, the step of obtaining the operation type and operation action based on the front-end operation request includes: reading the request information of the front-end operation request and parsing the request information to obtain the operation type and the operation action. This embodiment directly obtains the operation type and operation action by parsing the request information of the front-end operation.

[0053] In other embodiments, the step of obtaining the operation type and operation action based on the front-end operation request includes: calling a GraphQL interface according to the front-end operation request, reading the interface parameters of the GraphQL interface, and parsing the interface parameters to obtain the operation type and the operation action. In this embodiment, when there are multiple front-ends, the itemType and action related to item interception capability are embedded in the interface of each itemType. Multiple front-end operations converge to a single GraphQL interface. The corresponding itemType and action are obtained by parsing the parameters of the GraphQL interface, that is, interception of different types of itemTypes can be achieved with a small amount of code injection.

[0054] Step S202: Create an interception capability processor object based on the front-end operation request, and create at least one interception capability object based on the interception capability processor object. Specifically, this step involves obtaining the interception capability list field of the interception capability processor object, initializing it based on the interception capability list field to obtain an interception capability list, and then creating at least one interception capability object based on the field values ​​in the interception capability list. The interception capability object at least includes a "focused operation type" field and a "focused operation action" field.

[0055] In a specific embodiment of this application, the object name of the interception capability processor object can be defined as ItemHandlerController. The field name of the interception capability list field included in the interception capability processor object is matchAbilities, and its field value is stored in the interception capability list registered in the current system. In addition, the interception capability processor object includes the following four methods:

[0056] 1) HasAbilityMatch, a method used to determine whether the current system is capable of matching a plugin that corresponds to the operation type and operation action.

[0057] 2)ExecutePreAction: This method is used to execute the preAction method of the plugin corresponding to the matched interception capability object.

[0058] 3) HasAbilityFollow: This method is used to determine whether the matched plugin has the ability to follow, that is, whether the matched plugin will respond to the processing request.

[0059] 4)ExecuteActionDone: This method is used to execute the actionDone method of the plugin capability corresponding to the matched interceptor capability object.

[0060] Additionally, the interception capability object can be defined as ItemHandlerAbility, which, in addition to containing the type of operation to be monitored and the action of the operation to be monitored, also includes the following two methods for the interception capability processor object to call: ExecutePreAction and ExecuteActionDone:

[0061] 1) Call the plugin's preAction.

[0062] 2) Call the plugin's actionDone.

[0063] Based on the two objects mentioned above, this solution enables object-oriented programming. The interception capability object abstracts the interception capability into a single object with clear logic. By attaching the methods for calling plugins to the interception capability object, redundant code is reduced. The interception capability processor object can abstract interception for different operation types, eliminating the need to write logic processing code for each operation type and significantly reducing intrusion into the original code of the standard product.

[0064] When an interceptor capability processor object is created based on the aforementioned front-end operation request, and at least one interceptor capability object is created based on the interceptor capability processor object, specifically an ItemHandlerController object is created. First, the list of interceptor capabilities currently registered in the system is obtained. Then, the interceptor capability objects ItemHandlerAbility that meet the conditions of "itemType" and "action" are filtered out. Then, the subsequent steps are executed by calling the method of the interceptor capability object ItemHandlerAbility, that is, calling the plugin's preAction, and obtaining the return value of the final disk write (that is, the process of storing the processing result of the subsequent steps into the database) (that is, the processing result in the subsequent steps). Then, the original system method is executed to write the data to disk, and after the disk write code, the method of the interceptor capability object ItemHandlerAbility is called to call the plugin's actionDone to complete the disk write notification of the processing result.

[0065] In some embodiments, before the step of creating at least one interception capability object based on the field values ​​of the interception capability list fields, the method further includes: obtaining configuration files of multiple plugins, obtaining the field values ​​of the attention operation type field and attention operation action field of the corresponding plugin from each configuration file; and generating an interception capability list corresponding to the interception capability list fields based on the multiple field values ​​obtained from the configuration files. Specifically, for the plugin side, the plugin predefines the itemType and action required in the configuration file plugin.yaml, or adds interception capabilities through specific tools, so that the system can know the itemType and action intercepted by the current plugin without activating the plugin, realizing on-demand plugin activation, decoupling the system logic from the actual plugin code, and improving plugin development efficiency.

[0066] Step S203: Determine whether there exists an interception capability object that matches the operation type and the operation action. If yes, proceed to step S204; otherwise, proceed to step S205. This step specifically includes determining whether the field values ​​of the "Followed Operation Type" field and the "Followed Operation Action" field match the operation type and the operation action, in order to obtain an interception capability object that matches the operation type and the operation action. In fact, each interception capability object contains an operation type and operation action that a plugin follows. For example, if a user updates a work item title on the operation interface, the operation type is "user" and the operation action is "update." These two are sent to the backend via a frontend operation request. If the plugin follows this operation type and operation action, that is, the field values ​​of the "Followed Operation Type" field and the "Followed Operation Action" field are "user" and "update" respectively, then an interception capability object matching the operation type and operation action can be obtained through field matching.

[0067] In some embodiments, when the values ​​of the "Follow Operation Type" field and the "Follow Operation Action" field are empty, the method further includes: obtaining an interception capability object whose values ​​of the "Follow Operation Type" field and the "Follow Operation Action" field are empty, and using it as an interception capability object matching the operation type and the operation action. In this embodiment, when the plugin has no followed operation types and operation actions, the plugin will be activated when a front-end operation request occurs. The activated plugin then decides whether to respond to the front-end operation request based on the information in the front-end operation request, so that the front-end operation request can be selectively intercepted and processed by a third-party plugin even when it is not followed.

[0068] Step S204: Based on the interception capability processor object and the matching interception capability object, the corresponding plugin is invoked to intercept and process the front-end operation request through the plugin.

[0069] In this embodiment, there are one or more matched interception capability objects, and correspondingly, one or more plugins are invoked. When there are multiple matched interception capability objects, the step of intercepting and processing the front-end operation request through the plugins includes: obtaining the data to be operated according to the front-end operation request; sending the operation type, the operation action, and the data to be operated to multiple plugins; receiving the initial processing results from multiple plugins; and merging the multiple initial processing results to obtain the processing result. This embodiment can obtain a complete data processing result.

[0070] In some embodiments, after the step of sending the operation type, the operation action, and the data to be operated to multiple plugins, the method further includes: obtaining preprocessing information generated by each plugin based on the operation type, the operation action, and the data to be operated; determining whether each plugin is ready based on the preprocessing information, and intercepting the front-end operation request based on the ready plugins. In this embodiment, when multiple plugins are invoked, the invoked plugins will also decide whether to intercept the front-end operation request based on the received information, improving the flexibility of system processing.

[0071] Step S205: Directly process the front-end operation request. This step provides an alternative processing method, which allows processing of the front-end operation request through the original back-end processing flow without calling any plugins.

[0072] Step S206: Update the database based on the processing result of the front-end operation request, and send the processing result back to the front-end. This step completes the data write-to-disk operation and simultaneously sends relevant information to the front-end for display.

[0073] Compared with the prior art, the embodiments of this application have the following main advantages:

[0074] The solution in this application is based on an object-oriented approach. By creating interception capability processor objects and interception capability objects, the corresponding plugins are determined to intercept and process front-end operation requests. This can achieve interception of various types of front-end operations and can handle different types of front-end operations without modifying the original system code to handle different front-end operation types. This approach has minimal invasiveness to the system and is beneficial for improving system development efficiency and stability.

[0075] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0076] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0077] Further reference Figure 3 As a response to the above Figure 2 The implementation of the method shown in this application provides an embodiment of a front-end operation interception processing device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0078] like Figure 3 As shown, the front-end operation interception processing device described in this embodiment includes: a receiving module 301, a processing module 302, and an update feedback module 303. Wherein:

[0079] The receiving module 301 is used to receive front-end operation requests and obtain the operation type and operation action according to the front-end operation requests.

[0080] The processing module 302 is used to create an interception capability processor object based on the front-end operation request, and create at least one interception capability object based on the interception capability processor object. It determines whether there is an interception capability object that matches the operation type and the operation action. If it does, it calls the corresponding plugin based on the interception capability processor object and the matching interception capability object, and intercepts the front-end operation request through the plugin. Otherwise, it directly processes the front-end operation request.

[0081] The update feedback module 303 is used to update the database according to the processing result of the front-end operation request and to feed back the processing result to the front-end.

[0082] In this embodiment, when the processing module 302 creates at least one interception capability object based on the interception capability processor object, and determines whether there is an interception capability object that matches the operation type and the operation action, it is specifically used to: obtain the interception capability list field of the interception capability processor object; initialize based on the interception capability list field to obtain an interception capability list; create at least one interception capability object based on the field values ​​in the interception capability list, wherein the interception capability object at least includes a focus operation type field and a focus operation action field; and determine whether the field values ​​of the focus operation type field and the focus operation action field match the operation type and the operation action to obtain an interception capability object that matches the operation type and the operation action.

[0083] In this embodiment, when there are multiple matched interception capability objects, the processing module 302 intercepts and processes the front-end operation request through the plugin, specifically: obtaining the data to be operated according to the front-end operation request, sending the operation type, the operation action and the data to be operated to multiple plugins, receiving the initial processing results of multiple plugins, and merging the multiple initial processing results to obtain the processing result.

[0084] In this embodiment, after sending the operation type, the operation action, and the data to be operated to multiple plugins, the processing module 302 is further configured to: obtain preprocessing information generated by each plugin based on the operation type, the operation action, and the data to be operated; determine whether each plugin is ready based on the preprocessing information, and intercept the front-end operation request based on the ready plugins.

[0085] In this embodiment, when the field values ​​of the attention operation type field and the attention operation action field are empty, the processing module 302 is further configured to: obtain an interception capability object whose field values ​​of the attention operation type field and the attention operation action field are empty, and use it as an interception capability object that matches the operation type and the operation action.

[0086] In this embodiment, when the receiving module 301 obtains the operation type and operation action according to the front-end operation request, it is specifically used to: read the request information of the front-end operation request and parse the request information to obtain the operation type and the operation action.

[0087] In another embodiment, when the receiving module 301 obtains the operation type and operation action according to the front-end operation request, it is specifically used to: call the GraphQL interface according to the front-end operation request, read the interface parameters of the GraphQL interface, and parse the interface parameters to obtain the operation type and the operation action.

[0088] In this embodiment, before creating at least one interception capability object based on the field values ​​of the interception capability list fields, the processing module 302 is further configured to: obtain configuration files of multiple plugins, obtain the field values ​​of the attention operation type field and attention operation action field of the corresponding plugin from each configuration file; and generate an interception capability list corresponding to the interception capability list fields based on the multiple field values ​​obtained from the configuration files.

[0089] When the above modules perform related operations, the specific technical content involved in each operation can be referred to the relevant content in the above method embodiments, which will not be elaborated here.

[0090] Compared with the prior art, the embodiments of this application have the following main advantages:

[0091] The solution in this application is based on an object-oriented approach. By creating interception capability processor objects and interception capability objects, the corresponding plugins are determined to intercept and process front-end operation requests. This can achieve interception of various types of front-end operations and can handle different types of front-end operations without modifying the original system code to handle different front-end operation types. This approach has minimal invasiveness to the system and is beneficial for improving system development efficiency and stability.

[0092] To address the aforementioned technical problems, this application also provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the front-end operation interception processing method described above, and has corresponding technical effects.

[0093] Please refer to the details. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment. The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected via a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure; however, it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0094] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.

[0095] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 4. Of course, the memory 41 may include both the internal storage unit and its external storage device of the computer device 4. In this embodiment, the memory 41 is typically used to store the operating system and various application software installed on the computer device 4, such as the program code of the front-end operation interception processing method. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or will be output.

[0096] In some embodiments, the processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run program code stored in the memory 41 or process data, for example, to run the program code of the front-end operation interception processing method.

[0097] The network interface 43 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 4 and other electronic devices.

[0098] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program. The computer program can be executed by at least one processor to cause the at least one processor to perform the steps of the aforementioned front-end operation interception processing method, and to achieve the corresponding technical effects.

[0099] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0100] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.

Claims

1. A front-end operation interception and processing method, characterized in that, The method includes: Receive a front-end operation request, and obtain the operation type and operation action based on the front-end operation request; An interception capability processor object is created based on the front-end operation request, and at least one interception capability object is created based on the interception capability processor object. It is then determined whether there is an interception capability object that matches the operation type and the operation action. If it is included, the corresponding plugin is invoked based on the interception capability processor object and the matching interception capability object, and the front-end operation request is intercepted and processed through the plugin; otherwise, the front-end operation request is processed directly. The database is updated based on the processing result of the front-end operation request, and the processing result is fed back to the front-end; The step of creating at least one interception capability object based on the interception capability processor object and determining whether there is an interception capability object that matches the operation type and the operation action includes: Obtain the interception capability list field of the interception capability processor object, and initialize it based on the interception capability list field to obtain the interception capability list; At least one interception capability object is created based on the field values ​​in the interception capability list. The interception capability object contains at least a concern operation type field and a concern operation action field. Determine whether the field values ​​of the attention operation type field and the attention operation action field match the operation type and the operation action, so as to obtain the interception capability object that matches the operation type and the operation action; Before the step of creating at least one interception capability object based on the field values ​​in the interception capability list, the method further includes: Obtain the configuration files of multiple plugins, and retrieve the field values ​​of the attention operation type field and attention operation action field of the corresponding plugin from each configuration file; An interception capability list is generated based on multiple field values ​​obtained from the configuration file, corresponding to the fields in the interception capability list.

2. The front-end operation interception processing method according to claim 1, characterized in that, When there are multiple matching interception capability objects, the step of intercepting the front-end operation request through the plugin includes: According to the front-end operation request, the data to be operated is obtained, the operation type, the operation action and the data to be operated are sent to multiple plugins, the initial processing results of multiple plugins are received, and the multiple initial processing results are merged to obtain the processing result.

3. The front-end operation interception processing method according to claim 2, characterized in that, After the step of sending the operation type, the operation action, and the data to be operated to multiple plugins, the method further includes: Obtain preprocessing information generated by each plugin based on the operation type, the operation action, and the data to be operated; Based on the preprocessed information, it is determined whether each plugin is ready, and the front-end operation request is intercepted and processed based on the ready plugin.

4. The front-end operation interception processing method according to any one of claims 1 to 3, characterized in that, When the values ​​of the attention operation type field and the attention operation action field are empty, the method further includes: Obtain an interception capability object whose field values ​​for the "Focus Operation Type" field and the "Focus Operation Action" field are empty, and use it as an interception capability object that matches the operation type and the operation action.

5. The front-end operation interception processing method according to any one of claims 1 to 3, characterized in that, The step of obtaining the operation type and operation action based on the front-end operation request includes: Read the request information of the front-end operation request, parse the request information to obtain the operation type and the operation action; or The GraphQL interface is invoked according to the front-end operation request, the interface parameters of the GraphQL interface are read, and the interface parameters are parsed to obtain the operation type and the operation action.

6. A front-end operation interception and processing device, characterized in that, include: The receiving module is used to receive front-end operation requests and obtain the operation type and operation action according to the front-end operation requests; The processing module is used to create an interception capability processor object based on the front-end operation request, and create at least one interception capability object based on the interception capability processor object. It determines whether there is an interception capability object that matches the operation type and the operation action. If there is, it calls the corresponding plugin based on the interception capability processor object and the matching interception capability object, and intercepts the front-end operation request through the plugin. Otherwise, it directly processes the front-end operation request. The update feedback module is used to update the database based on the processing result of the front-end operation request and to feed back the processing result to the front-end. Specifically, when the processing module creates at least one interception capability object based on the interception capability processor object, and determines whether there is an interception capability object that matches the operation type and the operation action, it is used for: Obtain the interception capability list field of the interception capability processor object, initialize it based on the interception capability list field to obtain the interception capability list; create at least one interception capability object based on the field values ​​in the interception capability list, the interception capability object at least includes a focus operation type field and a focus operation action field; determine whether the field values ​​of the focus operation type field and the focus operation action field match the operation type and the operation action, so as to obtain an interception capability object that matches the operation type and the operation action; The processing module is further configured to: obtain configuration files of multiple plugins before creating at least one interception capability object based on the field values ​​in the interception capability list, obtain the field values ​​of the attention operation type field and attention operation action field of the corresponding plugin from each configuration file, and generate an interception capability list corresponding to the fields of the interception capability list based on the multiple field values ​​obtained from the configuration files.

7. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the front-end operation interception processing method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the front-end operation interception processing method as described in any one of claims 1 to 5.