CN115525657A - Extensible network request message and forwarding system - Google Patents
Extensible network request message and forwarding system Download PDFInfo
- Publication number
- CN115525657A CN115525657A CN202211247580.5A CN202211247580A CN115525657A CN 115525657 A CN115525657 A CN 115525657A CN 202211247580 A CN202211247580 A CN 202211247580A CN 115525657 A CN115525657 A CN 115525657A
- Authority
- CN
- China
- Prior art keywords
- module
- api
- extended service
- access user
- access
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4488—Object-oriented
- G06F9/449—Object-oriented method invocation or resolution
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/50—Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Computational Linguistics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses an expandable network request message and forwarding system, which comprises a client module, a matching module, a service storage module, a data analysis module and a calling module, wherein a high-frequency module list based on all expanded service blocks is generated by setting the data analysis module, and a corresponding module message mapping table in the high-frequency module list is preferentially traversed, so that the condition that all module message mapping tables are traversed after API calling information currently transmitted by an access user is received every time is avoided; setting a relevant service block field, and updating a corresponding module message mapping table in the high-frequency module list by the self-traversing unit, so that the speed of calling relevant services by visitors is further increased; the matching unit acquires all the extended service blocks meeting the conditions based on the API calling information of the access user and displays the extended service blocks to the access user for secondary selection, so that the calling of the access user on the related functions is simplified, and the module structures of all the extended service modules do not need to be known.
Description
Technical Field
The invention relates to the technical field of network request message and forwarding, in particular to an extensible network request message and forwarding system.
Background
With the rise of cloud computing concepts and the popularization of internet online application software, when a user requests an online service, a command request may send an API call to a server through a network. And after receiving the network request data, the server analyzes the command and forwards the command to the corresponding module for processing. The API size of these cloud computing services can be very large, and will also expand continuously with the development of the service end. In the prior art, after a network sending request is received, two ways are provided for searching a corresponding entry function address, one way is to perform traversal according to a registered service module until a service entry corresponding to an API is found for calling; the other method is to explicitly specify a service module in a network request, however, the first method is not efficient enough, and when a plurality of modules at a service end meet the matched API service, all module message mapping tables in the service module need to be traversed, and finally, a traversal result is provided for a user to select, which is not very efficient; the second mode requires the user to know the module structure of the service end, thus increasing the complexity of calling the API service by the access user;
in order to solve the above problems, the present invention proposes a solution.
Disclosure of Invention
The invention aims to provide an extensible network request message and forwarding system, which aims to solve the problem that in the prior art, after a network sending request is received, two modes are used for searching a corresponding entry function address, wherein one mode is to traverse according to a registered service module until a service entry corresponding to an API is found for calling; the other method is to explicitly specify a service module in a network request, however, the first method is not efficient enough, and when a plurality of modules at a service end meet the matched API service, all module message mapping tables in the service module need to be traversed, and finally, a traversal result is provided for a user to select, which is not very efficient; the second method requires the user to know the module structure of the server, which increases the complexity of accessing the user to call the API service.
The purpose of the invention can be realized by the following technical scheme:
a scalable network request message and forwarding system, comprising:
the client module is used for acquiring and analyzing network request data of an access user, wherein the network request data of the access user comprises an access ip of the access user and API (application program interface) calling information of the access user; the API calling information of the access user comprises API key word data to be called by the access user;
the service storage module comprises a service storage unit A1, a service storage unit A2, a service storage unit Aa, and a is more than or equal to 1; the service storage unit A1 stores a module message mapping table of an extended service block B1, the service storage module A2 stores a module message mapping table of an extended service block B2, and the service storage unit Aa stores a module message mapping table of an extended service block Ba in sequence; dividing the extended service blocks into extended service blocks B1, B2, A, ba according to functions packaged by the entry functions in the module message mapping table of each extended service block;
the matching module is used for quickly matching the corresponding entry function address according to the API calling information of the current access user;
the calling module calls a corresponding service function according to the entry function address;
and the data analysis module is used for analyzing the network request data of the access user and all module message mapping tables stored in the service storage module to generate a high-frequency module list M1, and the high-frequency module list M1 stores extended service blocks judged according to a certain judgment rule.
Further, a mapping keyword, a mapping value and a related service block field are set in the module message mapping table, the mapping keyword field stores an API keyword, and the mapping value stores an entry function address corresponding to the API keyword; all associated extended service blocks are stored in the associated service block field, and all the associated extended service blocks refer to all the extended service blocks containing the API keyword; the default value of the associated extended services block field in the module message mapping table is set to null.
Further, the service storage module further includes a self-traversal unit, the self-traversal unit is configured to modify data in all module message mapping tables stored in the service storage module according to the high-frequency module list M1, and a specific modification rule is as follows:
s21: the self-traversing unit acquires all the extended service blocks stored in the high-frequency module list M1 and marks the extended service blocks as N1, N2, N, and Nn, wherein N is more than or equal to 1 and less than z;
s22: taking an extended service block N1 as an example, acquiring all API keywords stored in a module message mapping table corresponding to the N1 and marking the API keywords as Q1, Q2,. And Qq, wherein Q is more than or equal to 1;
s221: taking the API key Q1 as an example, traversing the data in all module message mapping tables, except the message mapping table of the current module corresponding to N1, stored in the service storage module by using the API key Q1 as a query condition:
if data meeting the query condition exists, modifying the stored null of the field of the associated extended service block corresponding to the API keyword Q1 into the extended service block corresponding to the queried data;
if not, no processing is carried out;
s222: according to S221, traversing data in message mapping tables of other modules except a message mapping table of a module corresponding to the current N1, which are stored in a service storage module, by using the API keywords Q1, Q2,. And Qq as query conditions in sequence, and correspondingly modifying contents in associated service block fields corresponding to the API keywords;
s23: and according to S22, modifying the content stored in the associated service block field corresponding to each API keyword in the module message mapping table stored in the service storage units N1, N2,. An, and Nn in sequence.
Further, the matching unit may quickly match the specific rule of the entry function address corresponding to the API call information of the access user as follows:
s11: the matching unit acquires service storage units corresponding to all the extended service blocks stored in the high-frequency module list M1 and re-marks the service storage units as R1, R2, R and Rr, wherein R is more than or equal to 1 and less than or equal to z, and the matching unit acquires the currently stored high-frequency module list M1;
s12: firstly, selecting a module message mapping table corresponding to a service storage unit R1 as a priority query table, using a select statement to query data in the first priority query table by using an API keyword to be called by an access user as a query condition, and generating query result data according to the queried data;
using an innell () function, taking 'nothing' and an API keyword to be called by an accessing user as a first form parameter and a second form parameter for defining the function, and when data meeting a query condition does not exist in a priority query table, querying result data containing two return values of 'nothing' and the API keyword to be called by the accessing user;
s13: the matching unit judges the current query result data:
s131: if the query result data does not have a return value 'nothing', the matching unit acquires an entry function address and extended service block data corresponding to an API keyword to be called by an access user in the priority query table;
if the extended service block data is null, the matching unit transmits an entry function address corresponding to an API keyword to be called by an access user to a calling module;
otherwise, the matching unit transmits the currently acquired extended service block data to a selection unit, the selection unit is used for displaying the extended service blocks for selection to the access user, the selection unit displays all extended service blocks corresponding to API keywords to be called by the access user after receiving the extended service block data transmitted by the matching unit, and after the access user selects, the selection unit acquires the extended service block data selected by the access user to generate a secondary matching instruction and transmits the secondary matching instruction to the matching unit;
the matching unit acquires the secondary matching instruction transmitted by the selection unit, then queries an entry function address corresponding to the API keyword in a module message mapping table of the extended service block according to the extended service block data selected by the access user and transmits the entry function address to the calling module;
s132: if the query result data has a return value 'nothing', sequentially using a module message mapping table corresponding to the service storage unit R3, the service storage unit R.
Querying data according to S12 to S131 until a return value 'nothing' does not exist in query result data, acquiring an entry function address corresponding to an API keyword to be called by an access user by the matching unit and transmitting the entry function address to a calling module;
if the query result data obtained by taking the module message mapping table corresponding to Rr as the priority query table still has a return value 'nothing', the matching unit obtains the module message mapping tables corresponding to all the other service storage units except the service storage units R1, R2, · and Rr;
the matching unit traverses all module message mapping tables corresponding to all the other service storage units except the service storage units R1, R2, and Rr to obtain all entry function addresses and extended service block data corresponding to API keywords to be called by the access user;
if a plurality of extended service blocks are stored in the extended service block, the matching unit transmits the currently acquired extended service block data to the selection unit, the selection unit is used for displaying and supplying the selected extended service block to an access user, the selection unit displays all extended service blocks corresponding to API keywords to be called by the access user to the access user after receiving the extended service block data transmitted by the matching unit, and after the access user selects, the selection unit acquires the extended service block data selected by the access user to generate a secondary matching instruction and transmits the secondary matching instruction to the matching unit;
and the matching unit acquires the secondary matching instruction transmitted by the selection unit and then queries an entry function address corresponding to the API keyword in a module message mapping table of the extended service block according to the extended service block data selected by the access user.
Further, the specific analysis steps of the data analysis module for analyzing and generating the high-frequency module list M1 are as follows:
s31: firstly, selecting a module message mapping table stored in a service storage unit A1 as a table to be traversed, acquiring all API keywords stored in the table to be traversed, and marking the API keywords as C1, C2, say, cc, wherein C is more than or equal to 1;
s32: performing access segment division, dividing an access period into D access segments with equal time length, and marking the D access segments of the access period as D1, D2,. And Dd, wherein D is more than or equal to 1;
s33: taking an API key word C1 as an example, acquiring the adjusted times F1, F2, and Ff of the C1 in one access segment of e access periods, wherein F is more than or equal to 1;
the called times of the C1 refer to the execution times of the entry function in the to-be-traversed table, which is consistent with the API calling information carried in the network request of the access user; the e access periods refer to backtracking the e access periods from the current access period as a starting point, wherein one access period is 1 day, and one access period is 60 minutes;
s34: using a formulaCalculating and obtaining discrete values G of C1 adjusted times F1, F2,.. And Ff in one access segment of e access periods, comparing G with G1, if G is larger than or equal to G1, deleting corresponding Fg values in sequence from big to small according to | Fg-F | and calculating discrete values G of the rest Fg values, and comparing G with G1 again until G is larger than or equal to G1<G1, wherein the G1 is a preset threshold value, and the F is an adjusted number average value participating in calculation of the residual discrete value G;
re-calibrating the adjusted times mean value F participating in calculation of the residual discrete value G as an adjusted value and marking the adjusted value as H1;
s35: according to S32 to S34, obtaining the regulated values H1, H2,. And Hd of C1 in d access sections of e access periods, and calculating and obtaining the regulated value mean value I1 participating in discrete value calculation;
s36: according to S31 to S35, calculating and obtaining adjusted value mean values I2, I3, the.
S37: screening the adjusted value mean values I2, I3, the adjusted frequency list J of the to-be-traversed table by the C1, C2, the.
S38: acquiring a weighted value L1 to be adjusted of the table to be traversed according to certain steps;
s39: according to S31 to S38, all module message mapping tables stored in the service storage module are selected as tables to be traversed, and weighted values L1, L2, L.
S310: and judging all the extended service blocks in the service storage module according to a certain rule and generating a high-frequency module list M1.
Further, in S37, a specific filtering rule for filtering the tuned high frequency list J to generate the to-be-traversed table is as follows:
s371: creating an empty list J, i.e., J = [ ];
s372: taking I1 as an example, if I1> I, then I1 is added to list J, when J = [ I1, ]; otherwise, no treatment is carried out on the I1;
s373: and comparing the I2, the I, the Ic and the I in sequence according to the S372 to obtain a final J, wherein the I is a preset adjusted threshold value.
Further, in S38, the step of obtaining the adjusted weight value L1 of the to-be-traversed table is as follows:
s381: acquiring all regulated values stored in a regulated high frequency list J of a table to be traversed, and re-marking the regulated values as K1, K2,. And Ki, wherein i is more than or equal to 1 and less than c;
s382: calculating and acquiring a mean value K of all regulated values K1, K2, the preset temperature and Ki stored in a regulated high frequency list J by using a formula K = (K1 + K2+. Eta)/i;
s383: the adjusted weight value L1 of the table to be traversed is obtained by calculation using the formula L1= K (i/c 100%).
The invention has the beneficial effects that:
(1) According to the invention, the data analysis module is arranged to analyze the module message mapping table of each extended service block based on the API call information of the access user to generate the current high-frequency module list based on all the extended service blocks, and traversal query is preferentially carried out on the extended service blocks stored in the high-frequency module list based on the API call information currently transmitted by the access user, so that the condition that the access user calls the related service at a slow speed caused by traversing all the module message mapping tables after receiving the API call information currently transmitted by the access user is avoided; on the other hand, the self-traversing unit updates the storage content corresponding to each API keyword in the module message mapping table corresponding to all the extended service blocks in the high-frequency module list by setting the associated service block fields in the module message mapping table, so that the speed of calling related services by visitors is further increased;
(2) According to the invention, all the extended service blocks meeting the current API calling information are obtained by the matching unit based on the API calling information of the current access user, and the matching unit is arranged to display all the extended service blocks meeting the current API calling information to the access user for secondary selection, so that on one hand, the calling of the access user on related functions is simplified, the module structures of all the extended service modules are not required to be known, and on the other hand, the data security of the extended service modules is ensured.
Drawings
The invention will be further described with reference to the accompanying drawings.
FIG. 1 is a system block diagram of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, an extensible network request message and forwarding system includes a client module, a matching module, a service storage module, a data analysis module, and a call module.
The client module is configured to acquire and analyze network request data of an access user, where in this embodiment, the network request data of the access user includes an access ip of the access user and API call information of the access user; in this embodiment, the API call information of the access user includes an API keyword to be called by the access user;
the client module obtains the network request data of the access user, then obtains API call information in the network request data corresponding to the access user through analysis, and transmits the API call information to the matching module;
the matching module is used for quickly matching to a corresponding entry function address according to the API call information of the access user transmitted currently;
the matching module comprises a matching unit and a selecting unit, and after receiving API calling information in the network request data corresponding to the access user, the matching module acquires API key word data to be called by the access user; the matching module transmits API keyword data to be called by the access user to a matching unit;
the matching unit is used for quickly matching the corresponding entry function address according to API keyword data to be called by the access user transmitted currently, the matching unit acquires the currently stored high-frequency module list M1 after receiving the API keyword data to be called by the access user transmitted by the matching module, and quickly matches the entry function address corresponding to the API calling information of the access user according to a certain matching rule, wherein the specific matching rule is as follows:
s11: the matching unit acquires service storage units corresponding to all the extended service blocks stored in the high-frequency module list M1 and re-marks the service storage units as R1, R2, R and Rr, wherein R is more than or equal to 1 and less than or equal to z;
s12: firstly, selecting a module message mapping table corresponding to a service storage unit R1 as a priority query table, using a select statement to query data in a first priority query table by using API keywords to be called by an access user as query conditions, and generating query result data according to the queried data;
using an innull () function, taking 'nothing' and API keywords to be called by an access user as a first parameter and a second parameter for defining the function, and when data meeting query conditions do not exist in a priority query table, querying result data comprises two return values of 'nothing' and the API keywords to be called by the access user;
s13: the matching unit judges the current query result data:
s131: if the query result data does not have a return value 'nothing', the matching unit acquires an entry function address and extended service block data corresponding to an API keyword to be called by an access user in the priority query table;
if the extended service block data is null, the matching unit transmits an entry function address corresponding to an API keyword to be called by an access user to a calling module;
otherwise, the matching unit transmits the currently acquired extended service block data to the selection unit;
the selection unit is used for displaying the extended service blocks for selection to the access user, the selection unit displays all extended service blocks corresponding to the API keywords to be called by the access user after receiving the extended service block data transmitted by the matching unit, and after the access user selects, the selection unit acquires the extended service block data selected by the access user to generate a secondary matching instruction and transmits the secondary matching instruction to the matching unit;
the matching unit acquires the secondary matching instruction transmitted by the selection unit, then queries an entry function address corresponding to the API keyword in a module message mapping table of the extended service block according to the extended service block data selected by the access user and transmits the entry function address to the calling module;
s132: if the query result data has a return value 'nothing', sequentially using a module message mapping table corresponding to the service storage unit R3, the service storage unit R.
Inquiring data according to S12 to S131 until a return value 'nothing' does not exist in the inquiry result data, acquiring an entry function address corresponding to an API keyword to be called by an access user by the matching unit and transmitting the entry function address to a calling module;
if the query result data obtained by taking the module message mapping table corresponding to Rr as the priority query table still has a return value 'nothing', the matching unit obtains the module message mapping tables corresponding to all the other service storage units except the service storage units R1, R2, · and Rr;
the matching unit traverses all module message mapping tables corresponding to all the other service storage units except the service storage units R1, R2, rr to acquire all entry function addresses and extended service block data corresponding to API keywords to be called by the access user;
if a plurality of extended service blocks are stored in the extended service block, the matching unit transmits the currently acquired extended service block data to the selection unit;
the selection unit is used for displaying the extended service blocks for selection to the access user, the selection unit displays all extended service blocks corresponding to the API keywords to be called by the access user after receiving the extended service block data transmitted by the matching unit, and after the access user selects, the selection unit acquires the extended service block data selected by the access user to generate a secondary matching instruction and transmits the secondary matching instruction to the matching unit;
the matching unit acquires the secondary matching instruction transmitted by the selection unit, then queries an entry function address corresponding to the API keyword in a module message mapping table of the extended service block according to the extended service block data selected by the access user and transmits the entry function address to the calling module;
otherwise, the matching unit transmits the entry function address corresponding to the API keyword to be called by the access user to the calling module;
and the calling module calls the corresponding service function according to the entry function address, and after receiving the entry function address corresponding to the API keyword to be called by the access user transmitted by the matching unit, the calling module calls the corresponding service function according to the entry function address.
The service storage module comprises a service storage unit A1, a service storage unit A2, a service storage unit Aa and a self-traversing unit, wherein a is more than or equal to 1;
the service storage unit A1 stores a module message mapping table of an extended service block B1, the service storage module A2 stores a module message mapping table of an extended service block B2, and the service storage unit Aa stores a module message mapping table of an extended service block Ba in sequence; in this embodiment, the extended service blocks are divided into extended service blocks B1, B2,. And Ba according to functions encapsulated by entry functions in the module message mapping table of each extended service block;
the module message mapping table is provided with mapping keywords, mapping values and associated service block fields, wherein API keywords are stored in the mapping keyword fields, and entry function addresses corresponding to the API keywords are stored in the mapping values; all associated extended service blocks are stored in the associated service block field, and in this embodiment, all associated extended service blocks refer to all extended service blocks including the API keyword; in this embodiment, the default value of the associated extended service block field in the module message mapping table is set to "null";
the service storage module receives the high-frequency module list M1 transmitted by the data analysis module and then transmits the high-frequency module list M1 to the self-traversing unit, the self-traversing unit receives the high-frequency module list M1 transmitted by the service storage module and then modifies data stored in a module message mapping table in the service storage unit A1, the service storage unit A2, the service storage unit Aa according to a certain modification rule, and the specific modification rule is as follows:
s21: the self-traversing unit acquires all the extended service blocks stored in the high-frequency module list M1 and marks the extended service blocks as N1, N2, N, wherein N is more than or equal to 1 and less than z;
s22: taking an extended service block N1 as an example, acquiring all API keywords stored in a module message mapping table corresponding to the N1 and marking the API keywords as Q1, Q2,. And Qq, wherein Q is more than or equal to 1;
s221: taking the API key Q1 as an example, traversing the data in all module message mapping tables, except the message mapping table of the current module corresponding to N1, stored in the service storage module by using the API key Q1 as a query condition:
if data meeting the query condition exists, modifying the stored null of the field of the associated extended service block corresponding to the API keyword Q1 into the extended service block corresponding to the queried data;
if not, no processing is carried out;
s222: traversing data in message mapping tables of other modules except a message mapping table of a current module corresponding to the N1, which are stored in a service storage module, by using the API keywords Q1, Q2,. And Qq as query conditions in sequence according to S221, and correspondingly modifying contents in associated service block fields corresponding to the API keywords;
s23: according to S22, modifying the content stored in the associated service block field corresponding to each API keyword in the module message mapping table stored in the service storage units N1, N2,. And Nn in sequence;
the data analysis module is used for carrying out data analysis on the network request data of the access user and all module message mapping tables stored in the service storage module, and the specific analysis steps are as follows:
s31: firstly, selecting a module message mapping table stored in a service storage unit A1 as a table to be traversed, acquiring all API keywords stored in the table to be traversed, and marking the API keywords as C1, C2, C.
S32: performing access segment division, dividing an access period into D access segments with equal time length, and marking the D access segments of the access period as D1, D2,. And Dd, wherein D is more than or equal to 1;
s33: taking an API key word C1 as an example, acquiring the adjusted times F1, F2, and Ff of the C1 in one access segment of e access periods, wherein F is more than or equal to 1;
in this embodiment, the called number of times of C1 refers to the number of times of executing an entry function in the to-be-traversed table, which is consistent with the API call information carried in the network request of the access user; the e access periods refer to backtracking the e access periods from the current access period as a starting point to the past, and in this embodiment, one access period is 1 day, and one access period is 60 minutes;
s34: using formulasCalculating and obtaining discrete values G of C1 adjusted times F1, F2,.. And Ff in one access segment of e access periods, comparing G with G1, if G is larger than or equal to G1, deleting corresponding Fg values in sequence from big to small according to | Fg-F | and calculating discrete values G of the rest Fg values, and comparing G with G1 again until G is larger than or equal to G1<G1, in this embodiment, G1 is a predetermined threshold valueF is the average value of the adjusted times participating in calculation of the residual discrete value G;
re-calibrating the adjusted times mean value F participating in calculation of the residual discrete value G as an adjusted value and marking the adjusted value as H1;
s35: according to S32 to S34, obtaining the regulated values H1, H2,. And Hd of C1 in d access sections of e access periods, and calculating to obtain a regulated value mean value I1 participating in discrete value calculation;
s36: according to S31 to S35, calculating and obtaining adjusted value mean values I2, I3, the.
S37: screening the adjusted value mean values I2, I3, a right language and Ic which are calculated by taking reference to discrete values in d access sections of e access periods for C1, C2, a right language and Cc according to a certain screening rule to generate an adjusted high frequency list J of the to-be-traversed table, wherein the specific screening rule is as follows:
s371: creating an empty list J, i.e., J = [ ];
s372: taking I1 as an example, if I1> I, then I1 is added to list J, when J = [ I1, ]; otherwise, no treatment is carried out on the I1;
s373: sequentially comparing I2, I.. And Ic with I according to S372 to obtain a final J, wherein I is a preset adjusted threshold value;
s38: acquiring a weighted value L1 to be adjusted of a to-be-traversed table according to certain steps, wherein the specific steps are as follows;
s381: acquiring all regulated values stored in a regulated high frequency list J of a to-be-traversed table and re-marking the regulated values as K1, K2, 1.. And Ki, wherein i is more than or equal to 1 and is less than c;
s382: calculating and acquiring a mean value K of all regulated values K1, K2, the preset temperature and Ki stored in a regulated high frequency list J by using a formula K = (K1 + K2+. Eta)/i;
s383: calculating and acquiring a weighted value L1 to be adjusted of the table to be traversed by using a formula L1= K (i/c 100%);
s39: according to S31 to S38, all module message mapping tables stored in the service storage module are selected as tables to be traversed, and weighted values L1, L2, L.
S310: judging all the extended service blocks in the service storage module according to a certain rule and generating a high-frequency module list M1, wherein the specific judgment rule is as follows:
s3101: creating a temporary list M2= [ ] using the list () method;
s3102: taking L1 as an example, comparing L1 with L, where L is a preset adjusted threshold:
if the L1 is larger than or equal to the L, judging that the extended service block corresponding to the to-be-traversed table with the weighted value of L1 is a high-frequency access module, and adding the L1 into M2, wherein the M2= [ L1 ];
otherwise, no processing is carried out;
s3103: according to S3102, sequentially judging the extended service blocks corresponding to the tables to be traversed with the weighted values of L1, L2,. And Lz, and obtaining a final temporary list M2;
s3104: setting a parameter 'reverts = True' by using a sort () function, and sorting the adjusted weight values stored in the finally obtained temporary list M2 from large to small;
s3105: re-marking the sorted temporary list M2 as a high-frequency module list and marking the high-frequency module list as M1;
the data analysis module transmits the final high-frequency module list M1 to the matching module and the service storage module respectively;
the matching module receives the high-frequency module list M1 transmitted by the data analysis module and then transmits the high-frequency module list M1 to the matching unit, and the matching unit receives the high-frequency module list M1 transmitted by the matching module and then permanently stores the high-frequency module list M1.
In the description herein, references to the description of "one embodiment," "an example," "a specific example" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is illustrative and explanatory only, and it will be appreciated by those skilled in the art that various modifications, additions and substitutions can be made to the embodiments described without departing from the scope of the invention as defined in the appended claims.
While one embodiment of the present invention has been described in detail, the description is only a preferred embodiment of the present invention and should not be taken as limiting the scope of the invention. All equivalent changes and modifications made within the scope of the present invention shall fall within the scope of the present invention.
Claims (7)
1. An extensible network request message and forwarding system, comprising:
the client module is used for acquiring and analyzing network request data of an access user, wherein the network request data of the access user comprises an access ip of the access user and API (application program interface) calling information of the access user; the API calling information of the access user comprises API key word data to be called by the access user;
the service storage module comprises a service storage unit A1, a service storage unit A2, a service storage unit Aa, and a is more than or equal to 1; the service storage unit A1 stores a module message mapping table of an extended service block B1, the service storage module A2 stores a module message mapping table of an extended service block B2, and the service storage unit Aa stores a module message mapping table of an extended service block Ba in sequence; dividing the extended service blocks into extended service blocks B1, B2, A, ba according to functions packaged by the entry functions in the module message mapping table of each extended service block;
the matching module is used for quickly matching the corresponding entry function address according to the API calling information of the current access user;
the calling module calls a corresponding service function according to the entry function address;
and the data analysis module is used for analyzing the network request data of the access user and all module message mapping tables stored in the service storage module to generate a high-frequency module list M1, and the high-frequency module list M1 stores extended service blocks judged according to a certain judgment rule.
2. The extensible network request message and forwarding system of claim 1, wherein a mapping key, a mapping value, and an associated service block field are provided in the module message mapping table, an API key is stored in the mapping key field, and an entry function address corresponding to the API key is stored in the mapping value; all associated extended service blocks are stored in the associated service block field, and all the associated extended service blocks refer to all the extended service blocks containing the API keyword; the default value of the associated extended services block field in the module message mapping table is set to null.
3. The extensible network request messaging and forwarding system of claim 1, wherein the service storage module further comprises a self-traversal unit, the self-traversal unit is configured to modify data in all module message mapping tables stored in the service storage module according to the high-frequency module list M1, and specific modification rules are as follows:
s21: the self-traversing unit acquires all the extended service blocks stored in the high-frequency module list M1 and marks the extended service blocks as N1, N2, N, and Nn, wherein N is more than or equal to 1 and less than z;
s22: taking the extended service block N1 as an example, acquiring all API keywords stored in a module message mapping table corresponding to the N1 and marking the API keywords as Q1, Q2, a.
S221: taking the API keyword Q1 as an example, traversing the data in all module message mapping tables stored in the service storage module except the message mapping table of the current module corresponding to the N1 by taking the API keyword Q1 as a query condition:
if the data meeting the query condition exist, modifying the stored null of the associated extended service block field corresponding to the API keyword Q1 into the extended service block corresponding to the queried data;
if not, no processing is carried out;
s222: according to S221, traversing data in message mapping tables of other modules except a message mapping table of a module corresponding to the current N1, which are stored in a service storage module, by using the API keywords Q1, Q2,. And Qq as query conditions in sequence, and correspondingly modifying contents in associated service block fields corresponding to the API keywords;
s23: and according to S22, modifying the content stored in the associated service block field corresponding to each API keyword in the module message mapping table stored in the service storage units N1, N2.
4. The extensible network request message and forwarding system of claim 1, wherein the matching unit is configured to quickly match the entry function address corresponding to the API call information to the accessing user according to the following specific rules:
s11: the matching unit acquires service storage units corresponding to all the extended service blocks stored in the high-frequency module list M1 and re-marks the service storage units as R1, R2, R, rr, wherein R is more than or equal to 1 and less than or equal to z, and the matching unit acquires the currently stored high-frequency module list M1;
s12: firstly, selecting a module message mapping table corresponding to a service storage unit R1 as a priority query table, using a select statement to query data in a first priority query table by using API keywords to be called by an access user as query conditions, and generating query result data according to the queried data;
using an innell () function, taking 'nothing' and an API keyword to be called by an accessing user as a first form parameter and a second form parameter for defining the function, and when data meeting a query condition does not exist in a priority query table, querying result data containing two return values of 'nothing' and the API keyword to be called by the accessing user;
s13: the matching unit judges the current query result data:
s131: if the query result data does not have a return value 'nothing', the matching unit acquires an entry function address and extended service block data corresponding to an API keyword to be called by an access user in the priority query table;
if the extended service block data is null, the matching unit transmits an entry function address corresponding to an API keyword to be called by an access user to a calling module;
otherwise, the matching unit transmits the currently acquired extended service block data to the selection unit, the selection unit is used for displaying and providing the selected extended service block for the access user, the selection unit displays all extended service blocks corresponding to the API keywords to be called by the access user after receiving the extended service block data transmitted by the matching unit, and after the access user selects, the selection unit acquires the extended service block data selected by the access user to generate a secondary matching instruction and transmits the secondary matching instruction to the matching unit;
the matching unit acquires the secondary matching instruction transmitted by the selection unit, then inquires an entry function address corresponding to the API keyword in a module message mapping table of the extended service block according to the extended service block data selected by the access user and transmits the entry function address to the calling module;
s132: if a return value 'nothing' exists in the query result data, sequentially using module message mapping tables corresponding to the service storage units R3, R, rr as a priority query table;
inquiring data according to S12 to S131 until a return value 'nothing' does not exist in the inquiry result data, acquiring an entry function address corresponding to an API keyword to be called by an access user by the matching unit and transmitting the entry function address to a calling module;
if a return value 'nothing' still exists in query result data acquired by taking the module message mapping table corresponding to Rr as a priority query table, the matching unit acquires module message mapping tables corresponding to all service storage units except the service storage units R1, R2,. And Rr;
the matching unit traverses all module message mapping tables corresponding to all the other service storage units except the service storage units R1, R2, and Rr to obtain all entry function addresses and extended service block data corresponding to API keywords to be called by the access user;
if a plurality of extended service blocks are stored in the extended service block, the matching unit transmits the currently acquired extended service block data to the selection unit, the selection unit is used for displaying and supplying the selected extended service block to an access user, the selection unit displays all extended service blocks corresponding to API keywords to be called by the access user to the access user after receiving the extended service block data transmitted by the matching unit, and after the access user selects, the selection unit acquires the extended service block data selected by the access user to generate a secondary matching instruction and transmits the secondary matching instruction to the matching unit;
and the matching unit acquires the secondary matching instruction transmitted by the selection unit and then queries an entry function address corresponding to the API keyword in a module message mapping table of the extended service block according to the extended service block data selected by the access user.
5. The scalable network request message and forwarding system of claim 1, wherein the data analysis module analyzes the generated high frequency module list M1 by the following steps:
s31: firstly, selecting a module message mapping table stored in a service storage unit A1 as a table to be traversed, acquiring all API keywords stored in the table to be traversed, and marking the API keywords as C1, C2, C.
S32: performing access segment division, dividing an access period into D access segments with equal time length, and marking the D access segments of the access period as D1, D2,. And Dd, wherein D is more than or equal to 1;
s33: taking an API key word C1 as an example, acquiring the adjusted times F1, F2, and Ff of the C1 in one access segment of e access periods, wherein F is more than or equal to 1;
the called times of the C1 refer to the execution times of the entry function in the to-be-traversed table, which is consistent with the API calling information carried in the network request of the access user; the e access periods are traced back to the past by taking the current access period as a starting point, one access period is 1 day, and one access segment is 60 minutes;
s34: using formulasCalculating and obtaining discrete values G of C1 adjusted times F1, F2,.. And Ff in one access segment of e access periods, comparing G with G1, if G is larger than or equal to G1, deleting corresponding Fg values in sequence from big to small according to | Fg-F | and calculating discrete values G of the rest Fg values, and comparing G with G1 again until G is larger than or equal to G1<G1, wherein the G1 is a preset threshold value, and the F is the average value of the adjusted times participating in calculation of the residual discrete value G;
re-calibrating the adjusted times mean value F participating in calculation of the residual discrete value G as an adjusted value and marking the adjusted value as H1;
s35: according to S32 to S34, obtaining the regulated values H1, H2,. And Hd of C1 in d access sections of e access periods, and calculating to obtain a regulated value mean value I1 participating in discrete value calculation;
s36: according to S31 to S35, calculating and obtaining adjusted value mean values I2, I3, the.
S37: screening the adjusted value mean values I2, I3, the adjusted frequency list J of the to-be-traversed table by the C1, C2, the.
S38: acquiring a weighted value L1 to be adjusted of the table to be traversed according to certain steps;
s39: according to S31 to S38, all module message mapping tables stored in the service storage module are selected as tables to be traversed, and weighted values L1, L2, L.
S310: and judging all the extended service blocks in the service storage module according to a certain rule and generating a high-frequency module list M1.
6. The scalable network request message and forwarding system of claim 5, wherein at S37, the specific filtering rule for filtering the tuned high frequency list J generating the to-be-traversed table is as follows:
s371: creating an empty list J, i.e., J = [ ];
s372: taking I1 as an example, if I1> I, then I1 is added to list J, when J = [ I1, ]; otherwise, no treatment is carried out on the I1;
s373: and comparing the I2, the I, the Ic and the I in sequence according to the S372 to obtain a final J, wherein the I is a preset adjusted threshold value.
7. The scalable network request message and forwarding system of claim 5, wherein the step of S38 obtaining the weighted value L1 of the to-be-traversed table is as follows:
s381: acquiring all regulated values stored in a regulated high frequency list J of a table to be traversed, and re-marking the regulated values as K1, K2,. And Ki, wherein i is more than or equal to 1 and less than c;
s382: calculating and acquiring a mean value K of all regulated values K1, K2, the preset temperature and Ki stored in a regulated high frequency list J by using a formula K = (K1 + K2+. Eta)/i;
s383: and calculating the adjusted weight value L1 of the table to be traversed by using the formula L1= K (i/c 100%).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211247580.5A CN115525657B (en) | 2022-10-12 | 2022-10-12 | Extensible network request message and forwarding system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211247580.5A CN115525657B (en) | 2022-10-12 | 2022-10-12 | Extensible network request message and forwarding system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115525657A true CN115525657A (en) | 2022-12-27 |
CN115525657B CN115525657B (en) | 2023-07-11 |
Family
ID=84702016
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211247580.5A Active CN115525657B (en) | 2022-10-12 | 2022-10-12 | Extensible network request message and forwarding system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115525657B (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090076885A1 (en) * | 2007-09-19 | 2009-03-19 | Fein Gene S | Multiple Data Transfers to Generate User Dependent Lifestyle Choice Recommendation |
CN103914337A (en) * | 2014-03-24 | 2014-07-09 | 小米科技有限责任公司 | Service calling method, device and terminal |
CN105721538A (en) * | 2015-12-30 | 2016-06-29 | 东莞市青麦田数码科技有限公司 | Data access method and apparatus |
CN108762917A (en) * | 2018-05-04 | 2018-11-06 | 平安科技(深圳)有限公司 | Access request processing method, device, system, computer equipment and storage medium |
CN109451084A (en) * | 2018-09-14 | 2019-03-08 | 华为技术有限公司 | A kind of service access method and device |
CN110601983A (en) * | 2019-10-15 | 2019-12-20 | 南京信息职业技术学院 | Method and system for forwarding routing without sensing source of protocol |
CN110928709A (en) * | 2019-11-21 | 2020-03-27 | 中国民航信息网络股份有限公司 | Service calling method and device under micro-service framework and server |
CN112261172A (en) * | 2020-10-19 | 2021-01-22 | 腾讯科技(深圳)有限公司 | Service addressing access method, device, system, equipment and medium |
US20210110343A1 (en) * | 2019-10-10 | 2021-04-15 | United States Postal Service | Methods and systems for generating address score information |
CN113196723A (en) * | 2018-11-15 | 2021-07-30 | Vm维尔股份有限公司 | Layer four optimization in virtual networks defined on public clouds |
CN114079669A (en) * | 2015-04-07 | 2022-02-22 | 安博科技有限公司 | System and method for providing Global Virtual Network (GVN) |
CN114650221A (en) * | 2022-02-21 | 2022-06-21 | 福州汇思博信息技术有限公司 | Method and system for quickly calling service interface |
-
2022
- 2022-10-12 CN CN202211247580.5A patent/CN115525657B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090076885A1 (en) * | 2007-09-19 | 2009-03-19 | Fein Gene S | Multiple Data Transfers to Generate User Dependent Lifestyle Choice Recommendation |
CN103914337A (en) * | 2014-03-24 | 2014-07-09 | 小米科技有限责任公司 | Service calling method, device and terminal |
CN114079669A (en) * | 2015-04-07 | 2022-02-22 | 安博科技有限公司 | System and method for providing Global Virtual Network (GVN) |
CN105721538A (en) * | 2015-12-30 | 2016-06-29 | 东莞市青麦田数码科技有限公司 | Data access method and apparatus |
CN108762917A (en) * | 2018-05-04 | 2018-11-06 | 平安科技(深圳)有限公司 | Access request processing method, device, system, computer equipment and storage medium |
CN109451084A (en) * | 2018-09-14 | 2019-03-08 | 华为技术有限公司 | A kind of service access method and device |
CN113196723A (en) * | 2018-11-15 | 2021-07-30 | Vm维尔股份有限公司 | Layer four optimization in virtual networks defined on public clouds |
US20210110343A1 (en) * | 2019-10-10 | 2021-04-15 | United States Postal Service | Methods and systems for generating address score information |
CN110601983A (en) * | 2019-10-15 | 2019-12-20 | 南京信息职业技术学院 | Method and system for forwarding routing without sensing source of protocol |
CN110928709A (en) * | 2019-11-21 | 2020-03-27 | 中国民航信息网络股份有限公司 | Service calling method and device under micro-service framework and server |
CN112261172A (en) * | 2020-10-19 | 2021-01-22 | 腾讯科技(深圳)有限公司 | Service addressing access method, device, system, equipment and medium |
CN114650221A (en) * | 2022-02-21 | 2022-06-21 | 福州汇思博信息技术有限公司 | Method and system for quickly calling service interface |
Non-Patent Citations (2)
Title |
---|
TAO HU 等: "SEAPP: A secure application management framework based on REST API access control in SDN-enabled cloud environment", 《JOURNAL OF PARALLEL AND DISTRIBUTED COMPUTING》, vol. 147, pages 108 - 123, XP086332835, DOI: 10.1016/j.jpdc.2020.09.006 * |
夏艺慈: "基于微服务技术的分布式测试***管理软件设计及实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 01, pages 138 - 566 * |
Also Published As
Publication number | Publication date |
---|---|
CN115525657B (en) | 2023-07-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20190340208A1 (en) | Compatibility Scoring of Users | |
US7657839B2 (en) | System for replying to related messages | |
US7962508B2 (en) | System and method for searching and retrieving related messages | |
US7373351B2 (en) | Generic search engine framework | |
US8260823B2 (en) | Dissemination, acquisition, discovery and use of people-oriented folksonomies | |
CN110147437A (en) | A kind of searching method and device of knowledge based map | |
US6003076A (en) | Information providing method and system using information modification rules | |
CN109582849A (en) | A kind of Internet resources intelligent search method of knowledge based map | |
CN113609401A (en) | Dynamic display method of book city channel page, electronic equipment and storage medium | |
CN113157904A (en) | Sensitive word filtering method and system based on DFA algorithm | |
CN116048517B (en) | API (application program interface) generating method, system and device based on B/S (browser/Server) architecture application system | |
CN115525657A (en) | Extensible network request message and forwarding system | |
JP3525885B2 (en) | Multidirectional search service method and recording medium recording the program | |
CN108959584A (en) | A kind of method and device of the processing diagram data based on community structure | |
CN103077218B (en) | A kind of for determining the method and apparatus of the demand information of search sequence in inquiry request | |
CN107220273B (en) | Cartoon character face searching method | |
CN108615182A (en) | A kind of method and system that product intelligent is recommended | |
US20030092431A1 (en) | Service information providing system, service information providing method, and control station | |
CN111950821A (en) | Test method, test device and server | |
JP7396743B1 (en) | information processing equipment | |
CN110602198B (en) | Client network request link configuration method and system | |
CN111461833B (en) | Information loading method, system, server, terminal and storage medium | |
US7389493B1 (en) | Categories on a per instance basis | |
CN113641911B (en) | Advertisement interception rule base establishing method, device, equipment and storage medium | |
CN115495769B (en) | Data desensitization method, system, readable storage medium and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |