A front-end and back-end data interaction method and system
By adding interaction units and multiple back-end service interfaces to the front-end and back-end separation architecture, the security and efficiency issues of front-end and back-end data transmission are solved, and efficient and safe data interaction is achieved.
Patent Information
- Application Number
- CN202411186363.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-08-28
AI Technical Summary
Under the architecture of separation of front and back ends, there are high coupling and security problems of back end data, especially the plaintext transmission of front and back end data transmission, resulting in extremely low security.
By adding interactive units, multiple back-end service interfaces are established, and the corresponding back-end server interface is selected according to the user's resource requirements to achieve fast data response. In addition, through authentication and encryption parameter settings, clear text transmission between the front and back ends is avoided, and the call plan for the back-end service interface is formulated according to the load balancing principle.
It improves the security and efficiency of front-end and back-end data interaction, reduces user waiting time, and ensures data response speed through load balancing.
Smart Images

Figure CN118714181B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of front-end and back-end data interaction, and in particular to a front-end and back-end data interaction method and system. Background Art
[0002] At present, with the development of Web application technology, traditional Internet front-end and back-end coupled applications are gradually replaced by front-end and back-end separated Web application systems. In traditional Web applications, session mechanisms are often used to maintain sessions for authentication during data interaction between clients and servers; in a front-end and back-end separated architecture, the front-end and back-end responsibilities are separated: the front-end processes page logic, the back-end is responsible for data processing, the front-end and back-end are developed independently, do not depend on each other, can be developed simultaneously, and the back-end can provide services across terminals (platforms).
[0003] In an architecture with separated front-end and back-end, there are many security issues in data interaction that have not been fully considered. For example, the coupling of back-end data is extremely high, so some data is highly insecure. In addition, the front-end and back-end are mostly transmitted in plain text, with low encryption coefficients and extremely low security. Summary of the invention
[0004] The purpose of this application is: to solve the above-mentioned technical problems, this application provides a front-end and back-end data interaction method and system, aiming to achieve safe and efficient interaction of front-end and back-end data.
[0005] In some embodiments of the present application, by adding an interaction unit, multiple back-end service interfaces are established, the back-end service types are classified in detail, and the corresponding back-end server interface is selected according to the resource requirements of different front-end server users, so as to quickly call related resources and improve data response time.
[0006] In some embodiments of the present application, multiple data access instructions are obtained through an interaction unit, and after identity authentication, encryption parameters are set to avoid plain text transmission between the front and back ends, thereby improving the security of data interaction. At the same time, multiple similar back-end service interfaces are set, and a calling plan for the back-end service interfaces is formulated based on the load balancing principle to ensure data interaction efficiency and data response speed and reduce user waiting time.
[0007] In some embodiments of the present application, a front-end and back-end data interaction method is provided, including:
[0008] Establish multiple backend service interfaces;
[0009] Obtain the user's access requirements and generate data access instructions based on the user's access requirements;
[0010] A call instruction of a backend service interface is generated according to the data access instruction, a response result is generated according to the call instruction, and the response result is sent to the front-end server where the user logs in.
[0011] In some embodiments of the present application, the establishment of multiple backend service interfaces includes:
[0012] Get backend server parameters and user historical access data;
[0013] Set the initial service category granularity based on backend server parameters;
[0014] Traversing the user's historical access data to modify the initial service category granularity, and establishing a service category sequence A, A=(A1, A2...An), where n is the number of service categories and Ai is the i-th service category;
[0015] Generate Ai's demand evaluation value based on the user's historical access data;
[0016] Set the number of Ai interfaces according to the demand evaluation value;
[0017] Establish an interface sequence B, B=(b1,b2…bn), where n is the number of service categories and bi is the number of interfaces of the i-th service category;
[0018] The backend service interface parameters are generated according to the service category sequence A and the interface sequence B.
[0019] In some embodiments of the present application, when generating a demand evaluation value, it includes:
[0020] Generate the number of users, number of visits and frequency of visits of Ai based on the historical access data of users;
[0021] Generate the visiting user evaluation value Ci of Ai according to the number of visiting users;
[0022] Generate the visit number evaluation value Di of Ai according to the number of visits;
[0023] Generate compensation coefficient m according to access frequency,
[0024] Generate a demand evaluation value Ei, Ei=m*(n1*Ci+n2*Di), where n1 is the first weight coefficient, n2 is the second weight coefficient, and n1+n2=1.
[0025] In some embodiments of the present application, when a backend service interface call instruction is generated according to a data access instruction, the process includes:
[0026] Obtain user identity tags and required resource parameters according to data access instructions;
[0027] Generate the service category to be called according to the resources to be called;
[0028] The number of requests for the service category to be called during the current data call monitoring period according to the user identity tag is generated. If the number of requests is greater than the preset call number threshold, a call rejection instruction is generated. If the number of requests is less than the preset call number threshold, an interface call instruction and a demand feedback time node are generated.
[0029] The corresponding target backend service interface is selected according to the interface call instruction, and whether to generate a correction instruction is determined according to the state of the target backend service interface.
[0030] In some embodiments of the present application, when determining whether to generate a correction instruction according to the backend service interface status, it includes:
[0031] Obtain the operating parameters of the real-time target backend service interface and generate an operating load evaluation value;
[0032] Generate the running status of the target backend service interface according to the running load evaluation value;
[0033] If it is in the first-level operation state, no correction instruction is generated;
[0034] If it is in the second-level operation state, the remaining processing time is generated according to the demand feedback time node. When the remaining processing time is greater than the preset remaining processing time threshold, a first-level correction instruction is generated. If the remaining processing time is less than the preset remaining processing time threshold, no correction instruction is generated.
[0035] If it is in the third-level operating state, a second-level correction instruction is generated.
[0036] In some embodiments of the present application, a front-end and back-end data interaction system is provided, including:
[0037] A front-end control unit, comprising a plurality of front-end servers, wherein the front-end servers are used to obtain user access requirements and generate data access instructions according to the user access requirements;
[0038] An interaction unit, used to generate a call instruction of a backend service interface according to the data access instruction, generate a response result according to the call instruction, and send the response result to the front-end server logged in by the user;
[0039] The backend control unit includes a backend server and a plurality of backend service interfaces, and the interaction unit performs data interaction with the backend server through the backend service interface.
[0040] In some embodiments of the present application, the back-end control unit includes:
[0041] A first backend processing module, used for obtaining backend server parameters and user historical access data, and setting the initial service category granularity according to the backend server parameters;
[0042] The second backend processing module is used to traverse the user's historical access data to correct the initial service category granularity and establish a service category sequence A, A=(A1, A2...An), where n is the number of service categories and Ai is the i-th service category;
[0043] The third backend processing module is used to generate a demand evaluation value of Ai according to the user's historical access data, set the number of interfaces of Ai according to the demand evaluation value, and establish an interface sequence B, B=(b1,b2…bn), where n is the number of service categories and bi is the number of interfaces of the i-th service category;
[0044] The fourth backend processing module is used to generate backend service interface parameters according to the service category sequence A and the interface sequence B.
[0045] In some embodiments of the present application, the third backend processing module is further used to:
[0046] Generate the number of users, number of visits and frequency of visits of Ai based on the historical access data of users;
[0047] Generate the visiting user evaluation value Ci of Ai according to the number of visiting users;
[0048] Generate the visit number evaluation value Di of Ai according to the number of visits;
[0049] Generate compensation coefficient m according to access frequency,
[0050] Generate a demand evaluation value Ei, Ei=m*(n1*Ci+n2*Di), where n1 is the first weight coefficient, n2 is the second weight coefficient, and n1+n2=1.
[0051] In some embodiments of the present application, the interaction unit includes:
[0052] A first interaction processing module is used to obtain a user identity tag and a required resource parameter according to a data access instruction, and generate a required service category according to the required resource;
[0053] The second interaction processing module is used to call the number of requests for the service category to be called within the monitoring period according to the current data of the user identity tag, and if the number of requests is greater than the preset call number threshold, generate a call rejection instruction; if the number of requests is less than the preset call number threshold, generate an interface call instruction and a demand feedback time node;
[0054] The third interaction processing module is used to select the corresponding target backend service interface according to the interface calling instruction;
[0055] The fourth interaction processing module is used to determine whether to generate a correction instruction according to the state of the target backend service interface.
[0056] In some embodiments of the present application, the fourth interaction processing module is further used to:
[0057] Obtain the operating parameters of the real-time target backend service interface and generate an operating load evaluation value;
[0058] Generate the running status of the target backend service interface according to the running load evaluation value;
[0059] If it is in the first-level operation state, no correction instruction is generated;
[0060] If it is in the second-level operation state, the remaining processing time is generated according to the demand feedback time node. When the remaining processing time is greater than the preset remaining processing time threshold, a first-level correction instruction is generated. If the remaining processing time is less than the preset remaining processing time threshold, no correction instruction is generated.
[0061] If it is in the third-level operating state, a second-level correction instruction is generated.
[0062] Compared with the prior art, the front-end and back-end data interaction method and system of the present application embodiment have the following beneficial effects:
[0063] By adding interactive units, establishing multiple back-end service interfaces, and classifying back-end service types, the corresponding back-end server interface is selected according to the resource requirements of different front-end server users, so as to quickly call related resources and improve data response time.
[0064] Through the interaction unit, multiple data access instructions are obtained. After identity authentication, encryption parameters are set to avoid plain text transmission between the front and back ends, thereby improving the security of data interaction. At the same time, multiple similar back-end service interfaces are set, and a calling plan for the back-end service interface is formulated based on the load balancing principle to ensure data interaction efficiency and data response speed, thereby reducing user waiting time. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 It is a flow chart of a front-end and back-end data interaction method in a preferred embodiment of the present application. DETAILED DESCRIPTION
[0066] The specific implementation methods of the present application are further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present application but are not intended to limit the scope of the present application.
[0067] In the description of the present application, it should be understood that the terms "center", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0068] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0069] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0070] like Figure 1 As shown, a front-end and back-end data interaction method of a preferred embodiment of the present application includes:
[0071] S101: Establish multiple backend service interfaces;
[0072] S102: Obtaining the user's access requirements and generating data access instructions according to the user's access requirements;
[0073] S103: Generate a call instruction of the backend service interface according to the data access instruction, generate a response result according to the call instruction, and send the response result to the front-end server logged in by the user.
[0074] Specifically, when establishing multiple backend service interfaces, including:
[0075] Get backend server parameters and user historical access data;
[0076] Set the initial service category granularity based on backend server parameters;
[0077] Traverse the user's historical access data to modify the initial service category granularity and establish a service category sequence A, A = (A1, A2...An), where n is the number of service categories and Ai is the i-th service category;
[0078] Generate Ai's demand evaluation value based on the user's historical access data;
[0079] Set the number of Ai interfaces according to the demand evaluation value;
[0080] Establish an interface sequence B, B=(b1,b2…bn), where n is the number of service categories and bi is the number of interfaces of the i-th service category;
[0081] Generate backend service interface parameters according to service category sequence A and interface sequence B.
[0082] Specifically, the initial service category granularity is determined according to the operating parameters of the backend server, and then the user's historical access data is traversed to modify the initial service category granularity, thereby further improving the service category granularity and generating a service category series.
[0083] Specifically, when generating the demand evaluation value, it includes:
[0084] Generate the number of users, number of visits and frequency of visits of Ai based on the historical access data of users;
[0085] Generate the visiting user evaluation value Ci of Ai according to the number of visiting users;
[0086] Generate the visit number evaluation value Di of Ai according to the number of visits;
[0087] Generate compensation coefficient m according to access frequency,
[0088] Generate a demand evaluation value Ei, Ei=m*(n1*Ci+n2*Di), where n1 is the first weight coefficient, n2 is the second weight coefficient, and n1+n2=1.
[0089] Specifically, the value range of the visiting user evaluation value Ci and the visit number evaluation value Di is the same. The first weight coefficient and the second weight coefficient can be set according to the historical operation data. The number of visiting users refers to the users who require the back-end service interface of the current service type, and the number of visits refers to the total number of calls to the back-end service interface of the current service type. The larger the number of visiting users, the larger the corresponding visiting user evaluation value, and the larger the number of visits, the larger the corresponding visit number evaluation value.
[0090] Specifically, access frequency refers to setting a sampling time interval based on historical operation data, obtaining the total number of visits within the preset sampling time interval, generating the access frequency and establishing an access frequency-compensation coefficient mapping table, and dynamically adjusting the compensation coefficient m through the access frequency to make the demand evaluation value more accurate.
[0091] Specifically, multiple service categories are generated based on the operating parameters of the back-end server and the user's historical access needs. The front-end server is connected to the back-end service interface through an interaction unit. By selecting the target back-end service interface, the data in the back-end server is called to achieve data interaction. The number of back-end service interfaces of each service category is dynamically adjusted according to the demand evaluation value, thereby improving the response time of user demand data and reducing user waiting time.
[0092] In a preferred embodiment of the present application, when a backend service interface call instruction is generated according to a data access instruction, it includes:
[0093] Obtain user identity tags and required resource parameters according to data access instructions;
[0094] Generate the service category to be called according to the resources to be called;
[0095] The number of requests for the service category to be called during the current data call monitoring period according to the user identity tag is generated. If the number of requests is greater than the preset call number threshold, a call rejection instruction is generated. If the number of requests is less than the preset call number threshold, an interface call instruction and a demand feedback time node are generated.
[0096] The corresponding target backend service interface is selected according to the interface call instruction, and whether to generate a correction instruction is determined according to the state of the target backend service interface.
[0097] Specifically, the initial security verification is completed according to the user identity tag. After the initial security verification is completed, the service category to be called is obtained according to the required resource parameters. The data call monitoring cycle is set to determine the number of times the user calls this service category within the current data call monitoring cycle. If the number of calls exceeds the threshold, a call rejection instruction is generated and sent to the corresponding front-end server to prevent the user from making malicious data calls, which will reduce the data response time of the back-end server and improve the security of the front-end and back-end data interaction.
[0098] Specifically, if the call count threshold is not reached, the corresponding back-end service interface is selected according to the user's required resource parameters, an interface call instruction is generated, the corresponding interface establishment key is obtained according to the interface call instruction, the front-end and back-end data interaction channel is built, and the corresponding resources to be called are obtained and stored in the interaction unit first. When the demand feedback time node is reached, it is sent to the corresponding front-end server.
[0099] Specifically, obtaining the demand feedback time node according to the user's resource demand parameters refers to obtaining the user's expected feedback time. The feedback time is divided into instant feedback and preset feedback. If it is instant feedback, the corresponding data is obtained in the back-end server and then fed back to the front-end server. If it is preset feedback, it means sending the corresponding data to the front-end server according to the expected time node preset by the user.
[0100] Specifically, when determining whether to generate a correction instruction based on the backend service interface status, it includes:
[0101] Obtain the operating parameters of the real-time target backend service interface and generate an operating load evaluation value;
[0102] Generate the running status of the target backend service interface according to the running load evaluation value;
[0103] If it is in the first-level operation state, no correction instruction is generated;
[0104] If it is in the second-level operation state, the remaining processing time is generated according to the demand feedback time node. When the remaining processing time is greater than the preset remaining processing time threshold, a first-level correction instruction is generated. If the remaining processing time is less than the preset remaining processing time threshold, no correction instruction is generated.
[0105] If it is in the third-level operating state, a second-level correction instruction is generated.
[0106] Specifically, its first-level operation state means that the target backend server is in an idle state and can be called directly. Specifically, the second-level operation state refers to the current low-load operation state. If the remaining processing time of the port call instruction is greater than the threshold at this time, a first-level correction instruction is generated, that is, the target backend service interface is not called immediately, but queued. When the target backend service interface is idle, the call is made. If the remaining processing time is less than the threshold, the call is made directly. The third-level operation state is a high-load operation state. At this time, the target backend service interface is reselected from the backend service interfaces of similar services according to the second-level correction instruction.
[0107] Specifically, after obtaining the data access instructions from the front end, the interaction unit authenticates the login user of the front-end server and connects with the corresponding back-end service interface based on the communication key, thereby improving the security of the front-end and back-end servers during the data interaction process. At the same time, by dynamically setting correction instructions, the back-end server interface is prevented from overloading, ensuring the balance of the system load and improving the efficiency of front-end and back-end data interaction.
[0108] Based on another preferred embodiment of a front-end and back-end data interaction method in any of the above preferred embodiments, this preferred embodiment provides a front-end and back-end data interaction system, including:
[0109] A front-end control unit, including a plurality of front-end servers, the front-end servers are used to obtain the user's access requirements and generate data access instructions according to the user's access requirements;
[0110] An interaction unit, used to generate a call instruction of a backend service interface according to the data access instruction, generate a response result according to the call instruction, and send the response result to the front-end server logged in by the user;
[0111] The backend control unit includes a backend server and multiple backend service interfaces. The interaction unit interacts with the backend server through the backend service interface.
[0112] Specifically, the back-end control unit includes:
[0113] A first backend processing module, used for obtaining backend server parameters and user historical access data, and setting the initial service category granularity according to the backend server parameters;
[0114] The second backend processing module is used to traverse the user's historical access data to correct the initial service category granularity and establish a service category sequence A, A=(A1, A2...An), where n is the number of service categories and Ai is the i-th service category;
[0115] The third backend processing module is used to generate a demand evaluation value of Ai according to the user's historical access data, set the number of interfaces of Ai according to the demand evaluation value, and establish an interface sequence B, B=(b1,b2…bn), where n is the number of service categories and bi is the number of interfaces of the i-th service category;
[0116] The fourth backend processing module is used to generate backend service interface parameters according to the service category sequence A and the interface sequence B.
[0117] Specifically, the third backend processing module is also used for:
[0118] Generate the number of users, number of visits and frequency of visits of Ai based on the historical access data of users;
[0119] Generate the visiting user evaluation value Ci of Ai according to the number of visiting users;
[0120] Generate the visit number evaluation value Di of Ai according to the number of visits;
[0121] Generate compensation coefficient m according to access frequency,
[0122] Generate a demand evaluation value Ei, Ei=m*(n1*Ci+n2*Di), where n1 is the first weight coefficient, n2 is the second weight coefficient, and n1+n2=1.
[0123] In a preferred embodiment of the present application, the interaction unit includes:
[0124] A first interaction processing module is used to obtain a user identity tag and a required resource parameter according to a data access instruction, and generate a required service category according to the required resource;
[0125] The second interaction processing module is used to call the number of requests for the service category to be called within the monitoring period according to the current data of the user identity tag, and if the number of requests is greater than the preset call number threshold, generate a call rejection instruction; if the number of requests is less than the preset call number threshold, generate an interface call instruction and a demand feedback time node;
[0126] The third interaction processing module is used to select the corresponding target backend service interface according to the interface calling instruction;
[0127] The fourth interaction processing module is used to determine whether to generate a correction instruction according to the state of the target backend service interface.
[0128] Specifically, the fourth interaction processing module is further used for:
[0129] Obtain the operating parameters of the real-time target backend service interface and generate an operating load evaluation value;
[0130] Generate the running status of the target backend service interface according to the running load evaluation value;
[0131] If it is in the first-level operation state, no correction instruction is generated;
[0132] If it is in the second-level operation state, the remaining processing time is generated according to the demand feedback time node. When the remaining processing time is greater than the preset remaining processing time threshold, a first-level correction instruction is generated. If the remaining processing time is less than the preset remaining processing time threshold, no correction instruction is generated.
[0133] If it is in the third-level operating state, a second-level correction instruction is generated.
[0134] According to the first concept of the present application, by adding an interaction unit, multiple back-end service interfaces are established, the back-end service types are classified in detail, and the corresponding back-end server interface is selected according to the resource requirements of different front-end server users, so as to quickly call related resources and improve data response time.
[0135] According to the second concept of the present application, multiple data access instructions are obtained through the interaction unit, and after identity authentication, encryption parameters are set to avoid plain text transmission between the front and back ends, thereby improving the security of data interaction. At the same time, multiple similar back-end service interfaces are set, and a calling plan for the back-end service interfaces is formulated based on the load balancing principle to ensure data interaction efficiency and data response speed and reduce user waiting time.
[0136] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and substitutions can be made without departing from the technical principles of the present application. These improvements and substitutions should also be regarded as the scope of protection of the present application.
Claims
1. A front-end and back-end data interaction method, characterized in that: include: Establish multiple backend service interfaces; Obtain the user's access requirements and generate data access instructions based on the user's access requirements; Generate a call instruction of the backend service interface according to the data access instruction, generate a response result according to the call instruction, and send the response result to the front-end server logged in by the user; The establishment of multiple backend service interfaces includes: Get backend server parameters and user historical access data; Set the initial service category granularity based on backend server parameters; Traversing the user's historical access data to modify the initial service category granularity, and establishing a service category sequence A, A=(A1, A2...An), where n is the number of service categories and Ai is the i-th service category; Generate Ai's demand evaluation value based on user historical access data; Set the number of Ai interfaces according to the demand evaluation value; Establish an interface sequence B, B=(b1,b2…bn), where n is the number of service categories and bi is the number of interfaces of the i-th service category; Generate backend service interface parameters according to the service category sequence A and the interface sequence B; When generating a demand evaluation value, include: Generate the number of users, number of visits and frequency of visits of Ai based on the historical access data of users; Generate the visiting user evaluation value Ci of Ai according to the number of visiting users; Generate the visit number evaluation value Di of Ai according to the number of visits; Generate compensation coefficient m according to access frequency, Generate a demand evaluation value Ei, Ei=m*(n1*Ci+n2*Di), where n1 is the first weight coefficient, n2 is the second weight coefficient, and n1+n2=1; When generating backend service interface call instructions based on data access instructions, it includes: Obtain user identity tags and required resource parameters according to data access instructions; Generate the service category to be called according to the resources to be called; The number of requests for the service category to be called during the current data call monitoring period according to the user identity tag is generated. If the number of requests is greater than the preset call number threshold, a call rejection instruction is generated. If the number of requests is less than the preset call number threshold, an interface call instruction and a demand feedback time node are generated. The corresponding target backend service interface is selected according to the interface call instruction, and whether to generate a correction instruction is determined according to the state of the target backend service interface.
2. The front-end and back-end data interaction method according to claim 1, characterized in that: When judging whether to generate a correction instruction based on the backend service interface status, it includes: Obtain the operating parameters of the real-time target backend service interface and generate an operating load evaluation value; Generate the running status of the target backend service interface according to the running load evaluation value; If it is in the first-level operation state, no correction instruction is generated; If it is in the second-level operation state, the remaining processing time is generated according to the demand feedback time node. When the remaining processing time is greater than the preset remaining processing time threshold, a first-level correction instruction is generated. If the remaining processing time is less than the preset remaining processing time threshold, no correction instruction is generated. If it is in the third-level operating state, a second-level correction instruction is generated.
3. A front-end and back-end data interaction system, using the front-end and back-end data interaction method according to any one of claims 1 to 2, characterized in that: include: A front-end control unit, comprising a plurality of front-end servers, wherein the front-end servers are used to obtain user access requirements and generate data access instructions according to the user access requirements; An interaction unit, used to generate a call instruction of a backend service interface according to the data access instruction, generate a response result according to the call instruction, and send the response result to the front-end server logged in by the user; A backend control unit, comprising a backend server and a plurality of backend service interfaces, wherein the interaction unit interacts with the backend server via the backend service interfaces; The rear end control unit comprises: A first backend processing module, used for obtaining backend server parameters and user historical access data, and setting the initial service category granularity according to the backend server parameters; The second backend processing module is used to traverse the user's historical access data to correct the initial service category granularity and establish a service category sequence A, A=(A1, A2...An), where n is the number of service categories and Ai is the i-th service category; The third backend processing module is used to generate a demand evaluation value of Ai according to the user's historical access data, set the number of interfaces of Ai according to the demand evaluation value, and establish an interface sequence B, B=(b1,b2…bn), where n is the number of service categories and bi is the number of interfaces of the i-th service category; A fourth backend processing module, used for generating backend service interface parameters according to the service category sequence A and the interface sequence B; The third back-end processing module is also used for: Generate the number of users, number of visits and frequency of visits of Ai based on the historical access data of users; Generate the visiting user evaluation value Ci of Ai according to the number of visiting users; Generate the visit number evaluation value Di of Ai according to the number of visits; Generate compensation coefficient m according to access frequency, Generate a demand evaluation value Ei, Ei=m*(n1*Ci+n2*Di), where n1 is the first weight coefficient, n2 is the second weight coefficient, and n1+n2=1; The interaction unit comprises: A first interaction processing module is used to obtain a user identity tag and a required resource parameter according to a data access instruction, and generate a required service category according to the required resource; The second interaction processing module is used to call the number of requests for the service category to be called within the monitoring period according to the current data of the user identity tag, and if the number of requests is greater than the preset call number threshold, generate a call rejection instruction; if the number of requests is less than the preset call number threshold, generate an interface call instruction and a demand feedback time node; The third interaction processing module is used to select the corresponding target backend service interface according to the interface calling instruction; The fourth interaction processing module is used to determine whether to generate a correction instruction according to the state of the target backend service interface.
4. The front-end and back-end data interaction system according to claim 3, characterized in that: The fourth interaction processing module is further used for: Obtain the operating parameters of the real-time target backend service interface and generate an operating load evaluation value; Generate the running status of the target backend service interface according to the running load evaluation value; If it is in the first-level operation state, no correction instruction is generated; If it is in the second-level operation state, the remaining processing time is generated according to the demand feedback time node. When the remaining processing time is greater than the preset remaining processing time threshold, a first-level correction instruction is generated. If the remaining processing time is less than the preset remaining processing time threshold, no correction instruction is generated. If it is in the third-level operating state, a second-level correction instruction is generated.
Citation Information
Patent Citations
Interface access method and device, equipment and medium
CN117574350A