Controller method instance calling method, device, storage medium and server

By using variable mapping tables to query controller method instances in interface access requests, the problem of slow response speed in the prior art is solved, and more efficient controller method instance calls are realized, and system performance is improved.

CN115268401BActive Publication Date: 2025-08-08YGSOFT INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210892731.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-27
Publication Date
2025-08-08
Estimated Expiration
2042-07-27

AI Technical Summary

Technical Problem

In the prior art, the response speed of calling controller method instances is slow, especially when traversing the controller method instance HandlerMethod in a native mapping table, resulting in poor performance and affecting the user experience.

Method used

When receiving an interface access request, first query is performed in the variable mapping table. If the result is found, the controller method instance will be called directly. Otherwise, traversed in the native mapping table and cached the mapping relationship information into the variable mapping table to reduce duplicate queries.

Benefits of technology

The search speed and efficiency of controller method examples are improved, and the time complexity is reduced from O(n) to O(1), which improves the response speed and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115268401B_ABST
    Figure CN115268401B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, storage medium, and server for calling a controller method instance, and relates to the field of the Internet. When calling a controller method instance, upon receiving an interface access request with a variable, the present application can first query a variable mapping table. The variable mapping table caches mapping relationship information previously queried in a native mapping table. If a query result is obtained in the variable mapping table, the corresponding controller method instance is directly called, greatly improving the speed and efficiency of searching for the controller method instance, avoiding querying the native mapping table each time, and reducing the time complexity from O(n) to O(1).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of the Internet, and in particular to a method, device, storage medium, and server for calling a controller method instance. Background Art

[0002] During web application development, whether developing new module code to comply with RESTful interface specifications or migrating servlet processing within legacy modules, a large number of interface access requests containing variables are encountered. Due to the presence of variables in these requests, the native Spring MVC architecture has very poor processing performance for these requests. It is necessary to traverse native mapping tables containing tens of thousands of elements to locate the required controller method instance, the HandlerMethod. This significantly increases the response time of the Spring MVC architecture. In performance testing, the response time was approximately 100 milliseconds, severely impacting user experience. Summary of the Invention

[0003] The present invention provides a method, device, storage medium, and server for calling a controller method instance, which can solve the problem of slow response speed in calling a controller method instance in the prior art. The technical solution is as follows:

[0004] In a first aspect, an embodiment of the present application provides a method for calling a controller method instance, the method comprising:

[0005] Receive an interface access request; wherein the interface access request carries a path parameter and a value of the path parameter; the interface access request also carries a value of a call name and a value of a controller method instance name; the controller method instance is obtained by traversing the native mapping table according to the value of the call name and the value of the controller method instance name;

[0006] Identifying the value type of the path parameter value;

[0007] If the value type is a variable, query the variable mapping table according to the value of the path parameter;

[0008] If a controller method instance corresponding to the value of the path parameter is found, the found controller method instance is called;

[0009] If no controller method instance corresponding to the value of the path parameter is found, traverse the native mapping table according to the interface access request, obtain the value of the traversed controller method instance in the native mapping table, call the traversed controller method instance, and map the ID of the traversed controller method instance and the value of the path parameter of the traversed controller method instance to generate mapping relationship information, and write the generated mapping relationship information into the variable mapping table, wherein the variable mapping table and the native mapping table are hash mapping tables.

[0010] In a second aspect, an embodiment of the present application provides a device for calling a controller method instance, the device comprising:

[0011] A transceiver unit, configured to receive an interface access request; wherein the interface access request carries a path parameter and a value of the path parameter; the interface access request also carries a value of a call name and a value of a controller method instance name; the controller method instance is obtained by traversing the native mapping table based on the value of the call name and the value of the controller method instance name;

[0012] an identification unit, configured to identify a value type of the path parameter;

[0013] a query unit, configured to query a variable mapping table according to the value of the path parameter if the value type is a variable;

[0014] A calling unit, configured to call the queried controller method instance if a controller method instance corresponding to the value of the path parameter is found;

[0015] A writing unit is used to traverse the native mapping table according to the interface access request if no controller method instance corresponding to the value of the path parameter is queried, obtain the value of the traversed controller method instance in the native mapping table, call the traversed controller method instance, and map the ID of the traversed controller method instance and the value of the path parameter of the traversed controller method instance to generate mapping relationship information, and write the generated mapping relationship information into the variable mapping table, wherein the variable mapping table and the native mapping table are hash mapping tables.

[0016] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.

[0017] In a fourth aspect, an embodiment of the present application provides a server, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.

[0018] The beneficial effects of the technical solutions provided by some embodiments of the present application include at least:

