Project processing method, device, electronic device and computer readable storage medium
By receiving and responding to the operation of the project, and controlling the display of the project interface based on the restriction request instructions sent by the server, the cumbersome and error problems caused by manual operation of project downgrade in the prior art are solved, and automation restrictions and system stability are improved.
Patent Information
- Application Number
- CN202111633662.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2041-12-28
AI Technical Summary
When the system crashes or the business volume increases sharply, it is necessary to urgently stop the use of certain projects. The existing technology requires manual operation, which leads to cumbersome processes, prone to errors, and is difficult to debug.
By receiving and responding to the operation on the project, sending a call request to the server to request the real-time project interface of the project, and receiving a restriction request instruction sent by the server, controlling the operation response according to the instructions to limit the real-time project interface of the project.
It realizes automatic restrictions on project operations, avoids cumbersome and errors caused by manual operations, and improves the stability and user experience of the system.
Smart Images

Figure CN114281507B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a project processing method, device, electronic device and computer-readable storage medium. Background Art
[0002] When a user's special operation or special data locks the system, or the system crashes due to a sharp increase in business volume, it is necessary to urgently stop the use of certain functions and projects. The current implementation method is to develop a temporary change plan or technical emergency plan, manually change the production switch or parameters, and when performing this operation, it is necessary to restart the server or modify the project parameters through the console to temporarily disable one or more projects in the system to achieve the purpose.
[0003] However, when using the above solution to solve the problem, if a project needs to be downgraded, it is necessary to write a database script and then manually close the project based on the database script. The process is cumbersome and error-prone. If the execution is missed or there is a problem with the database script, some projects will become abnormal, affecting the user experience, and it is difficult to debug.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a project processing method, device, electronic device and computer-readable storage medium to at least solve the technical problem in the related art that manual operation is required when downgrading a project, and the operation is cumbersome and error-prone.
[0006] According to one aspect of an embodiment of the present invention, a project processing method is provided, comprising: receiving an operation on a project; in response to the operation, sending a call request to a server, wherein the call request is used to request to call a real-time project interface of the project; receiving a restriction request instruction sent by the server; and according to the restriction request instruction, controlling a response to the operation to restrict calling the real-time project interface of the project, wherein the restriction request instruction is at least one of the following: a first restriction request instruction, a second restriction request instruction.
[0007] Optionally, after controlling the response to the operation to limit calling the real-time project interface of the project based on the restriction request instruction, the method further includes: receiving a prompt message sent by the server, wherein the prompt message is used to prompt retrying the operation on the project.
[0008] Optionally, receiving the restriction request instruction sent by the server includes: receiving a first restriction request instruction sent by the server, wherein the first restriction request instruction is used to refuse to return a response based on the operation to restrict calling the real-time project interface of the project.
[0009] Optionally, receiving the restriction request instruction sent by the server includes: receiving a second restriction request instruction sent by the server, wherein the second restriction request instruction is used to return a response based on the operation, calling the cached project interface of the project to limit calling the real-time project interface of the project.
[0010] According to one aspect of an embodiment of the present invention, a project processing method is provided, comprising: receiving a call request sent by a terminal, wherein the call request is used to request calling a real-time project interface of the project; determining whether the project needs to be subject to call restriction based on the call request; and in the case that the project needs to be subject to call restriction, sending a restriction request instruction to the terminal, wherein the restriction request instruction is used to control a response to an operation to restrict calling the real-time project interface of the project, the operation being an operation on the project, wherein the restriction request instruction is at least one of the following: a first restriction request instruction, a second restriction request instruction.
[0011] Optionally, determining whether the project needs to be subject to call restriction based on the call request includes: querying the interface corresponding to the project; determining the real-time level of the interface; and determining that the project needs to be subject to a first call restriction when the real-time level of the interface is greater than or equal to a predetermined threshold, wherein the first call restriction corresponds to the first restriction request instruction, and the first restriction request instruction is used to refuse to return a response based on the operation to limit the real-time project interface for calling the project.
[0012] Optionally, the method also includes: when the real-time degree of the interface is less than a predetermined threshold, determining that the project needs to be subject to a second call restriction, wherein the second call restriction corresponds to the second restriction request instruction, and the second restriction request instruction is used to return a response based on the operation, calling the cached project interface of the project to limit the call to the real-time project interface of the project.
[0013] Optionally, determining whether the project needs to be subject to call restriction based on the call request includes: querying the interface corresponding to the project; determining the usage status of the interface; and when the usage status of the interface is restricted, determining that the project needs to be subject to a first call restriction, wherein the first call restriction corresponds to the first restriction request instruction, and the first restriction request instruction is used to refuse to return a response based on the operation to restrict the real-time project interface that calls the project.
[0014] Optionally, after sending the restriction request instruction to the terminal, the method further includes: sending a prompt message to the terminal, wherein the prompt message is used to prompt to retry the operation on the item.
[0015] According to one aspect of an embodiment of the present invention, there is provided a project processing device, comprising: a first receiving module, for receiving an operation on a project; a first sending module, for sending a call request to a server in response to the operation, wherein the call request is used to request to call a real-time project interface of the project; a second receiving module, for receiving a restriction request instruction sent by the server; and a control module, for controlling a response to the operation to restrict calling the real-time project interface of the project according to the restriction request instruction, wherein the restriction request instruction is at least one of the following: a first restriction request instruction and a second restriction request instruction.
[0016] According to one aspect of an embodiment of the present invention, a project processing device is provided, comprising: a third receiving module, used to receive a call request sent by a terminal, wherein the call request is used to request to call the real-time project interface of the project; a determination module, used to determine whether the project needs to be subject to call restriction based on the call request; a second sending module, used to send a restriction request instruction to the terminal if the project needs to be subject to call restriction, wherein the restriction request instruction is used to control the response to an operation to restrict calling the real-time project interface of the project, the operation being an operation on the project, wherein the restriction request instruction is at least one of the following: a first restriction request instruction, a second restriction request instruction.
[0017] According to one aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement any one of the project processing methods described above.
[0018] According to one aspect of an embodiment of the present invention, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any one of the project processing methods described above.
[0019] In an embodiment of the present invention, by receiving and responding to operations on a project, a call request for requesting the real-time project interface of the project to be called is sent to the server, thereby receiving a restriction request instruction sent by the server, and executing according to the restriction request, controlling the response to the operation to limit the real-time project interface of the calling project. Because the restriction on the real-time project interface of the calling project is directly restricted by the restriction request instruction sent by the server, the operation of the project can be automatically restricted, thereby solving the technical problem in the related technology that manual operation is required when downgrading the project, and the operation is cumbersome and error-prone. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0021] Figure 1 is a flowchart of a project processing method 1 according to an embodiment of the present invention;
[0022] Figure 2 is a flowchart of a second project processing method according to an embodiment of the present invention;
[0023] Figure 3 is a schematic diagram of manually performing downgrading of a project in a project processing method provided in an optional embodiment of the present invention;
[0024] Figure 4 is a structural block diagram of a project processing device 1 according to an embodiment of the present invention;
[0025] Figure 5 It is a structural block diagram of a second project processing device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0029] Mock: A mechanism for modifying the internal implementation of the original class method based on the dynamic proxy implementation of the JAVA virtual machine.
[0030] NOS cache: A dedicated server used to record user sessions and memory data.
[0031] AI intelligent analysis: A method of obtaining user system usage habits by analyzing and calculating accumulated user behavior data through background analysis.
[0032] Current limiting: A mechanism that reduces server pressure by limiting the number of user machines connected to the server and ensures that the server runs at a stable level;
[0033] Degradation: Reduce server pressure by limiting the use of items.
[0034] Example 1
[0035] According to an embodiment of the present invention, an embodiment of a project processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0036] Figure 1 is a flowchart of a project processing method 1 according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0037] Step S102, receiving an operation on the project;
[0038] Step S104, in response to the operation, sending a call request to the server, wherein the call request is used to request a real-time project interface for calling the project;
[0039] Step S106, receiving a restriction request instruction sent by the server;
[0040] Step S108, controlling the response to the operation to limit the real-time project interface of the calling project according to the restriction request instruction, wherein the restriction request instruction is at least one of the following: a first restriction request instruction, a second restriction request instruction.
[0041] Through the above steps, for the terminal side, by receiving and responding to the operation of the project, a call request for requesting the real-time project interface of the calling project is sent to the server, thereby receiving the restriction request instruction sent by the server, and executing according to the restriction request, the response to the operation is controlled to limit the real-time project interface of the calling project. Because the restriction on the real-time project interface of the calling project is directly restricted by the restriction request instruction sent by the server, the operation of the project can be automatically restricted, thereby solving the technical problem in the related technology that when the project is downgraded, manual operation is required, and the operation is cumbersome and error-prone.
[0042] It should be noted that the projects should not be the same in different application scenarios. Taking the scenario of currency transactions as an example, in the transaction page, there may be account management, detailed query, balance query, transfer and remittance and other services, which are displayed in the form of controls in the transaction page. The above-mentioned various services are the projects referred to in this application. In the detailed query, it may also include monthly detailed query, weekly detailed query, daily detailed query and other services. The above-mentioned various services can also refer to the projects referred to in this application. Downgrading the project can be understood as when the load exceeds the preset upper limit threshold or the upcoming traffic is expected to exceed the preset threshold, in order to ensure that important or basic services can operate normally, it is necessary to disable some projects to ensure that important or basic services can operate normally. That is, the method provided in this application is a method for processing based on the situation where the project needs to be downgraded.
[0043] As an optional embodiment, an operation on a project is received, which can be an operation performed by a user on the project, such as a click operation. In response to the operation, a call request is sent to the server, wherein the call request is used to request the real-time project interface of the call project. In the server, it can be determined whether the project needs to be restricted. In the case where the project does not need to be restricted, a send consent request instruction sent by the server is received to enter the real-time project interface of the project in response to the operation. In the case where the project needs to be restricted, a restriction request instruction sent by the server is received, and according to the restriction request instruction, the response to the operation is controlled to limit the real-time project interface of the call project. Wherein, according to the specific circumstances of the project, the received restriction request instruction should not be the same. In different cases, the response to the operation can be controlled differently according to the received first restriction request instruction or the second restriction request instruction to limit the real-time project interface of the call project.
[0044] As an optional embodiment, after the response to the operation is controlled to limit the real-time project interface of the calling project according to the restriction request instruction, a prompt message sent by the server can also be received, wherein the prompt message is used to prompt to retry the operation on the project. According to different restriction request instructions, the server can send different prompt messages to the terminal, that is, different prompt messages are displayed on the page used by the user. For example, when the restriction request instruction is the first restriction request instruction, the prompt message "Please try again later due to the current large number of visits" can be displayed on the page used by the user. It can make the user know that the current operation of the project cannot be responded normally and will be retried later, which effectively reduces the pressure on the current system operation. When the restriction request instruction is the second restriction request instruction, the prompt message "The current access page is a cached page, please note that there may be time-limited problems, and you can try again later" can be displayed on the page used by the user. It can make the user know that the current page may have time-limited problems, and the operation of retrying later according to the actual situation can also effectively reduce the pressure on the current system operation.
[0045] As an optional embodiment, according to the determination of the server side, a first restriction request instruction sent by the server is received, or a second restriction request instruction sent by the server is received. Among them, the first restriction request instruction and the second restriction request instruction control the response to the operation in different ways to limit the real-time project interface of the calling project. The first restriction request instruction limits the real-time project interface of the calling project by refusing to return a response based on the operation, that is, directly not responding. The second restriction request instruction calls the cached project interface of the project by returning a response based on the operation to limit the real-time project interface of the calling project, that is, the cached cached project interface is called, and the real-time project interface of the calling project is not called to limit the real-time project interface of the calling project. Through the specific judgment of the server side, different restriction request instructions are accepted, and the real-time project interface of the calling project is limited in different ways. The scope of application of this optional embodiment is expanded, and different methods can be used according to different situations, which can better meet the needs of actual applications and scenarios.
[0046] Figure 2 is a flowchart of a second project processing method according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0047] Step S202, receiving a call request sent by a terminal, wherein the call request is used to request a real-time project interface for calling a project;
[0048] Step S204, determining whether the project needs to be restricted based on the call request;
[0049] Step S206, when the project needs to be called restricted, a restriction request instruction is sent to the terminal, wherein the restriction request instruction is used to control the response to the operation to limit the real-time project interface of calling the project, and the operation is an operation on the project, wherein the restriction request instruction is at least one of the following: a first restriction request instruction, a second restriction request instruction.
[0050] Through the above steps, for the server side, by receiving the call request sent by the terminal for requesting to call the implementation project interface of the project, it can determine whether the project needs to be restricted based on the call request, and then, when the project needs to be restricted, send a restriction request instruction to the terminal for controlling the response to the operation to limit the real-time project interface of the calling project. Because the restriction on the real-time project interface of the calling project is directly restricted by the restriction request instruction sent by the server, the operation of the project can be automatically restricted, thereby solving the technical problem in the related technology that manual operation is required when downgrading the project, and the operation is cumbersome and error-prone.
[0051] As an optional embodiment, whether a project needs to be restricted in calling can be determined in a variety of ways based on the calling request. After being determined in different ways, different instructions can be sent to the terminal according to the specific situation. For example, if the project does not need to be restricted in calling, a consent request instruction is sent to the terminal so that the terminal can respond to the operation and enter the real-time project interface of the project. If the project needs to be restricted in calling, a first restriction request instruction or a second restriction request instruction is sent to the terminal according to the specific situation of the project to restrict the terminal from calling the real-time project interface of the project.
[0052] As an optional embodiment, whether a project needs to be called restricted can be determined in the following multiple ways.
[0053] 1) Query the interface corresponding to the project on the server, determine the real-time level of the interface, and determine what kind of call restriction is needed based on the implementation level of the interface. You can choose a more reasonable and effective method based on the implementation level of the interface to improve the user experience.
[0054] When the real-time degree of the interface is greater than or equal to a predetermined threshold, that is, the implementation degree of the interface is judged to be high, and it is determined that the project needs to be subject to a first call restriction, and the first call restriction corresponds to a first restriction request instruction, wherein the first restriction request instruction is used to refuse to return a response based on the operation to restrict the real-time project interface of the call project. That is, directly not responding to restrict the real-time project interface of the call project. That is, the server sends the first restriction request instruction, and the terminal receives the first restriction request instruction sent by the server.
[0055] When the real-time degree of the interface is less than a predetermined threshold, that is, the implementation degree of the interface is judged to be low, it is determined that the project needs to be subject to a second call restriction, and the second call restriction corresponds to a second restriction request instruction, wherein the second restriction request instruction is used to return a response based on the operation, call the cached project interface of the project, so as to limit the real-time project interface of the call project. That is, the server sends the second restriction request instruction, and the terminal receives the second restriction request instruction sent by the server.
[0056] 2) Query the interface corresponding to the project and determine the usage status of the interface. When the usage status of the interface is restricted, determine that the project needs to be subject to the first call restriction. The first call restriction corresponds to the first restriction request instruction, wherein the first restriction request instruction is used to refuse to return an operation-based response to restrict the real-time project interface that calls the project. That is, directly do not respond to restrict the real-time project interface that calls the project. That is, the server sends the first restriction request instruction, and the terminal receives the first restriction request instruction sent by the server. The usage status of the interface can be manually checking a large category of project combinations, and AI intelligently analyzes the user's behavior data to determine which projects need to be restricted and which projects do not need to be restricted. Based on the results of the analysis, the usage status of the interface is controlled.
[0057] It should be noted that the above two methods can be used together or separately to determine whether a project needs to be called restricted. When used together, the judgment method in 2) can be performed first. When the usage status of the interface is restricted, it is determined that the project needs to be called restricted for subsequent processing. When the usage status of the interface is unrestricted, it can be determined based on the current system capabilities, for example, whether the load exceeds the preset upper limit threshold or the upcoming traffic is expected to exceed the preset threshold. In the case of insufficient system capacity, the judgment method in 1) is performed again. By using the above two methods in combination, the rationality of the downgrade allocation can be more effectively guaranteed.
[0058] As an optional embodiment, after sending a restriction request instruction to the terminal, a prompt message may also be sent to the terminal, wherein the prompt message is used to prompt to retry the operation on the project. Different prompt messages may be sent to the terminal according to different restriction request instructions, that is, different prompt messages may be displayed on the page used by the user. For example, when the restriction request instruction is the first restriction request instruction, a prompt message "Due to the current large number of visits, please try again later" may be displayed on the page used by the user. This allows the user to know that the current operation on the project cannot be responded normally and will be retried later, effectively reducing the pressure on the current system operation. When the restriction request instruction is the second restriction request instruction, a prompt message "The currently accessed page is a cached page, please note that there may be timeliness issues, please try again later" may be displayed on the page used by the user. This allows the user to know that the current page may have timeliness issues, and to retry the operation later according to the actual situation, which can also effectively reduce the pressure on the current system operation.
[0059] Based on the above embodiments and optional embodiments, an optional implementation is provided, which is described in detail below.
[0060] An optional implementation of the present invention provides a project processing solution, which can combine manual selection and downgrade with automatic processing to jointly perform project downgrade processing based on the scenario of currency transaction. The optional implementation of the present invention is described in detail below:
[0061] 1) Manually select project downgrade:
[0062] When the load exceeds the preset upper threshold or the upcoming traffic is expected to exceed the preset threshold, in order to ensure the normal operation of important or basic projects, the functions that need to be downgraded can be visualized and then the visual operations can be quickly implemented.
[0063] Figure 3 is a schematic diagram of manually performing downgrading of a project in a project processing method provided in an optional embodiment of the present invention, such as Figure 3 As shown, by checking a column in a certain level of columns in the visual interface and clicking the disable button, the call request for write operations related to one or more projects corresponding to this column can be directly prohibited, and the backend communicates with the server to automatically refresh the client project menu corresponding to the user side, so that the corresponding client on the user side cannot open the corresponding one or more projects. Among them, columns can be divided into first-level columns, second-level columns, third-level columns, etc. For example, directly check a column in the first-level columns and click the disable button to block one or more projects corresponding to a column, and the user cannot open the corresponding one or more projects.
[0064] It should be noted that since different users have different trading habits, if all items are directly downgraded using the above simple check-and-hold method, that is, check a column in the first-level column, and one or more items corresponding to a column are the same, and are processed uniformly, the granularity is too coarse, which will make the downgrade result not meet the user's expectations and affect the user's experience.
[0065] Therefore, when one or more items listed under the first-level column are of the same importance and need to be downgraded, the system can control the downgrade order, realize artificial intelligence automatic downgrade, and control the downgrade method of items in a more fine-grained manner. Realize AI automatic identification of downgrade order.
[0066] Specifically, a learning library can be established in the background, in which a downgrade weight is assigned to each project. When a project is downgraded, it is downgraded according to this weight. The downgrade weight is obtained by automatically learning the order and importance of different transactions used by users after logging in based on the background user behavior tracking program. By allocating downgrades based on the downgrade weight, project governance can be achieved more intelligently.
[0067] For example, under the transaction project, the background AI program monitors that the user of Group A first logs in to the account management to query the details, then queries the balance and then remits money. The automatic learning program will think that the weight of the transaction for the current logged-in user is: Detailed query > Balance query > Transfer and remittance. When performing downgrade and flow control, when the transaction project is checked for downgrade, the order of downgrade for Group A is: first downgrade transfer and remittance, then downgrade balance query, and finally downgrade detailed query. For Group B, the background learning library records that the most frequently used and largest transaction volume of users of Group B after logging in are international business and group financial management. After each transaction, they will spend 20% of their time browsing the account details and fund net value chart. The system believes that the importance of weight is: international business > group financial management > account details > fund query, and will downgrade according to this different weight. Through long-term learning accumulation, the AI program will obtain the average weight of each transaction and record it in the database. It will also record the differences in the frequency of different transactions used by different categories of users. In the process of downgrade and flow control, it will comprehensively consider the user category, user usage habits, and the frequency of users accessing different transactions. The final evaluated values, downgrade order and level, etc. The evaluated values, downgrade order and level, etc. can also be further verified manually.
[0068] 2) Automated processing:
[0069] When the load exceeds the preset upper threshold or the upcoming traffic is expected to exceed the preset threshold, in order to ensure the normal operation of important or basic projects, downgrade control can be directly performed through the control interface, which can achieve automatic, convenient and fast operation.
[0070] When querying the interface corresponding to the project, if the interface is a real-time interface for querying background data, directly prohibit the call request for reading data, and the page returns the prompt message "Please try again later due to the current large number of visits". The implementation method may be not responding to the operation of the project, and may also return specific prompt information to limit the real-time project interface of the calling project, wherein the specific prompt information may be obtained by changing the call of the real interface to the Fallback downgrade processing mechanism called through the Mock interface.
[0071] The interface corresponding to the query project, when the interface is an interface with weak real-time query performance for background data: use a caching method to downgrade some projects that frequently query the interface and frequently query the database. The implementation method may be to directly return the previously cached query results to the corresponding client on the user side, wherein the previous caching method may adopt a NOS distributed caching method.
[0072] Through the above optional implementation, at least the following beneficial effects can be achieved:
[0073] (1) It implements downgrade and flow control based on AI’s automatic learning of different types of user transaction habits;
[0074] (2) Reduced the pressure on the backend server, ensuring the smoothness of user use of the system, and greatly improved the stability of the system under peak pressure;
[0075] (3) The task can be completed by simply checking and clicking buttons on the control end, which reduces the difficulty of operation. Unlike the original method of solving performance problems by modifying the background server configuration and reducing the voltage, it greatly reduces the risks that may be caused by human downgrading based on experience.
[0076] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0077] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention.
[0078] Example 2
[0079] According to an embodiment of the present invention, a device for implementing the above-mentioned project processing method 1 is also provided. Figure 4 is a structural block diagram of a project processing device according to an embodiment of the present invention. Figure 4 As shown, the device includes: a first receiving module 402, a first sending module 404, a second receiving module 406 and a control module 408. The device is described in detail below.
[0080] A first receiving module 402 is used to receive operations on a project; a first sending module 404 is connected to the first receiving module 402, and is used to send a call request to the server in response to the operation, wherein the call request is used to request a real-time project interface for calling the project; a second receiving module 406 is connected to the first sending module 404, and is used to receive a restriction request instruction sent by the server; a control module 408 is connected to the second receiving module 406, and is used to control a response to the operation to limit the real-time project interface of the calling project based on the restriction request instruction, wherein the restriction request instruction is at least one of the following: a first restriction request instruction, a second restriction request instruction.
[0081] It should be noted here that the above-mentioned first receiving module 402, first sending module 404, second receiving module 406 and control module 408 correspond to steps S102 to S108 in the implementation of project processing method 1, and the instances and application scenarios implemented by multiple modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiment 1.
[0082] Example 3
[0083] According to an embodiment of the present invention, a device for implementing the above-mentioned project processing method 2 is also provided. Figure 5 is a structural block diagram of a second project processing device according to an embodiment of the present invention. Figure 5 As shown, the device includes: a third receiving module 502, a determining module 504 and a second sending module 506. The device is described in detail below.
[0084] A third receiving module 502 is used to receive a call request sent by a terminal, wherein the call request is used to request a real-time project interface for calling a project; a determination module 504 is connected to the third receiving module 502, and is used to determine whether a call restriction is required for the project based on the call request; a second sending module 506 is connected to the determination module 504, and is used to send a restriction request instruction to the terminal when a call restriction is required for the project, wherein the restriction request instruction is used to control a response to an operation to restrict the real-time project interface for calling a project, and the operation is an operation on the project, wherein the restriction request instruction is at least one of the following: a first restriction request instruction, a second restriction request instruction.
[0085] It should be noted here that the above-mentioned third receiving module 502, determination module 504 and second sending module 506 correspond to steps S202 to S206 in the implementation of project processing method 2, and the instances and application scenarios implemented by multiple modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiment 1.
[0086] Example 4
[0087] According to another aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor, wherein the processor is configured to execute the instructions to implement any one of the above-mentioned project processing methods.
[0088] Example 5
[0089] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute any of the above-mentioned project processing methods.
[0090] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0091] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0092] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0093] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0094] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0095] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0096] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A project processing method, characterized in that: include: Receive operations on items; In response to the operation, sending a call request to a server, wherein the call request is used to request to call a real-time project interface of the project; Receiving a restriction request instruction sent by the server; According to the restriction request instruction, the response to the operation is controlled to limit the calling of the real-time project interface of the project, wherein the restriction request instruction includes a first restriction request instruction and a second restriction request instruction, the first restriction request instruction is used to refuse to return a response based on the operation to limit the calling of the real-time project interface of the project, when the real-time degree of the interface is greater than or equal to a predetermined threshold, it is determined that the project needs to be subject to a first call restriction, the first call restriction corresponds to the first restriction request instruction, the second restriction request instruction is used to return a response based on the operation, calling the cached project interface of the project to limit the calling of the real-time project interface of the project, when the real-time degree of the interface is less than a predetermined threshold, it is determined that the project needs to be subject to a second call restriction, the second call restriction corresponds to the second restriction request instruction, the real-time degree of the interface is obtained after querying the interface corresponding to the project.
2. The method according to claim 1, characterized in that After controlling the response to the operation to limit the real-time project interface of calling the project according to the restriction request instruction, the method further includes: Receive prompt information sent by the server, wherein the prompt information is used to prompt to retry the operation on the item.
3. A project processing method, characterized in that: include: Receiving a call request sent by a terminal, wherein the call request is used to request to call a real-time project interface of the project; Determine whether the project needs to be restricted based on the call request; In the case where the project needs to be restricted from calling, sending a restriction request instruction to the terminal, wherein the restriction request instruction is used to control a response to an operation to restrict calling a real-time project interface of the project, the operation is an operation on the project, and the restriction request instruction includes a first restriction request instruction and a second restriction request instruction; Wherein, determining whether the project needs to be restricted in calling according to the calling request includes: Query the interface corresponding to the project; Determining the real-time degree of the interface; In the case where the real-time degree of the interface is greater than or equal to a predetermined threshold, determining that the project needs to be subject to a first call restriction, wherein the first call restriction corresponds to the first restriction request instruction, and the first restriction request instruction is used to refuse to return a response based on the operation to restrict calling the real-time project interface of the project; When the real-time degree of the interface is less than a predetermined threshold, it is determined that the project needs to be subject to a second call restriction, wherein the second call restriction corresponds to the second restriction request instruction, and the second restriction request instruction is used to return a response based on the operation, calling the cached project interface of the project to limit the call to the real-time project interface of the project.
4. The method according to claim 3, characterized in that The determining, based on the call request, whether the project needs to be restricted in calling includes: Query the interface corresponding to the project; Determining a usage status of the interface; When the usage status of the interface is restricted use, it is determined that the project requires a first call restriction, wherein the first call restriction corresponds to the first restriction request instruction, and the first restriction request instruction is used to refuse to return a response based on the operation to restrict calling the real-time project interface of the project.
5. The method according to claim 3, characterized in that: After sending the restriction request instruction to the terminal, the method further includes: Sending a prompt message to the terminal, wherein the prompt message is used to prompt to retry the operation on the item.
6. A project processing device, characterized in that: include: A first receiving module, used for receiving an operation on a project; A first sending module, configured to send a call request to a server in response to the operation, wherein the call request is used to request to call a real-time project interface of the project; A second receiving module, used for receiving a restriction request instruction sent by the server; A control module is used to control the response to the operation to limit the calling of the real-time project interface of the project according to the restriction request instruction, wherein the restriction request instruction includes a first restriction request instruction and a second restriction request instruction, the first restriction request instruction is used to refuse to return a response based on the operation to limit the calling of the real-time project interface of the project, when the real-time degree of the interface is greater than or equal to a predetermined threshold, determine that the project needs to be subject to a first call restriction, the first call restriction corresponds to the first restriction request instruction, the second restriction request instruction is used to return a response based on the operation, call the cached project interface of the project to limit the calling of the real-time project interface of the project, when the real-time degree of the interface is less than a predetermined threshold, determine that the project needs to be subject to a second call restriction, the second call restriction corresponds to the second restriction request instruction, and the real-time degree of the interface is obtained after querying the interface corresponding to the project.
7. A project processing device, characterized in that: include: A third receiving module is used to receive a call request sent by a terminal, wherein the call request is used to request to call the real-time project interface of the project; A determination module, used to determine whether the project needs to be restricted in calling according to the calling request; a second sending module, configured to send a restriction request instruction to the terminal when the project needs to be restricted in calling, wherein the restriction request instruction is used to control a response to an operation to restrict calling a real-time project interface of the project, the operation being an operation on the project, wherein the restriction request instruction includes a first restriction request instruction and a second restriction request instruction; Among them, the determination module is also used to query the interface corresponding to the project; determine the real-time level of the interface; when the real-time level of the interface is greater than or equal to a predetermined threshold, determine that the project needs to be subject to a first call restriction, wherein the first call restriction corresponds to the first restriction request instruction, and the first restriction request instruction is used to refuse to return a response based on the operation to limit the real-time project interface of the project; when the real-time level of the interface is less than a predetermined threshold, determine that the project needs to be subject to a second call restriction, wherein the second call restriction corresponds to the second restriction request instruction, and the second restriction request instruction is used to return a response based on the operation to call the cached project interface of the project to limit the real-time project interface of the project.
8. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the project processing method as described in any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the project processing method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Overload protection method and device for server
CN104142862A
Service end gray scale degrading method and device
CN108549584A
Reducing workload on a backend system using client side request throttling
US20110161488A1