[0019] In the embodiment of the present application, when a controller method instance is called and an interface access request with variables is received, a query can be first performed in the variable mapping table. The variable mapping table caches the mapping relationship information previously queried in the native mapping table. If a query result is obtained in the variable mapping table, the corresponding controller method instance is directly called, which greatly improves the speed and efficiency of finding the controller method instance and avoids querying the native mapping table every time, reducing the time complexity from O(n) to O(1). If a query result is not obtained in the variable mapping table, a traversal is performed in the native mapping table to obtain a traversal result, and the traversed mapping relationship information is cached in the variable mapping table. The next time an interface access request is received, the query result can be directly performed in the variable mapping table. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 This is a schematic diagram of the network architecture provided by the embodiment of the present application;

[0022] Figure 2 This is a flowchart of a method for calling a controller method instance provided in an embodiment of the present application;

[0023] Figure 3 This is a schematic diagram of the structure of a calling device of a controller method example provided by this application;

[0024] Figure 4 This is a structural diagram of a server provided by this application. DETAILED DESCRIPTION

[0025] In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.

[0026] It should be noted that the calling method of the controller method instance provided in this application is generally executed by a server, and accordingly, the calling device of the controller method instance is generally set in the server.

[0027] Figure 1An exemplary system architecture of a method for calling a controller method instance or a device for calling a controller method instance that can be applied to the present application is shown.

[0028] like Figure 1 As shown, the system architecture may include: a computer device 101 and a server 102. Computer device 101 and server 102 may communicate via a network, which serves as a medium for providing communication links between the aforementioned units. The network may include various types of wired or wireless communication links, such as optical fiber, twisted pair, or coaxial cable, and wireless communication links such as Bluetooth, Wi-Fi, or microwave.

[0029] Among them, the Spring MVC architecture is deployed in server 102. The Spring MVC architecture is a Java-based request-driven lightweight WEB framework that implements the MVC design pattern. By separating the Model, View, and Controller, the WEB layer is decoupled and complex WEB applications are divided into several logically clear parts, simplifying development, reducing errors, and facilitating cooperation between developers in the group.

[0030] It should be noted that computer device 101 and server 102 can be either hardware or software. When computer device 101 and server 102 are hardware, they can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When computer device 101 and server 102 are software, they can be implemented as multiple software programs or software modules (for example, to provide distributed services), or as a single software program or software module, without specific limitation herein.

[0031] Various communication client applications can be installed on the computer device of the present application, such as: video recording applications, video playback applications, voice interaction applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0032] A computer device can be either hardware or software. If the computer device is hardware, it can be any computer device with a display screen, including but not limited to smartphones, tablet computers, laptop computers, and desktop computers. If the computer device is software, it can be installed in the computer devices listed above. It can be implemented as multiple software programs or software modules (for example, to provide distributed services) or as a single software program or software module, without specific limitation here.

[0033] When the computer device is hardware, it may also be equipped with a display device and a camera. The display device can be any device capable of displaying a video, and the camera is used to capture video streams. For example, the display device may be a cathode ray tube display (CR), a light-emitting diode display (LED), an electronic ink screen, a liquid crystal display (LCD), or a plasma display panel (PDP). Users can use the display device on the computer device to view text, images, videos, and other information.

[0034] It should be understood that Figure 1 The number of computer devices, networks, and servers in the embodiment is only illustrative. Any number of computer devices, networks, and servers may be used as needed.

[0035] The following will be combined with the Figure 2 , the calling method of the controller method instance provided in the embodiment of the present application is described in detail. Among them, the calling device of the controller method instance in the embodiment of the present application can be Figure 1 The server shown.

[0036] See Figure 2 , provides a flowchart of a method for calling a controller method instance for an embodiment of the present application. Figure 2 As shown, the method of the embodiment of the present application may include the following steps:

[0037] S201: Receive an interface access request.

[0038] In an embodiment of the present application, a user sends an interface access request to a server through a browser on a terminal device. The interface access request is for a controller method instance HandlerMethod. The server deploys a Spring MVC architecture, which has multiple controller method instances installed. The interface access request carries a path parameter and its value. The path parameter's value represents the index of the controller method instance.

[0039] For example, a user-initiated interface access request is represented as: / reset / {callname} / {methodname}, / org / {i}, or / user / {i}. In org / {i}, the path parameter org represents the organization ID, and the i in the curly brackets represents the value of the corresponding organization ID. In user / {i}, the path parameter is the user ID, and the i in the curly brackets represents the value of the user ID. callname represents the value of the call name, and methodname represents the value of the controller method instance name.

[0040] S202: Identify the value type of the path parameter.

[0041] In the embodiments of the present application, value types include constants and variables. Constants, i.e., path values, are fixed values, while variables, i.e., path values, are uncertain values. For example, according to the example in S201, the user identifier is i, which is an uncertain value. Therefore, the value type of this path parameter is a variable. If the user identifier is represented as user / {10}, it is clear that the value type of this path parameter is a constant.

[0042] S203: If the value type is a variable, query the variable mapping table according to the value of the path parameter.

[0043] In an embodiment of the present application, if the value type is determined to be a variable based on the recognition result of S202, a query is performed in a preset variable mapping table based on the value of the path. The variable mapping table caches mapping relationship information representing the mapping relationship between the value of the path parameter and the ID of the controller method entity. The variable mapping table can store multiple mapping relationship information. The value is modified from a variable to a constant based on the numerical range of the path parameter, and then a query is performed in the variable mapping table based on the value of the modified path parameter. The variable mapping table is a mapping table extended in the existing Spring MVC architecture, and the native mapping table is a mapping table that comes with the Spring MVC architecture. For example, the native mapping table is RequestMappingHandlerMapping, and the variable mapping table is VariablePathHandlerMapping.

[0044] For example, the two mapping relationship information stored in the variable mapping table are represented as follows:<user / {1},HandlerMethod1> ,<user / {10}, HandlerMethod5> Based on the range of the path parameter, the path parameter value user / {i} is modified to the constant user / {1}. Then, based on user / {1}, a query is performed in the variable mapping table. Only one query is required to obtain the result. Furthermore, the variable mapping table is a hash mapping table. Based on the modified path parameter value, the query is performed in the hash mapping table, with a complexity of O(1).

[0045] S204: If a controller method instance corresponding to the value of the path parameter is found, the found controller method instance is called.

[0046] In an embodiment of the present application, if the ID of the controller method instance associated with the value of the path parameter is queried in the variable mapping table, the controller method instance is called, and then the response data of the controller method instance is returned to the user.

[0047] S205. If no controller method instance corresponding to the value of the path parameter is found, traverse the native mapping table according to the interface access request, obtain the value of the traversed controller method instance in the native mapping table, call the traversed controller method instance, and map the ID of the traversed controller method instance and the value of the traversed controller method instance to generate mapping relationship information, and write the generated mapping relationship information into the variable mapping table.

[0048] In this embodiment of the present application, if the interface access request is the first access, the query results in the variable mapping table cannot be obtained. In this case, the native mapping table is traversed based on the values of other parameters in the interface access request. The native mapping table stores the mapping relationship between the controller method instance ID and the values of the specified parameters. The native mapping table generally contains multiple elements, assuming the number is n, so the time complexity of the traversal is O(n).

[0049] Furthermore, the interface access request also carries the value of the call name and the value of the controller method instance name. For example, in the example of S201, callname represents the value of the call name, and methodname represents the value of the controller method instance name. The native mapping table is traversed according to the above values. Since the native mapping table stores complete mapping relationship information, the traversal result can always be obtained in the end.

[0050] In an embodiment of the present application, mapping relationship information is generated after mapping the ID of the controller method instance traversed in the native mapping table and the value of the traversed controller method instance, and the generated mapping relationship information is written into the variable mapping table. Then, the next time an interface access request is received, the query result can be directly queried in the variable mapping table, and the time complexity is reduced from O(n) to O(1), which greatly improves the efficiency of finding controller method instances and improves the response speed.

[0051] In the embodiment of the present application, if the value of the path parameter in S201 is a constant, the time complexity of searching the variable mapping table based on the existing traversal method is O(1). Furthermore, if the variable mapping table is a hash mapping table, searching the variable mapping table based on the hash algorithm can improve the query speed and efficiency.

[0052] In the embodiment of the present application, writing the generated mapping relationship information into the variable mapping table includes:

[0053] Determine whether the remaining space in the variable mapping table is greater than a space threshold;

[0054] If yes, write the generated mapping relationship information into the variable mapping table;

[0055] If not, the mapping relationship information that has not been used for the longest time is deleted from the variable mapping table, and after deletion, the generated mapping relationship information is written into the variable mapping table.

[0056] Among them, the mapping relationship table can be set with multiple storage units of equal size, each storage unit stores a mapping relationship information, when the number of free storage units in the mapping relationship table is less than the quantity threshold, it means that the remaining space of the mapping relationship table is insufficient, and the space threshold is determined by the above-mentioned quantity threshold. For example: the size of each storage unit is 1 byte, the quantity threshold is 4, then the space threshold is 4 bytes, and the size of the space threshold can be adjusted according to actual needs and is not limited here. If the remaining space is greater than the space threshold, the generated mapping relationship information is directly written into the variable mapping table; if the remaining space is not greater than the space threshold, the unused time of each mapping relationship information in the variable mapping table is counted, and the unused time represents the length of time between the current moment and the last time it was used. The mapping relationship information with the largest unused time is deleted, and then the generated mapping relationship information is written. This can improve the space utilization of the variable mapping table while ensuring the hit rate.

[0057] In an embodiment of the present application, the variable mapping table is deployed in the framework layer of the Spring MVC architecture, and the interface access request comes from the business layer of Spring MVC, that is, only the code of the framework layer is modified, and the business layer has no perception when calling the controller method instance in the framework layer based on the interface access request. The code of the business layer does not need to be modified, and the existing business logic is not destroyed, thereby reducing the workload of subsequent maintenance and development.

[0058] In the embodiment of the present application, when a controller method instance is called and an interface access request with variables is received, a query can be first performed in the variable mapping table. The variable mapping table caches the mapping relationship information previously queried in the native mapping table. If a query result is obtained in the variable mapping table, the corresponding controller method instance is directly called, which greatly improves the speed and efficiency of finding the controller method instance and avoids querying the native mapping table every time, reducing the time complexity from O(n) to O(1). If a query result is not obtained in the variable mapping table, a traversal is performed in the native mapping table to obtain a traversal result, and the traversed mapping relationship information is cached in the variable mapping table. The next time an interface access request is received, the query result can be directly performed in the variable mapping table.

[0059] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0060] See Figure 3 , which shows a schematic diagram of the structure of a calling device for a controller method example provided in an exemplary embodiment of the present application, hereinafter referred to as device 3. Device 3 can be implemented as all or part of a server through software, hardware, or a combination of both. Device 3 includes a transceiver unit 301, an identification unit 302, a query unit 303, a calling unit 304, and a writing unit 305.

[0061] The transceiver unit 301 is configured to receive an interface access request, wherein the interface access request carries a path parameter and a value of the path parameter;

[0062] An identification unit 302 is configured to identify a value type of the path parameter value;

[0063] a query unit, configured to query a variable mapping table according to the value of the path parameter if the value type is a variable;

[0064] The calling unit 303 is configured to call the found controller method instance if a controller method instance corresponding to the value of the path parameter is found.

[0065] The writing unit 304 is used to traverse the native mapping table according to the interface access request if no controller method instance corresponding to the value of the path parameter is queried, obtain the value of the traversed controller method instance in the native mapping table, call the traversed controller method instance, and map the ID of the traversed controller method instance and the value of the path parameter of the traversed controller method instance to generate mapping relationship information, and write the generated mapping relationship information into the variable mapping table.

[0066] In one or more possible embodiments, the calling unit 303 is further configured to:

[0067] If the value type is a constant, the native mapping table is traversed according to the access path request, and the traversed controller method instance is called.

[0068] In one or more possible embodiments, the interface access request also carries the value of the call name and the value of the controller method instance name; the controller method instance is obtained by traversing the native mapping table based on the value of the call name and the value of the controller method instance name.

[0069] In one or more possible embodiments, writing the generated mapping relationship information into the variable mapping table includes:

[0070] Determine whether the remaining space in the mapping relationship table is greater than a space threshold;

[0071] If yes, write the generated mapping relationship information into the variable relationship table;

[0072] If not, the mapping relationship information that has not been used for the longest time is deleted from the variable mapping table, and after deletion, the generated mapping relationship information is written into the variable mapping table.

[0073] In one or more possible embodiments, the variable mapping table and the native mapping table are hash mapping tables.

[0074] In one or more possible embodiments, the variable mapping table is deployed in the framework layer of the Spring MVC architecture, and the interface access request comes from the business layer of the Spring MVC.

[0075] In one or more possible embodiments, the path parameter includes a user ID and / or an organization ID.

[0076] It should be noted that the device 3 provided in the above embodiment only uses the division of the above functional modules as an example when executing the calling method of the controller method instance. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the above functions. In addition, the calling device of the controller method instance provided in the above embodiment and the calling method embodiment of the controller method instance are based on the same concept. The implementation process is detailed in the method embodiment and will not be repeated here.

[0077] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0078] The present application also provides a computer storage medium that can store multiple instructions, which are suitable for being loaded and executed by a processor as described above. Figure 2 The method steps of the embodiment shown, the specific execution process can be found in Figure 2 The detailed description of the illustrated embodiment will not be repeated here.

[0079] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the calling method of the controller method instance described in the above embodiments.

[0080] See Figure 4 , provides a structural diagram of a server according to an embodiment of the present application. Figure 4 As shown, the server 400 may include: at least one processor 401 , at least one network interface 404 , a memory 405 , and at least one communication bus 402 .

[0081] The communication bus 402 is used to implement the connection and communication between these components.

[0082] Optionally, the server 400 further includes: a user interface 403 , which may include a display screen (Display) and a camera (Camera). The user interface 403 may also include a standard wired interface and a wireless interface.

[0083] The network interface 404 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0084] Processor 401 may include one or more processing cores. Using various interfaces and circuits, processor 401 connects to various components within server 400. It executes instructions, programs, code sets, or instruction sets stored in memory 405, and accesses data stored in memory 405 to perform various server 400 functions and process data. Optionally, processor 401 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). Processor 401 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing content displayed on the display screen; and the modem handles wireless communications. It is understood that the modem may not be integrated into processor 401 but implemented as a separate chip.

[0085] Among them, the memory 405 may include a random access memory (RAM) or a read-only memory (Read-Only Memory). Optionally, the memory 405 includes a non-transitory computer-readable storage medium. The memory 405 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 405 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 405 may also be optionally at least one storage device located away from the aforementioned processor 401. As Figure 4 As shown, the memory 405 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program.

[0086] exist Figure 4In the server 400 shown, the user interface 403 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 401 can be used to call the application stored in the memory 405 and specifically execute the following Figure 2 The specific process can be referred to the method shown in Figure 2 As shown, no further details are given here.

[0087] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory, or a random access memory.

[0088] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A method for calling a controller method instance, characterized in that: include: Receive an interface access request; wherein the interface access request carries a path parameter and a value of the path parameter; the interface access request also carries a value of a call name and a value of a controller method instance name; the controller method instance is obtained by traversing the native mapping table according to the value of the call name and the value of the controller method instance name; Identifying the value type of the path parameter value; If the value type is a variable, query the variable mapping table according to the value of the path parameter; If a controller method instance corresponding to the value of the path parameter is found, the found controller method instance is called; If no controller method instance corresponding to the value of the path parameter is found, traverse the native mapping table according to the interface access request, obtain the value of the traversed controller method instance in the native mapping table, call the traversed controller method instance, and map the ID of the traversed controller method instance and the value of the path parameter of the traversed controller method instance to generate mapping relationship information, and write the generated mapping relationship information into the variable mapping table, wherein the variable mapping table and the native mapping table are hash mapping tables.

2. The method according to claim 1, characterized in that Also includes: If the value type is a constant, the native mapping table is traversed according to the interface access request, and the traversed controller method instance is called.

3. The method according to claim 1, characterized in that Writing the generated mapping relationship information into the variable mapping table includes: Determine whether the remaining space in the variable mapping table is greater than a space threshold; If yes, write the generated mapping relationship information into the variable mapping table; If not, the mapping relationship information that has not been used for the longest time is deleted from the variable mapping table, and after deletion, the generated mapping relationship information is written into the variable mapping table.

4. The method according to claim 1, wherein The variable mapping table is deployed in the framework layer of the Spring MVC architecture, and the interface access request comes from the business layer of Spring MVC.

5. The method according to claim 1, 2, 3 or 4, characterized in that: The path parameter includes a user ID and / or an organization ID.

6. A device for calling a controller method instance, characterized in that: include: A transceiver unit, configured to receive an interface access request; wherein the interface access request carries a path parameter and a value of the path parameter; the interface access request also carries a value of a call name and a value of a controller method instance name; the controller method instance is obtained by traversing the native mapping table based on the value of the call name and the value of the controller method instance name; an identification unit, configured to identify a value type of the path parameter; a query unit, configured to query a variable mapping table according to the value of the path parameter if the value type is a variable; A calling unit, configured to call the queried controller method instance if a controller method instance corresponding to the value of the path parameter is found; A writing unit is used to traverse the native mapping table according to the interface access request if no controller method instance corresponding to the value of the path parameter is queried, obtain the value of the traversed controller method instance in the native mapping table, call the traversed controller method instance, and map the ID of the traversed controller method instance and the value of the path parameter of the traversed controller method instance to generate mapping relationship information, and write the generated mapping relationship information into the variable mapping table, wherein the variable mapping table and the native mapping table are hash mapping tables.

7. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, which are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 5.

8. A server, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data request processing method, device and equipment for power industry management information system

    CN110134377A

  • Variable request method and system, computer equipment and computer readable storage medium

    CN111767311A