Business system processing method and device, computer equipment and storage medium
By introducing a brake switch mechanism in the business system, using filters to process business service requests according to the switch status, the problem of time-consuming and errors in version iterative development is solved, and processing efficiency and stability are improved.
Patent Information
- Application Number
- CN202310648923.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-02
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2043-06-02
AI Technical Summary
In the iterative development of the existing business system, in order to ensure the operation of online services, it is necessary to fully verify the modified functional points, which makes artificially constructed abnormal scenarios time-consuming and error-prone, affecting processing efficiency.
By introducing a brake switch mechanism in the business system, the filter is used to read the brake switch status of the target service service, intercept or process business service requests according to the status, and quickly switch between the two modes to avoid back-end configuration files and library tables Direct modification of data.
It improves the processing efficiency of the business system, reduces the risk of human operation errors, simplifies the abnormal scenario verification process, and ensures the stability and real-time nature of the business system.
Smart Images

Figure CN119071158A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a business system processing method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] With the development of computer technology and Internet technology and the advent of the 5G era, the emergence of the Internet has brought great convenience to modern life. More and more users can process different business requests online by using business systems, which effectively improves the processing efficiency of different business requests, making the development and use of business systems play an increasingly important role in fields such as computer vision.
[0003] In the current business system processing method, especially in the iterative development of business system versions, in order to ensure online business operations, it is necessary to fully verify the modified functional points to ensure 100% coverage of the code. When it comes to verifying various abnormal business scenarios, it is often necessary to manually construct business service abnormalities or parameter abnormalities to ensure that the business system presents the expected performance of the code in abnormal scenarios, thereby ensuring the stability of the business system, that is, by manually taking some normal business services offline or changing the correct configuration parameters to incorrect parameters. However, this method can easily cause all normal business processes in the business system to become abnormal, making the processing efficiency of the business system low. Summary of the invention
[0004] Based on this, it is necessary to provide a business system processing method, device, computer equipment, computer readable storage medium and computer program product to address the above technical problems, which can effectively improve the processing efficiency of the business system.
[0005] In the first aspect, the present application provides a business system processing method. The method includes: receiving a business service request including interactive link information when the business system has been published; reading the brake switch state of the target business service through the filter of the target business service when calling the target business service in sequence based on the interactive link information; when the brake switch state is in the start state, intercepting the business service request through the filter, and returning an error response based on the intercepted business service request; when the brake switch state is in the off state, responding to the business service request according to the business logic of the target business service, and returning a response result corresponding to the business service request.
[0006] In the second aspect, the present application also provides a business system processing device. The device includes: a receiving module, which is used to receive a business service request including interactive link information when the business system has been published; a reading module, which is used to read the brake switch state of the target business service through the filter of the target business service when calling the target business service involved in sequence based on the interactive link information; an interception module, which is used to intercept the business service request through the filter when the brake switch state is in the start state, and return an error response based on the intercepted business service request; a processing module, which is used to respond to the business service request according to the business logic of the target business service when the brake switch state is in the off state, and return the response result corresponding to the business service request.
[0007] In a third aspect, the present application also provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program: receiving a business service request including interactive link information when the business system has been published; reading the brake switch state of the target business service through the filter of the target business service when calling the target business service in sequence based on the interactive link information; when the brake switch state is in the start state, intercepting the business service request through the filter, and returning an error response based on the intercepted business service request; when the brake switch state is in the off state, responding to the business service request according to the business logic of the target business service, and returning a response result corresponding to the business service request.
[0008] In a fourth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented: receiving a business service request including interactive link information when the business system has been published; when calling the target business services involved in sequence based on the interactive link information, reading the brake switch state of the target business service through the filter of the target business service; when the brake switch state is in the start state, intercepting the business service request through the filter, and returning an error response based on the intercepted business service request; when the brake switch state is in the off state, responding to the business service request according to the business logic of the target business service, and returning a response result corresponding to the business service request.
[0009] In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program, which implements the following steps when executed by a processor: receiving a business service request including interactive link information when the business system has been published; reading the brake switch state of the target business service through the filter of the target business service when calling the target business service in sequence based on the interactive link information; when the brake switch state is in the start state, intercepting the business service request through the filter, and returning an error response based on the intercepted business service request; when the brake switch state is in the off state, responding to the business service request according to the business logic of the target business service, and returning a response result corresponding to the business service request.
[0010] The above-mentioned business system processing method, device, computer equipment, storage medium and computer program product, in the case of a published business system, receive a business service request including interactive link information; when calling the target business services involved in sequence based on the interactive link information, read the brake switch status of the target business service through the filter of the target business service; when the brake switch status is the start state, intercept the business service request through the filter, and return an error response based on the intercepted business service request; when the brake switch status is the off state, respond to the business service request according to the business logic of the target business service, and return the response result corresponding to the business service request. Since each target business service is configured with a filter, when the business system calls the target business services involved in sequence based on the interactive link information carried in the business service request, the brake switch status of the service can be read through the filter of each target business service, and different processing flows can be executed according to the brake switch status. That is, when the brake switch status of the target business service is in the started state, the business system intercepts the business service request through the filter of the target business service, and returns an error response including a specific error code and error information identifier, so as to brake the normal business function of the target business service and construct the business scenario required for verification; in addition, when the brake switch status of the target business service is in the closed state, the business system can respond to the business service request according to the business logic of the target business service, and return the response result corresponding to the business service request, so as to realize the normal business function of the target business service and ensure the normal operation of online business processing. That is, by adjusting the start and stop of the brake switches of different business services, it is possible to ensure a rapid response to changes in business service behaviors, and quickly switch between the two modes of "accepting requests and performing business logic normally" and "accepting requests but not performing business logic and returning fixed exceptions". This can effectively ensure the real-time and availability of the interactive link, effectively avoid direct modification of back-end configuration files and library table data, reduce the risks brought by human operational errors, and while ensuring the normal operation of the original business functions, it can also verify abnormal scenarios through the combination of the brake switches of each business service, thereby effectively improving the processing efficiency of the business system. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 An application environment diagram of a business system processing method in an embodiment;
[0012] Figure 2 A flowchart of a business system processing method in one embodiment;
[0013] Figure 3 A schematic diagram of a management interface of a back-end service brake switch in an embodiment;
[0014] Figure 4A schematic diagram of a management interface of a rear-end service brake switch after a change in an embodiment;
[0015] Figure 5 A schematic diagram of a brake switch change operation of a certain trading system in one embodiment;
[0016] Figure 6 A schematic diagram of updating memory data of a brake switch of a trading system in one embodiment;
[0017] Figure 7 It is an overall schematic diagram of a transaction process after the braking function is introduced in one embodiment;
[0018] Figure 8 A schematic diagram of reading a brake switch state from memory data in one embodiment;
[0019] Fig. 9 A schematic diagram of a flow chart of a brake switch being in different states when a transaction execution service accepts a transaction order in one embodiment;
[0020] Fig.10 A schematic diagram of intercepting a service request by configuring a filter in one embodiment;
[0021] Fig.11 It is a structural block diagram of a business system processing device in one embodiment;
[0022] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0024] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.
[0025] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which is used on demand and is flexible and convenient. Cloud computing technology will become an important support. The services of technical network systems require a large amount of computing and storage resources, such as video websites, image websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.
[0026] Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.
[0027] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, drones, robots, smart medical care, smart customer service, Internet of Vehicles, automatic driving, smart transportation, etc. I believe that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0028] It should be noted that in the following description, the terms "first, second and third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first, second and third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0029] The business system processing method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the business system 104 through the network. The data storage system can store data that the business system 104 needs to process. The data storage system can be integrated on the business system 104, or it can be placed on the cloud or other network servers. In the case where the business system 104 has been published, the business system 104 receives the business service request including the interactive link information triggered by the terminal 102; when the business system 104 sequentially calls the target business services involved based on the interactive link information, the business system 104 reads the brake switch status of the target business service through the filter of the target business service; when the brake switch status is the start state, the business system 104 intercepts the business service request through the filter, and returns an error response based on the intercepted business service request; when the brake switch status is the off state, the business system 104 responds to the business service request according to the business logic of the target business service, and returns the response result corresponding to the business service request.
[0030] The terminal 102 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an IoT device, and a portable wearable device. The IoT device may be a smart speaker, a smart TV, a smart air conditioner, and a smart vehicle-mounted device, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc.
[0031] The business system 104 can be an independent physical server or a service node in a blockchain system. A peer-to-peer (P2P) network is formed between the service nodes in the blockchain system. The P2P protocol is an application layer protocol running on the Transmission Control Protocol (TCP) protocol.
[0032] In addition, the business system 104 can also be a server cluster composed of multiple physical servers, which can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN, Content Delivery NetworkCDN), as well as big data and artificial intelligence platforms.
[0033] The terminal 102 and the business system 104 may be connected via Bluetooth, USB (Universal Serial Bus) or a network or other communication connection methods, which are not limited in this application.
[0034] In one embodiment, Figure 2As shown, a business system processing method is provided, which can be executed by a server or a terminal alone, or by a server and a terminal together. Figure 1 The business system in is taken as an example to illustrate, including the following steps:
[0035] Step 202: In case the business system has been published, a business service request including interactive link information is received.
[0036] Among them, the business system refers to a system used to provide business services. The business system in this application may include different types of business systems. For example, the business system in this application may be a resource interaction system. The resource interaction system is a system built for different resource interactions. For example, the resource interaction system in this application may be a transaction system.
[0037] A published business system means that the status of the business system is released and launched. In this application, the business system can be released and launched in a grayscale release. For example, a published business system can be a grayscale version of a business system that has been released and launched. That is, when a business service in a business system is released and launched or the business system version needs to be upgraded, a grayscale release can be adopted.
[0038] Grayscale release (also known as canary release) refers to a release method that can smoothly transition between black and white. In the process of rapid iteration of business system versions, grayscale versions and official versions can coexist, and grayscale versions are gradually released to upgrade to official versions. In this way, the business system does not need to be stopped for a period of time during the process of updating the business service version. The transition process between different versions can be monitored. Once a problem is found in the grayscale version, it can be quickly rolled back to the original official version.
[0039] Interactive link information refers to the path information for calling business services, that is, a business service request needs to configure the corresponding interactive link information according to the calling order between services. The interactive link information may include the calling link information between business services. For example, after the business system receives the business service request A sent by the client through the gateway, the server can call service A to process the business service request A according to the interactive link information A carried in the business service request A. In the process of service A processing the business service request A, service A may also need to call service B, that is, the interactive link information A can be expressed as: SvcA→SvcB, that is, the business system forwards the business service request A to service A for processing. When service A processes the business service request A, it also needs to further call service B.
[0040] A business service request refers to a request corresponding to a business function initiated by a user in different business systems according to different needs. The business service request in this application may include different types of business requests. For example, the business service request in this application may be a resource interaction request, and the resource interaction request may include a transaction order request.
[0041] Specifically, in the case of a published business system, the business system, i.e., the server, can receive a business service request including interactive link information sent by the terminal. For example, a user can log in to the business system of a specific scenario by entering a user name and password in a terminal application or a browser web page. A user can initiate a specific business service request through an app (Application) client or a web client, i.e., a web browser. Then, the business system can receive business service requests including interactive link information sent by different users through the client. Among them, the client, or user end, refers to a program that corresponds to the server and provides local services to customers. Except for some applications that only run locally, they are generally installed on ordinary client computers and need to cooperate with the server to run. Clients can include DNS clients, web clients, game clients, and mobile clients, etc. For example, taking a mobile phone as an example, the mobile client is software that can run on a mobile terminal.
[0042] For example, in the case of a grayscale version of business system A that has been released, the grayscale version of business system A can receive resource interaction requests including interactive link information sent by different terminals. For example, business system A can receive resource interaction request A including interactive link information A sent by terminal A and resource interaction request B including interactive link information B sent by terminal B.
[0043] Step 204 : when the target business services involved are called in sequence based on the interactive link information, the brake switch status of the target business service is read through the filter of the target business service.
[0044] The target business service refers to one or more business services included in the business system. For example, if business system A includes service A, service B, and service C, and the interactive link information carried in business service request A includes service A and service B, then the target business service may refer to service A and service B.
[0045] A filter refers to a pre-configured component used to filter business service requests. For example, the filter in this application can be implemented by pre-writing a piece of code. The filter is mainly used to filter information such as character encoding. For example, the filter in this application is used to filter the parameter of the brake switch state of the business service. It can be understood that in this application, a corresponding filter can be pre-configured for each business service in the business system, that is, one business service corresponds to one filter.
[0046] The brake switch status refers to the state of the brake switch. For example, the brake switch status in this application may include an on state and an off state. When the brake switch status is on, it means that the business service has turned on the braking function; when the brake switch status is off, it means that the business service has turned off the braking function.
[0047] The braking function refers to a braking capability. For example, service A turns on the braking function, that is, when it is detected that the braking switch state of service A is in the start state, the filter stops the normal business logic response processing of service A. That is, the braking capability in this application refers to: the ability to intercept business functions, which is reflected in returning a specific error response. That is, the braking capability in this application can ensure the normal operation of a business service module in the business system and accept the request of the upstream service normally, but does not perform the business logic processing of this business service module, and directly returns a specific error response to interrupt the business system call link and stop the normal processing of business service requests.
[0048] It can be understood that when the braking function in this application is turned on, it does not affect the operation of the business service module itself, only filters and intercepts requests, does not execute the business logic of the business service module itself, and can directly return a special response. For example, if the braking function of a business service is turned off, the business service can provide services normally; if the braking function of a business service is turned on, when the business service is called, the business service returns a fixed error response and does not provide the business service of its own module.
[0049] Specifically, in the case of a published business system, after the business system receives a business service request including interactive link information, the business system can sequentially call the target business services involved based on the interactive link information. In the process of the business system sequentially calling the target business services involved based on the interactive link information, the business system can read the brake switch status of the target business service through the filter of the target business service. For example, the business system can read the brake switch status of this service from the memory data through the filter of the target business service. That is, the brake switch of each business service in the present application can be configured separately to achieve refined management of each business service in the interactive link, and through the combination of the brake switches of each business service, complex business scenarios can be quickly constructed. For example, when performing abnormal scenario verification online on the published grayscale version of the business system, different abnormal call scenarios can be constructed for multiple target business services in the interactive link.
[0050] For example, let's take the business system as a resource interaction system. Assuming that in the case of a grayscale version of resource interaction system A, after the resource interaction system A receives the resource interaction request A including the interaction link information A sent by terminal A through the gateway, the resource interaction system A can call the target services involved in sequence based on the interaction link information A. Assuming that the interaction link information A is expressed as: SvcA→SvcB, when the resource interaction system A calls the target services involved in sequence based on the interaction link information A, the resource interaction system A processes the resource interaction request A by calling service A. In the process of service A processing the resource interaction request A, service A also needs to call service B, that is, when the resource interaction system A forwards the resource interaction request A to service A for processing, the brake switch status of service A is first read through filter A of service A; similarly, when service A further calls service B, the brake switch status of service B is read through filter B of service B.
[0051] Step 206: When the brake switch state is the start state, the business service request is intercepted by the filter, and an error response is returned based on the intercepted business service request.
[0052] The error response refers to a specific abnormal response returned. In some cases, the error response in this application may also be referred to as an abnormal response. For example, the error response in this application may be a fixed abnormal response returned. For example, the error response in this application may include a specific error code and an error information identifier.
[0053] Specifically, when the business system sequentially calls the target business service involved based on the interactive link information, after the business system reads the brake switch state of the target business service through the filter of the target business service, when the brake switch state of the target business service is in the start state, the business system can intercept the business service request through the filter of the target business service, and return an error response based on the intercepted business service request, that is, the business system intercepts the business service request through the filter of the target business service, and returns an error response including a specific error code and an error information identifier, so as to brake the normal business function of the target business service and construct the business scenario required for verification. It can be understood that in this application, the targeted work is completed by configuring a filter to intercept the request for the business service, which has the advantages of non-intrusion to the service core and easy expansion.
[0054] For example, the business system is a resource interaction system. Assuming that in the case of a grayscale version of resource interaction system A, after receiving a resource interaction request A including interaction link information A sent by terminal A through a gateway, resource interaction system A can call the target services involved in sequence based on interaction link information A. Assuming that interaction link information A is expressed as: SvcA→SvcB, when resource interaction system A calls the target services involved in sequence based on interaction link information A, when resource interaction system A calls service A to process the resource interaction request A, first read the brake switch state of service A through filter A of service A; when filter A of service A reads that the brake switch state of service A is in the start state, resource interaction system A can intercept the resource interaction request A through filter A, and return a specific error response based on the intercepted resource interaction request A, for example, resource interaction system A intercepts the resource interaction request A through filter A, and returns an error response carrying a specific error code A01 and error information identifier S22.
[0055] Step 208: When the brake switch is in the off state, the business service request is responded to and processed according to the business logic of the target business service, and a response result corresponding to the business service request is returned.
[0056] Among them, business logic refers to the business logic executed to implement the normal business functions of the target business service.
[0057] The response result refers to the result obtained after processing the business service request according to the business logic of the target business service. For example, the response result in this application may include two types of response results: successful response and failed response.
[0058] Specifically, when the business system sequentially calls the target business service involved based on the interactive link information, the business system reads the brake switch status of the target business service through the filter of the target business service. When the brake switch status of the target business service is closed, the business system can respond to the business service request according to the business logic of the target business service, and return the response result corresponding to the business service request to achieve the normal business function of the target business service and ensure the normal operation of online business processing. That is, by adjusting the start and stop of the brake switches of different business services, it can ensure a rapid response to changes in business service behavior, and quickly switch between the two modes of "accepting requests and performing business logic normally" and "accepting requests but not performing business logic, returning fixed exceptions", which can effectively ensure the real-time and availability of the interactive link and save time.
[0059] For example, let's take the business system as a resource interaction system. Assuming that in the case of a grayscale version of resource interaction system A, after receiving a resource interaction request A including interaction link information A sent by terminal A through a gateway, resource interaction system A can call the target services involved in sequence based on interaction link information A. Assuming that interaction link information A is represented as: SvcA→SvcB, when resource interaction system A calls service A to process the resource interaction request A, it first reads the brake switch status of service A through filter A of service A; when filter A of service A reads that the brake switch status of service A is in the start state, resource interaction system A can intercept the resource interaction request A through filter A, and return a specific error response based on the intercepted resource interaction request A. Furthermore, when service A calls service B to process the resource interaction request A, it first reads the brake switch status of service B through filter B of service B; when filter B of service B reads that the brake switch status of service B is closed, resource interaction system A responds to and processes the resource interaction request A according to the business logic of service B, that is, service B will respond to and process the resource interaction request A according to its own business logic, and return the response result A corresponding to the resource interaction request A. For example, resource interaction system A responds to and processes the resource interaction request A through service B, and returns the response result A carrying the result parameters obtained by real-time processing.
[0060] In this embodiment, in the case of a published business system, a business service request including interactive link information is received; when the target business services involved are called in sequence based on the interactive link information, the brake switch status of the target business service is read through the filter of the target business service; when the brake switch status is the start state, the business service request is intercepted by the filter, and an error response is returned based on the intercepted business service request; when the brake switch status is the off state, the business service request is responded to and processed according to the business logic of the target business service, and a response result corresponding to the business service request is returned. Since each target business service is configured with a filter, when the business system calls the target business services involved in sequence based on the interactive link information carried in the business service request, the brake switch status of the service can be read through the filter of each target business service, and different processing flows can be executed according to the brake switch status. That is, when the brake switch status of the target business service is in the started state, the business system intercepts the business service request through the filter of the target business service, and returns an error response including a specific error code and error information identifier, so as to brake the normal business function of the target business service and construct the business scenario required for verification; in addition, when the brake switch status of the target business service is in the closed state, the business system can respond to the business service request according to the business logic of the target business service, and return the response result corresponding to the business service request, so as to realize the normal business function of the target business service and ensure the normal operation of online business processing. That is, by adjusting the start and stop of the brake switches of different business services, it is possible to ensure a rapid response to changes in business service behaviors, and quickly switch between the two modes of "accepting requests and performing business logic normally" and "accepting requests but not performing business logic and returning fixed exceptions". This can effectively ensure the real-time and availability of the interactive link, effectively avoid direct modification of back-end configuration files and library table data, reduce the risks brought by human operational errors, and while ensuring the normal operation of the original business functions, it can also verify abnormal scenarios through the combination of the brake switches of each business service, thereby effectively improving the processing efficiency of the business system.
[0061] In one embodiment, before receiving the business service request including the interactive link information, the method further includes:
[0062] In response to a triggering operation on a first control in a management interface of a brake switch, displaying a business service for which a brake function has been created;
[0063] In response to the first service selection operation, the business service corresponding to the first service selection operation is deleted from the management interface.
[0064] The management interface of the brake switch refers to the interface used to manage the brake switches of various business services in the backend. The management interface of the brake switch can contain different types of controls. For example, Figure 3 As shown, it is a schematic diagram of the management interface of the back-end service brake switch. The management interface of the brake switch in this application can be as follows Figure 3 As shown in Figure 3 The management interface of the brake switch shown may include controls for querying business services, deleting business services, and adding new business services.
[0065] The first control refers to a control included in the management interface of the brake switch for deleting a business service of a created brake function. For example, the first control may be displayed in the management interface of the brake switch in the form of a button.
[0066] The first service selection operation refers to an operation triggered by a user for selecting a business service, that is, the user can filter the business services of the created brake function displayed on the management interface of the brake switch to select the target business service identifier corresponding to the target business service, wherein the target business service identifier can be an icon, a text identifier, or a comprehensive identifier including an icon and a text identifier. For example, Figure 3 As shown in FIG. 1 , it is a schematic diagram of the management interface of the backend service brake switch. The target business service identifier can be as follows: Figure 3 The “Transaction Risk Management Service” text logo shown in the figure is used to identify the specific name of the target business service.
[0067] Specifically, in the case of a published business system, before the business system receives a business service request including interactive link information sent by a terminal, the user can set the braking function of each backend business service through interactive operations to construct different abnormal call scenarios. For example, the user can enter the management interface of the backend service braking switch through a trigger operation. Further, the user can set the braking function of each backend business service through interactive operations in the displayed management interface of the backend service braking switch. For example, the business system displays the business services with the created braking function in response to the user's trigger operation on the first control in the management interface of the backend service braking switch; further, the user can select a business service through interactive operations in the business services with the created braking function, and the business system deletes a business service corresponding to the service selection operation from the displayed management interface in response to the user's service selection operation, that is, the setting of the braking function of each business service can be directly managed visually through the management interface, and the braking function is only used for online abnormal scenario verification. Therefore, under normal circumstances, the braking switch state of each business service with the created braking function needs to be kept closed.
[0068] For example, let's take the business system as a transaction system. Figure 3 As shown in the figure, it is a schematic diagram of the management interface of the backend service brake switch of a trading system. When the developer releases a gray version of the trading system with new functional points, the developer can construct the required verification scenario by setting the brake function of each business service in the gray version of the trading system. For example, the administrator A with setting authority logs in to the following through triggering operation: Figure 3 In the management interface A of the service brake switch corresponding to a gray version of the trading system A shown in , further, the administrator A can construct a verification scenario based on the required configuration, such as Figure 3 In the management interface A shown, click on the "Delete" control shown in the dotted ellipse box. Then, in response to the user's click operation on the "Delete" control in the management interface A, the trading system A displays the business services of the created braking function in a secondary pop-up window. Assume that the business services of the created braking function displayed in the secondary pop-up window include: trading risk management service, trading order service, trading execution service, trading risk management service and exposure management service; further, assume that the user selects the "Exposure Management Service" service through interactive operation in the displayed business services of the created braking function. Then, in response to the user's above-mentioned service selection operation, the business system deletes the "Exposure Management Service" service corresponding to the service selection operation from the displayed business services of the created braking function, and a schematic diagram of the management interface with the "Exposure Management Service" service deleted can be obtained. For example, Figure 4 The figure is a schematic diagram of the management interface of the rear-end service brake switch after the change. Figure 4 The module with braking function shown in the figure does not include the "Exposure Management Service".
[0069] In the traditional way, in the iterative development of the version, in order to ensure the online business operation, the modified functional points need to be fully verified to ensure 100% coverage of the code. When it comes to verifying various abnormal logic branches, it is often necessary to manually construct service exceptions or parameter exceptions to ensure that the business system presents the expected performance of the code in abnormal scenarios, thereby ensuring the stability of the business system. However, some extreme abnormal scenarios are often not triggered by normal business logic. Therefore, in the traditional way, some normal business services need to be manually offline or the correct configuration parameters need to be changed to incorrect parameters, that is, the configuration needs to be manually modified or the service needs to be offline, and the online operation still needs to follow the release specification process, which takes a lot of time to modify and release. At the same time, during the verification process, for complex business scenarios, it may be necessary to modify the configuration file multiple times and go online or offline. It is very easy to make mistakes or miss some operations, resulting in a lot of time spent on modifying the configuration process.
[0070] In this embodiment, by building the braking capabilities of each business service for the background service and setting permission restrictions, it can be ensured that the braking status of each business service can be changed during verification, the normal business functions of the business service can be braked, and the required verification scenario can be constructed. In addition, the setting of the braking function of each business service can be directly visualized through the management interface, which effectively avoids direct modification of the back-end configuration files and library table data, reduces the risks brought by human operational errors, and effectively improves the accuracy of abnormal scenario verification.
[0071] In one embodiment, before receiving the business service request including the interactive link information, the method further includes:
[0072] In response to a triggering operation on the second control in the management interface, displaying a business service for which a braking function has not been created;
[0073] In response to the second service selection operation, the business service corresponding to the second service selection operation is added to the management interface.
[0074] The second control refers to a control for adding a brake function to a new service included in the management interface of the brake switch. For example, the second control may be displayed in the management interface of the brake switch in the form of a button. It is understood that the first control and the second control in this application are only used to distinguish controls with different functions.
[0075] The second service selection operation refers to an operation triggered by a user for selecting a business service, that is, the user can filter the business services that have not created a brake function displayed in the management interface of the brake switch to select the target business service identifier corresponding to the target business service. It can be understood that the first service selection operation and the second service selection operation in this application are only used to distinguish service selection operations in different processes.
[0076] Specifically, in the case of a published business system, before the business system receives a business service request including interactive link information sent by a terminal, the user can set the braking function of each backend business service through interactive operations to construct different abnormal call scenarios. For example, the user can enter the management interface of the backend service braking switch through a trigger operation. Further, the user can set the braking function of each backend business service through interactive operations in the displayed management interface of the backend service braking switch. For example, the business system responds to the user's trigger operation on the second control in the management interface of the backend service braking switch and displays the business services that have not created the braking function; further, the user can select a business service through interactive operations from the displayed business services that have not created the braking function. Then, the business system responds to the user's service selection operation and adds a business service corresponding to the service selection operation to the management interface to complete the setting of the braking function of a certain business service.
[0077] For example, let's take the business system as a transaction system. Figure 3 As shown in the figure, it is a schematic diagram of the management interface of the backend service brake switch of a trading system. When the developer releases a gray version of the trading system with new functional points, the developer can set the brake function of each business service in the gray version of the trading system to construct the required verification scenario. For example, administrator A with setting authority logs in to the following through triggering operation: Figure 3 In the management interface A of the service brake switch corresponding to a gray version of the trading system A shown in , further, the administrator A can construct a verification scenario based on the required configuration, such as Figure 3 In the management interface A shown in FIG. 1 , click the “Add” control shown in the rectangular dotted box, then the trading system A responds to the user's click operation on the “Add” control in the management interface A and displays the business services without the braking function in a secondary pop-up window. It is assumed that the business services without the braking function displayed in the secondary pop-up window include: trading risk management service, trading order service, trading execution service, trading risk management service and exposure management service. Further, it is assumed that the user selects the “trading risk management service” service through interactive operation from the displayed business services without the braking function, then the business system responds to the user's above-mentioned service selection operation and adds the “trading risk management service” service corresponding to the service selection operation to the service selection window as shown in FIG. Figure 3 In the management interface shown, complete the setting of the braking function of the "Transaction Risk Management Service" service, for example, Figure 4 The figure is a schematic diagram of the management interface of the rear-end service brake switch after the change. Figure 4The module with the braking function shown in the figure includes the "Transaction Risk Management Service". As a result, the braking function settings of various business services can be directly managed visually through the management interface, avoiding the need for developers to manually modify the backend configuration files and database table data in the traditional way, reducing the risk of human operational errors.
[0078] In one embodiment, before receiving the business service request including the interactive link information, the method further includes:
[0079] In response to a modification operation in the management interface of the brake switch, a state change is performed on the brake switch state of the business service corresponding to the modification operation;
[0080] The changed brake switch state is stored in the database;
[0081] The changed brake switch status is displayed in the management interface.
[0082] The modification operation refers to an operation triggered by a user for modifying the brake switch state of a business service. For example, the modification operation in this application may be a click operation, that is, the user may modify the brake switch state of a business service in a manner such as Figure 3 In the management interface of the brake switch shown, the brake switch status of the business service can be modified by clicking the control in the entry column of "Brake Status".
[0083] Specifically, in the case of a published business system, before the business system receives a business service request including interactive link information sent by a terminal, the user can modify the brake switch status of each business service that has created a brake function through interactive operations to construct different abnormal call scenarios. For example, the user can enter the management interface of the backend service brake switch through a trigger operation. Further, the user can modify the brake switch status of each backend business service through interactive operations in the displayed management interface of the backend service brake switch. For example, the business system responds to the user's trigger operation on the brake switch status of a business service in the management interface of the backend service brake switch, and changes the state of the brake switch status of a business service corresponding to the trigger operation; further, the business system can store the changed brake switch status in the database, and display the changed brake switch status in the management interface of the backend service brake switch.
[0084] For example, let's take the business system as a transaction system. Figure 3As shown in the figure, it is a schematic diagram of the management interface of the backend service brake switch of a trading system. After the developer releases the gray version of the trading system with new functional points, the developer can modify the brake switch status of each business service that has created the brake function in the gray version of the trading system to construct different abnormal call scenarios. For example, administrator A with setting authority logs in to the following by triggering an operation: Figure 3 In the management interface A of the service brake switch corresponding to a gray version of the trading system A shown in , further, the administrator A can construct a verification scenario based on the required configuration, such as Figure 3 In the management interface A shown, if the brake status control "Turn on" corresponding to the "Transaction Execution Service" with serial number 3 is clicked, then the trading system A responds to the user's click operation on the brake status control "Turn on" corresponding to the "Transaction Execution Service" with serial number 3 in the management interface A, and changes the brake switch status of the "Transaction Execution Service" corresponding to the click operation, so that the brake switch status of the changed "Transaction Execution Service" is: "Closed" state; further, the trading system A can store the brake switch status (closed state) of the changed "Transaction Execution Service" in the database, and display the brake switch status of the changed "Transaction Execution Service" in the management interface of the back-end service brake switch, for example, Figure 4 The figure is a schematic diagram of the management interface of the rear-end service brake switch after the change. Figure 4 The module with the brake function shown in the figure contains the service "Transaction Execution Service", and, Figure 4 The brake switch status of the service "Transaction Execution Service" with sequence number 3 shown in the figure is "off". As a result, the setting of the brake function of each business service can be directly managed visually through the management interface, avoiding the need for developers to manually modify the backend configuration files and database table data in the traditional way, reducing the risk of human operational errors.
[0085] In one embodiment, the method further comprises:
[0086] generating a first warning message based on the changed brake switch state;
[0087] The first alarm information is sent to the management device to prompt that the brake switch state has changed.
[0088] Among them, the first alarm information refers to information used to prompt that the brake switch status has changed. For example, the first alarm information in this application can be sent in the form of a notification message to the management device used by the administrator to prompt the administrator to know that the brake switch status of the business service has changed.
[0089] Specifically, in the case of a published business system, before the business system receives a business service request including interactive link information sent by a terminal, the user can modify the brake switch status of each business service that has created a brake function through interactive operations to construct different abnormal call scenarios. For example, the user can enter the management interface of the backend service brake switch through a trigger operation. Further, the user can modify the brake switch status of each backend business service through interactive operations in the displayed management interface of the backend service brake switch. For example, the business system responds to the user's trigger operation on the brake switch status of a business service in the management interface of the backend service brake switch, and changes the state of the brake switch status of a business service corresponding to the trigger operation; further, the business system can generate a first alarm message based on the changed brake switch status of the business service, and send the first alarm message to the management device to prompt the administrator using the management device to obtain relevant information about the change of the brake switch status in a timely manner. As a result, by restricting the modification of the permissions for the braking functions of each business service, it is ensured that the braking status of each business service module can be changed during verification, and the normal business functions of the business service module can be braked to construct the abnormal scenario required for verification. In addition, by automatically triggering alarm information, malicious tampering and the like can be prevented, thereby ensuring the rapid response of the original business functions and minimizing the impact on business time after the introduction of the braking function.
[0090] In one embodiment, the step of storing the changed brake switch state in a database comprises:
[0091] The operation and maintenance management service is called so that the operation and maintenance management service updates the brake switch status in the brake switch library table in the database based on the changed brake switch status.
[0092] Among them, the operation and maintenance management service refers to one of the services in the business system. For example, the operation and maintenance management service in this application is used to manage and update the data in each library table in the database.
[0093] The brake switch library table refers to a library table in the database used to store the brake switch status. For example, the brake switch library table in the database can be preset to 001. Multiple library tables can be divided in the database to facilitate the search of different types of data.
[0094] Specifically, in the case of a published business system, before the business system receives a business service request including interactive link information sent by a terminal, the user can modify the brake switch status of each business service that has created a brake function through interactive operations to construct different abnormal call scenarios. For example, the user can enter the management interface of the backend service brake switch through a trigger operation. Further, the user can modify the brake switch status of each backend business service through interactive operations in the displayed management interface of the backend service brake switch. For example, the front end of the business system responds to the user's trigger operation on the brake switch status of a business service in the management interface of the backend service brake switch, and changes the state of the brake switch status of a business service corresponding to the trigger operation; further, the business system can call the backend operation and maintenance management service, so that the operation and maintenance management service updates the brake switch status of a business service in the brake switch library table in the database based on the changed brake switch status in the front-end management interface.
[0095] For example, let's take the business system as a trading system. In the case of a grayscale version of trading system A, before trading system A receives a business service request including interactive link information sent by a terminal, the user can modify the brake switch status of each business service that has created a brake function through interactive operations to construct different abnormal call scenarios. Figure 5 The figure below is a schematic diagram of the brake switch change operation of a trading system. Figure 5 The processing flow shown in is a schematic diagram of the interaction between the front-end and back-end of the trading system, that is, the back-end operation and maintenance management service updates the data in the database table used to store the brake switch status according to the user's change operation on the brake switch status recorded by the front-end.
[0096] For example, administrator A with setting permissions logs in through a trigger operation. Figure 3 In the management interface A of the service brake switch corresponding to a gray version of the trading system A shown in , further, the administrator A can construct a verification scenario based on the required configuration, such as Figure 3In the management interface A (web front end) shown, if the brake state control corresponding to the "transaction execution service" with the serial number 3 is clicked to "open", the front end of the transaction system A responds to the user's click operation on the brake state control corresponding to the "transaction execution service" with the serial number 3 in the management interface A, and the front end changes the brake switch state of the "transaction execution service" corresponding to the click operation, so that the brake switch state of the "transaction execution service" service after the change is "closed"; further, the front end of the transaction system A calls the back-end operation and maintenance management service, so that the back-end operation and maintenance management service updates the brake switch state of the "transaction execution service" service in the brake switch library table 001 in the database to the closed state based on the brake switch state (closed state) of the "transaction execution service" service after the change. As a result, the addition, modification and query of the brake capabilities of each business service module in the business system can be visually managed from the management interface, that is, the modification operation of the brake switch can be changed from the front-end interface in the form of a button, avoiding direct modification of the back-end configuration file and library table data, reducing the risk of human operation errors, and effectively improving the accuracy of abnormal scenario verification.
[0097] In one embodiment, in response to a modification operation in the management interface of the brake switch, after changing the state of the brake switch of the business service corresponding to the modification operation, the method further includes:
[0098] Send a notification message to the first filter of the business service corresponding to the modification operation, so that the first filter updates the brake switch state in the memory data; or,
[0099] Based on the preset timing task, the brake switch status of the business service is periodically obtained from the database; when it is determined that the brake switch status has changed, the brake switch status in the memory data is updated through the second filter; the second filter is the filter of the business service corresponding to the changed brake switch status.
[0100] Among them, the first filter refers to the filter of the business service corresponding to the modification operation, and the second filter refers to the filter of the business service corresponding to the changed brake switch state. That is, in the embodiment of the present application, each business service corresponds to a filter. For example, the filter corresponding to service A is filter A, and the filter corresponding to service B is filter B. When it is determined in the database that the brake switch state of service A has changed, the brake switch state in the memory data is updated through filter A of service A, and filter A is the second filter.
[0101] Specifically, in the case of a published business system, before the business system receives a business service request including interactive link information sent by a terminal, the user can modify the brake switch status of each business service that has created a brake function through interactive operations to construct different abnormal call scenarios. For example, the user can enter the management interface of the backend service brake switch through a trigger operation. Further, the user can modify the brake switch status of each backend business service through interactive operations in the displayed management interface of the backend service brake switch. For example, the business system responds to the user's trigger operation on the brake switch status of business service A in the management interface of the backend service brake switch. After the brake switch status of business service A corresponding to the trigger operation is changed, the business system can send a notification message to filter A of business service A corresponding to the modification operation, so that filter A synchronously updates the brake switch status in the memory data.
[0102] Alternatively, the business system can periodically obtain the brake switch status of each business service from the database based on a preset timed task. For example, when the business system determines that the brake switch status of business service A has changed, the business system can update the brake switch status in the memory data through the second filter, that is, filter A of business service A. That is, the present application can synchronously update the brake switch status of the business service that has changed in the database to the memory data in different ways, so as to obtain the brake status of each business service by reading the memory data, effectively avoiding time-consuming operations such as reading the database.
[0103] For example, let's take the business system as a transaction system. For example, administrator A with setting permissions logs in through a trigger operation. Figure 3 In the management interface A of the service brake switch corresponding to a gray version of the trading system A shown in , further, the administrator A can construct a verification scenario based on the required configuration, such as Figure 3In the management interface A (web front end) shown, click on the brake status control "Turn on" corresponding to the "Transaction Execution Service" with serial number 3. Then, the front end of the transaction system A responds to the user's click operation on the brake status control "Turn on" corresponding to the "Transaction Execution Service" with serial number 3 in the management interface A. The front end will change the state of the brake switch state of the "Transaction Execution Service" corresponding to the click operation, and the changed brake switch state of the "Transaction Execution Service" service is: "Closed" state; further, the transaction system A can send a notification message to the filter A of the "Transaction Execution Service" corresponding to the click operation, so that the filter A synchronously updates the brake switch state in the memory data to the "Closed" state, so that when the "Transaction Execution Service" service is called subsequently, the filter A of the "Transaction Execution Service" service can directly read from the memory data that the brake switch state of the "Transaction Execution Service" is "Closed" state.
[0104] like Figure 6 The figure below is a schematic diagram of the update of the brake switch memory data of a trading system. Figure 6 The processing flow shown in is to periodically read the data reflecting the brake switch status from the database in the form of a timed task. For example, the data reflecting the brake switch status in this application can be the brake switch value. For example, when the brake switch value is 1, it indicates that the brake switch state is in the closed state; when the brake switch value is 0, it indicates that the brake switch state is in the open state. That is, in the case of a grayscale version of trading system A, trading system A can be based on a preset timed task. Assuming that the period of the timed task is every 1 second, trading system A can periodically read the brake switch value of each business service in the database every 1 second based on the timed task, and determine whether the brake switch value of each business service has changed, that is, determine whether the brake switch value of each business service has been updated. If so, trading system A can synchronously update the brake switch value in the memory data through the second filter.
[0105] In this embodiment, the brake switch status of the business services that have changed in the database is synchronously updated to the memory data in different ways, so that the brake status of each business service can be obtained by reading the memory data, effectively avoiding time-consuming operations such as reading the database, and thus effectively improving the processing efficiency of the business system.
[0106] In one embodiment, the method further comprises:
[0107] When an exception occurs in the process of reading the brake switch state of the business service from the database, the brake switch state in the memory data is set to the closed state through the filter of the business service.
[0108] Among them, the abnormalities that occur during the process of reading the brake switch status of the business service from the database in this application include but are not limited to: failure to read data from the database, errors in reading data, database abnormalities, and other abnormalities.
[0109] Specifically, the business system is a transaction system. Figure 6 The figure below is a schematic diagram of the update of the brake switch memory data of a trading system. Figure 6 The processing flow shown in is to periodically read the data reflecting the brake switch status from the database in the form of a scheduled task. For example, in the case of a grayscale version of trading system A, trading system A can periodically read the brake switch value of each business service in the database every 10 seconds based on a preset scheduled task, and determine whether the brake switch value of each business service has changed, that is, determine whether the brake switch value of each business service has been updated. If so, trading system A can synchronously update the brake switch value in the memory data through the second filter. Figure 6 As shown in , if an exception occurs in the process of transaction system A periodically reading the brake switch status of business service A from the database based on a preset timed task, for example, when an exception occurs in reading the database, transaction system A can set the brake switch status of business service A in the memory data to a closed state through filter A of business service A. For example, transaction system A can set the brake switch value of business service A in the memory data to 1 through filter A of business service A, that is, when the brake switch value is 1, it indicates that the brake switch status is closed. As a result, in the process of data processing by the business system, if other unknown and abnormal states occur, the business system can automatically close the brake function of the business service to ensure the normal operation of the original business function in the business system, that is, to ensure the real-time and availability of the transaction link in the transaction system.
[0110] In one embodiment, the business system is a grayscale version of the business system; the method further includes:
[0111] When the verification of the abnormal business scenario is completed based on the error response, the grayscale version of the business system will be fully released.
[0112] Among them, the grayscale version of a business system refers to a version of a business system that is released in grayscale. For example, business service A in the business system of version A1.1 is optimized, and the business system of version A1.2 is released in grayscale. The business system of version A1.2 is the grayscale version of the business system, that is, in the process of rapid iteration of service versions, the grayscale version and the official version can coexist, and the grayscale version is gradually increased to upgrade to the official version. In this way, the service does not need to be suspended for a period of time during the service update process, and the transition process between different versions can be monitored. Once a problem is found in the grayscale version, it can be quickly rolled back to the original official version.
[0113] Abnormal business scenarios refer to constructing different abnormal call scenarios by setting different brake switch states for each business service, that is, the abnormal business scenarios in this application may include abnormal call scenarios, and the call exceptions correspond to business exceptions.
[0114] Full release means releasing it to all users at one time. For example, in the iterative development of business system versions, in order to ensure online business operations, this application can first adopt the grayscale release method. When the grayscale version A of the business system passes the verification, the grayscale version A of the business system can be fully released as the official version.
[0115] Specifically, in the case of a grayscale version of a business system that has been released, the grayscale version of the business system can receive a business service request including interactive link information. When the grayscale version of the business system sequentially calls the target business services involved based on the interactive link information, the grayscale version of the business system can read the brake switch status of the target business service through the filter of the target business service; when the brake switch status is in the start state, the grayscale version of the business system can intercept the business service request through the filter, and return an error response based on the intercepted business service request; further, the grayscale version of the business system can verify the abnormal business scenario based on the returned error response. For example, the grayscale version of the business system can compare the parameter value carried in the returned error response with the preset parameter value to obtain a comparison result, and determine whether the verification of the abnormal business scenario is passed based on the comparison result. If the grayscale version of the business system completes the verification of the abnormal business scenario based on the error response, the grayscale version of the business system will be fully released and launched, that is, the grayscale version of the business system will be fully released and launched as the official version, so that all users can use the official version of the business system. Therefore, by providing braking capabilities for each backend service, the braked module implements the braking function by configuring filters, and each backend service can return a specified response when accepting upstream requests normally, achieving the advantages of non-intrusion to the core business logic and easy expansion. At the same time, a fixed mode for the combined use of the brake switches of each module can be implemented, which can reduce the complexity of the verification process, eliminate the barriers caused by the different levels of understanding of the business by developers, improve the quality of research and development, and effectively reduce the testing costs before full release.
[0116] In one embodiment, the brake switch state of the first business service in the business system is different from the brake switch state of the second business service; the method further includes:
[0117] Generate an automated test case based on the brake switch state of the first business service and the brake switch state of the second business service, and execute the automated test case to obtain a business response result;
[0118] When the verification of the abnormal business scenario is completed based on the error response, the grayscale version of the business system is fully released, including:
[0119] When the verification of the abnormal business scenario is completed based on the business response result, the grayscale version of the business system will be fully released; wherein the business response result is determined based on the error response returned by the target business service involved in the call.
[0120] Among them, the first business service and the second business service are used to distinguish different business services. For example, the first business service is a "transaction order service" and the second business service is a "transaction execution service". The brake switch state of the first business service and the brake switch state of the second business service are different, including: the brake switch state of the "transaction order service" is in the closed state, and the brake switch state of the "transaction execution service" is in the open state; or, the brake switch state of the "transaction order service" is in the open state, and the brake switch state of the "transaction execution service" is in the closed state.
[0121] A test case is a description of a test task for a specific software product, reflecting the test plan, method, technology and strategy. Its contents include test objectives, test environment, input data, test steps, expected results, test scripts, etc., which are finally documented. It can be understood that a test case is a set of test inputs, execution conditions and expected results compiled for a special goal, which is used to verify whether a specific software requirement is met. For example, a test case can contain four contents: test case title, preconditions, test steps and expected results. The test case title mainly describes the test of a certain function; the precondition refers to the condition that the test case title needs to meet; the test steps mainly describe the operation steps of the use case; the expected result refers to the compliance with the expected requirements (development specification, requirement document, user requirements, etc.).
[0122] The business response result refers to the actual execution result obtained by executing the automated test case. For example, the execution steps of an automated test case are as follows: calling service A to process business request A. In the process of service A processing business request A, service A needs to call service B. Assume that the administrator has set the brake switch state of service B to the on state to construct an abnormal call scenario for service B. Therefore, in the process of service A processing business request A, when service A calls service B, an error response will be returned. Based on the error response returned by calling service B, service A obtains a corresponding business execution result of a failed response result. The failed response result is the business response result obtained by executing the automated test case.
[0123] Specifically, in the case of a grayscale version of a business system that has been released, since the grayscale version of the business system includes different types of business services, different abnormal call scenarios can be constructed by combining the brake switch states of each business service. For example, in the case where the brake switch state of the first business service and the brake switch state of the second business service in the business system are different (a combination of brake switch states), the business system can generate an automated test case based on the brake switch state of the first business service and the brake switch state of the second business service, and execute the automated test case to obtain a business response result, which is the actual execution result obtained by executing the automated test case; further, the business system can determine whether the verification of the abnormal business scenario has been completed based on the actual business response result obtained by executing the automated test case. For example, assuming that the business system executes the automated test case and obtains a failed response result, and the failed response result meets the expected execution result of the test case, the business system can determine that the verification of the abnormal business scenario is completed based on the failed response result; if the business system executes the automated test case and obtains a successful response result, and the successful response result does not meet the expected execution result of the test case, the business system can determine that the verification of the abnormal business scenario is not completed based on the successful response result; further, when the business system completes the verification of the abnormal business scenario based on the actual business response result obtained from executing the automated test case, the business system can fully release the grayscale version of the business system.
[0124] For example, let's take the business system as a transaction system. Figure 7 The figure shows the overall schematic diagram of the transaction process after the introduction of the braking function. Figure 7 The process shown in is a schematic diagram of the processing flow of a transaction order after the brake function is introduced. Figure 7 The target business services involved in processing a transaction order in the trading system include but are not limited to the transaction order service, transaction execution service, transaction engine, transaction risk control service and exposure management service. Users can combine and match the brake switch status of each business service through the front-end management interface to construct different abnormal call scenarios. For example, in the case where the brake switch status of the first business service and the brake switch status of the second business service in the published gray version trading system are different (brake switch status combination), assuming that the brake switch status of the first business service is on and the brake switch status of the second business service is off, the first business service is Figure 7 The second business service is "Transaction Execution Service" Figure 7 The "Transaction Order Service" in Figure 7The trading system shown in responds to the user's modification operation in the brake switch management interface, sets the brake switch state of the "trading execution service" corresponding to the modification operation to the on state, and sets the brake switch state of the "trading order service" to the off state, and stores the changed brake switch states in the database; further, the trading system can generate an automated test case A based on the brake switch state of the "trading execution service" (on state) and the brake switch state of the "trading order service" (off state), assuming that the automated test case A includes the following execution steps: when the trading system receives a trading order request, the trading system calls Figure 7 The "Transaction Order Service" shown in the figure processes the transaction order. Figure 7 In the process of processing the transaction order by the "Transaction Order Service" shown in the figure, the "Transaction Order Service" needs to call the "Transaction Execution Service". Since the administrator has set the brake switch state of the "Transaction Execution Service" to the on state to construct an abnormal call scenario for the "Transaction Execution Service", during the process of the "Transaction Order Service" processing the transaction order, when the "Transaction Order Service" calls the "Transaction Execution Service", an error response will be returned. Based on the error response returned by calling the "Transaction Execution Service", the "Transaction Order Service" obtains a corresponding business execution result of a failed response result, which is the business response result obtained by executing the automated test case. That is, after the trading system automatically executes the automated test case A, the business response result obtained is a failed response result. Since the failed response result meets the expected response result, the trading system determines that the verification of the abnormal business scenario is completed based on the failed response result. That is, when the trading system completes the verification of the abnormal business scenario based on the actual business response result (failed response result) obtained by executing the automated test case, the trading system can release the gray version of the trading system in full, that is, the trading system releases the gray version of the business system as a formal version in full, so that all users can use the formal version of the business system. Thus, by providing braking capabilities for each backend service, the braked module implements the braking function by configuring filters, and each backend service can return a specified response when accepting upstream requests normally, achieving the advantages of non-intrusion to the core business logic and easy expansion. At the same time, a fixed mode for the combined use of the brake switches of each module can be realized, which can reduce the complexity of the verification process, eliminate the barriers caused by the different levels of understanding of the business by developers, improve the quality of research and development, and effectively reduce the testing cost before full release.
[0125] In one embodiment, the interaction link information includes a first business service and a second business service; when the business services involved in the resource interaction are sequentially called based on the interaction link information, the step of reading the brake switch state of the business service through a filter of the business service includes:
[0126] When calling the first business service involved in the resource interaction based on the interactive link information, reading the brake switch state of the first business service through the filter of the first business service;
[0127] When the second business service involved in the resource interaction is called based on the interaction link information, the brake switch state of the second business service is read through the filter of the second business service.
[0128] Specifically, in the case of a grayscale version of a business system that has been released, the grayscale version of the business system can receive a business service request including interactive link information. When the grayscale version of the business system calls the target business services involved in sequence based on the interactive link information, the grayscale version of the business system can read the brake switch status of the target business service through the filter of the target business service, that is, when the grayscale version of the business system calls the first business service involved in resource interaction based on the interactive link information, the grayscale version of the business system reads the brake switch status of the first business service through the filter of the first business service; similarly, when the grayscale version of the business system calls the second business service involved in resource interaction based on the interactive link information, the grayscale version of the business system reads the brake switch status of the second business service through the filter of the second business service.
[0129] For example, let's take the business system as a transaction system. Figure 7 The figure shows the overall schematic diagram of the transaction process after the introduction of the braking function. Figure 7 The process shown in is a schematic diagram of the processing flow of a transaction order after the brake function is introduced. Figure 7 The target business services involved in processing a transaction order in the trading system include but are not limited to the transaction order service, transaction execution service, transaction engine, transaction risk control service and exposure management service. Users can combine and match the brake switch status of each business service through the front-end management interface to construct different abnormal call scenarios. For example, in Figure 7 In the published grayscale version trading system shown in Figure 7The trading system shown in responds to the user's modification operation in the brake switch management interface, sets the brake switch state of the "transaction execution service" corresponding to the modification operation to the on state, and sets the brake switch state of the "transaction order service" to the off state, and stores the changed brake switch states of the above-mentioned in the database; further, the grayscale version of the trading system can receive a transaction order request including interactive link information, and when the grayscale version of the trading system sequentially calls the target business services involved based on the interactive link information, the grayscale version of the trading system can read the brake switch state of the target business service through the filter of the target business service, that is, when the grayscale version of the trading system calls the "transaction order service" involved in the resource interaction based on the interactive link information, the grayscale version of the trading system reads the brake switch state of the target business service through the filter of the "transaction order service". Figure 7 The status of the "Trading Order Service Switch" shown in the figure is: Off; In addition, when the "Trading Order Service" processes the trading order, when the "Trading Order Service" calls the "Trading Execution Service", the gray version of the trading system reads the following through the filter of the "Trading Execution Service": Figure 7 The status of the "Transaction Execution Service Switch" shown in is: On.
[0130] In this embodiment, the brake switch of each business service is configured separately, which can achieve refined management of each business service in the interactive link, and through the combination of the brake switches of each business service, complex business scenarios can be quickly constructed. For example, when performing abnormal scenario verification on the released grayscale version of the business system online, different abnormal call scenarios can be constructed for multiple target business services in the interactive link, which can reduce the complexity of the verification process, eliminate barriers caused by different levels of business understanding among developers, improve R&D quality and effectively reduce testing costs before full release.
[0131] In one embodiment, the method further comprises:
[0132] Compare the parameter value carried in the error response with the preset parameter value to obtain a comparison result;
[0133] When the verification of the abnormal business scenario is completed based on the error response, the grayscale version of the business system is fully released, including:
[0134] When the comparison result indicates that the parameter value is consistent with the preset parameter value, the grayscale version of the business system will be fully released.
[0135] Among them, the parameter value is consistent with the preset parameter value means that the parameter value is the same as the preset parameter value. For example, the parameter value carried in the error response is 001, and the preset parameter value is 001, that is, the parameter value 001 carried in the error response is the same as the preset parameter value 001, that is, the parameter value 001 is consistent with the preset parameter value 001.
[0136] Specifically, in the case of a grayscale version of a business system that has been released, the grayscale version of the business system can receive a business service request including interactive link information. When the grayscale version of the business system calls the target business services involved in sequence based on the interactive link information, the grayscale version of the business system can read the brake switch status of the target business service through the filter of the target business service; when the brake switch status is in the start state, the grayscale version of the business system can intercept the business service request through the filter, and return an error response based on the intercepted business service request; further, the grayscale version of the business system can verify the abnormal business scenario based on the returned error response, that is, the grayscale version of the business system can compare the parameter value 001 carried in the returned error response with the preset parameter value 001 to obtain a comparison result, and determine whether the verification of the abnormal business scenario is passed based on the comparison result. For example, when the comparison result indicates that the parameter value 001 is consistent with the preset parameter value 001, the verification of the abnormal business scenario has passed, and the business system can fully release the grayscale version of the business system as the official version.
[0137] In addition, when the comparison result indicates that the parameter value 021 is inconsistent (not the same) as the preset parameter value 001, it means that the verification of the abnormal business scenario has not passed (not completed), and the business system will not release the gray version of the business system as a formal version in full. Therefore, by providing braking capabilities for each back-end service, the braked service module implements the braking function by configuring filters, so that each back-end service returns a specified response when accepting upstream requests normally, achieving the advantages of non-intrusion to the core business logic and easy expansion. At the same time, a fixed mode of combined use of the brake switches of each back-end service module can be implemented, which can reduce the complexity of the verification process, eliminate barriers caused by different levels of understanding of the business by developers, and maintain automated test cases for the fixed verification process as a checkpoint before version iteration goes online, thereby improving R&D quality and reducing testing costs.
[0138] In one embodiment, the interactive link information includes a service name of a target business service; and the step of reading a brake switch state of the business service through a filter of the business service includes:
[0139] When the target business service is called, the brake switch status corresponding to the service name is queried in the memory data through the filter of the target business service;
[0140] The method further includes: when the brake switch state of the target business service is in an on state and the time in the on state exceeds a preset time threshold, outputting second alarm information.
[0141] The service name refers to the name of the target business service. For example, if the target business service is "transaction order service", the service name of the "transaction order service" is "transaction order".
[0142] Specifically, Figure 8 As shown in the figure, it is a schematic diagram of reading the brake switch status from the memory data. Figure 8 In the processing flow shown in , in the case of a published business system, after the business system receives a business service request including interactive link information, the business system can sequentially call the target business services involved based on the interactive link information. In the process of the business system sequentially calling the target business services involved based on the interactive link information, the business system can read the brake switch status of the target business service through the filter of the target business service. For example, when the target business service A is called, the business system queries the brake switch status corresponding to the service name of the service in the memory data through the filter A of the target business service A; for example, Figure 8 As shown in, when the brake switch state of this service is in the start-up state, the business system intercepts the business service request through filter A and returns an error response; when the brake switch state of this service is in the off state, the business system responds to the business service request according to the normal business logic of the target business service A, and returns the corresponding response result; further, when the brake switch state of the target business service A is in the on state, and the time in the on state exceeds the preset time threshold, the business system outputs a second alarm message. For example, the second alarm message is used to remind the administrator that the brake switch state of a back-end service has been in the on state for too long, and there may be an abnormal situation, which requires manual maintenance of the brake switch state of the back-end service.
[0143] For example, let's take the business system as a transaction system. Figure 7 The figure shows the overall schematic diagram of the transaction process after the introduction of the braking function. Figure 7 The process shown in is a schematic diagram of the processing flow of a transaction order after the brake function is introduced. Figure 7 The target business services involved in processing a transaction order in the trading system include but are not limited to the transaction order service, transaction execution service, transaction engine, transaction risk control service and exposure management service. Users can combine and match the brake switch status of each business service through the front-end management interface to construct different abnormal call scenarios. For example, in Figure 7 In the published grayscale version trading system shown in Figure 7 The trading system shown in responds to the user's modification operation in the brake switch management interface, sets the brake switch state of the "transaction execution service" corresponding to the modification operation to the on state, and sets the brake switch state of the "transaction order service" to the off state, and stores the changed brake switch states of the above-mentioned various states in the database; further, the grayscale version of the trading system can receive a transaction order request including interactive link information. When the grayscale version of the trading system sequentially calls the target business services involved based on the interactive link information, the grayscale version of the trading system can read the brake switch state of the target business service through the filter of the target business service. For example, when the grayscale version of the trading system calls such as based on the interactive link information Figure 7 When the "Transaction Execution Service" shown in the gray version of the trading system is used, the gray version of the trading system can query the brake switch state corresponding to the service name of the "Transaction Execution Service" in the memory data through the filter of the "Transaction Execution Service" to be: open state; further, Figure 6 The figure below is a schematic diagram of the update of the brake switch memory data of a trading system. Figure 6 The processing flow shown in is to periodically read the data reflecting the brake switch status from the database in the form of a scheduled task. Assuming that when the gray version of the trading system detects that the brake switch status of the "trading execution service" is in the on state based on the scheduled task, and the time in the on state exceeds the preset time threshold (30 minutes), the gray version of the trading system will automatically output the second alarm information to remind the user that the brake switch status of the "trading execution service" has been in the on state for too long, which may affect the normal operation of the business in the trading system, and whether the user needs to manually modify the brake switch status of the "trading execution service" to the off state.
[0144] In this embodiment, the brake switch of each business service is configured separately, which can achieve refined management of each business service in the interactive link, and through the combination of the brake switches of each business service, complex business scenarios can be quickly constructed. For example, when performing abnormal scenario verification on the released grayscale version of the business system online, different abnormal call scenarios can be constructed for multiple target business services in the interactive link, which can reduce the complexity of the verification process, eliminate barriers caused by different levels of business understanding among developers, improve R&D quality and effectively reduce testing costs before full release.
[0145] The present application also provides an application scenario, and the application scenario applies the above-mentioned business system processing method. Specifically, the application of the business system processing method in the application scenario is as follows:
[0146] In the iterative development of the business system version, in order to ensure the online business operation, the modified function points need to be fully verified to ensure 100% coverage of the code. When it comes to verifying various abnormal business scenarios in the business system released in gray, the above-mentioned business system processing method can be used. For example, in the case of a gray version of the business system that has been released, the business system can receive the business service request including the interactive link information sent by the terminal through the gateway. When the business system sequentially calls the target business service involved based on the interactive link information, the business system can read the brake switch status of the target business service through the filter of the target business service; when the brake switch status is the start state, the business system can intercept the business service request through the filter, and return an error response based on the intercepted business service request to complete the verification of various abnormal business scenarios in the business system released in gray; in addition, when the brake switch status is the off state, the business system can respond to the business service request according to the business logic of the target business service, and return the response result corresponding to the business service request to ensure that the original business function in the business system remains in normal operation. As a result, while ensuring the normal operation of the online business of the business system, different abnormal business scenarios in the grayscale released business system can be verified quickly and effectively, thereby effectively improving the processing efficiency of the business system.
[0147] The method provided in the embodiment of the present application can be applied to various usage scenarios of business systems. The following takes the scenario of a foreign exchange trading system as an example to illustrate the business system processing method provided in the embodiment of the present application.
[0148] Among them, foreign exchange trading refers to buying one currency in a pair of currencies and selling another currency at the same time, which can be the exchange of one country's currency for another country's currency. Unlike other financial markets, the foreign exchange market has no specific location and no central exchange, but is traded through electronic networks between banks, companies and individuals.
[0149] Foreign exchange trading system: It is a system built to support traders or automatic liquidation for foreign exchange transactions. The foreign exchange trading system consists of multiple modules and related infrastructure. For example, the modules in the foreign exchange trading system include: web front-end service, transaction order service, order execution service, risk management service, transaction engine service, exposure management service, etc. The infrastructure in the foreign exchange trading system includes: database, message queue, etc.
[0150] Braking capability: Ensure the normal operation of the module and accept requests from upstream services normally, but do not perform business logic processing of this module. Directly return a specific error response to interrupt the foreign exchange trading system call link and stop the normal trading process.
[0151] In the traditional way, in the iterative development of the version, in order to ensure the online business operation, it is necessary to fully verify the modified functional points to ensure 100% coverage of the code. When it comes to various abnormal logic branches, it is often necessary to manually construct service exceptions or parameter exceptions to ensure that the program presents the expected performance of the code in abnormal scenarios, thereby ensuring the robustness of the program. Extreme abnormal scenarios are often unable to be triggered by normal business logic. The traditional solution is to manually take some normal business services offline or change the correct configuration parameters to incorrect parameters, causing all normal business processes to be abnormal.
[0152] Disadvantages of traditional solutions:
[0153] (1) During the verification process, the configuration needs to be modified manually or the service needs to be taken offline. Online operations must follow the release specification process, which wastes time.
[0154] (2) During the verification process, for complex business scenarios, it may be necessary to modify configuration files and launch or de-launch services multiple times, which can easily lead to errors or omissions of some operations;
[0155] (3) During the verification process, if the system configuration and business scenarios are not well understood, some parameters that need to be modified may not be understood, resulting in barriers to verification operations;
[0156] Therefore, in order to solve the above problems, the present application provides a method for improving the efficiency of foreign exchange trading system release based on module braking capability, which can build the ability to brake various business functions for background services, and through the restriction of permissions, ensure that the braking status of each module can be changed during verification, brake the normal business functions of the module, and construct the required verification scenario, wherein the key technical points include:
[0157] (1) The addition, modification, and query of the braking capacity switches of each module are visually managed from the interface, and the restrictions on the modification of configuration permissions are set;
[0158] (2) The construction of the braking capability of each module. When the braking is turned on, it does not affect the operation of the module. It only filters and intercepts the request, does not execute the business logic of the module, and directly returns a special response;
[0159] (3) To ensure the normal operation of online services, the braking status of each module is monitored;
[0160] The method provided in this application mainly solves the following problems:
[0161] (1) By turning on and off the brake switch, the module can respond quickly to changes in service behavior and quickly switch between the two modes of "accepting requests and performing business logic normally" and "accepting requests but not performing business logic and returning fixed exceptions", saving time.
[0162] (2) The brake switch modification operation is performed through buttons on the front-end interface, avoiding direct modification of back-end configuration files and library table data, and reducing the risk of human operational errors;
[0163] (3) The brake switch of each module is configured separately to achieve refined management of each module in the transaction chain. By combining and matching the switches of each module, more complex business scenarios can be quickly constructed.
[0164] (4) For common verification scenarios, the combination of the brake switches of each module is fixed. By accumulating the combination mode and verification operations into an instruction guide, the complexity of verification is reduced. The process is maintained as an automated use case through code and used as a checkpoint for release and online release, ensuring the quality and stability of system version iterations while reducing labor costs.
[0165] On the product side, Figure 3 The figure shows a schematic diagram of the management interface of the backend service brake switch. After the user opens the game application, the specific steps include:
[0166] (1) Provide a management interface for each back-end service brake switch, and realize the functions of adding, deleting, querying and modifying the brake switch status of each module;
[0167] (2) The backend module chooses whether to execute normal business logic based on the on state of the brake switch of this module. If the brake function is off, the service is provided normally; if the brake function is on, a fixed error response is returned (specific error code and error information indicating that the service is not interrupted because the brake switch is on).
[0168] On the technical side, when verifying exception scenarios online, in the traditional way, different exception call scenarios need to be constructed for multiple modules in the transaction link. It is necessary to modify the environment configuration to construct the exception acceptance of each module, which is time-consuming and has high risks in modifying the configuration.
[0169] Therefore, the embodiment of the present application proposes a solution of setting a separate switch for each module, constructing different service acceptance exception scenarios for online verification, specifically including:
[0170] (1) Brake switch start and stop: It has the function of modifying the switches of each module; the modification process of the brake switch of the foreign exchange trading system is as follows: Figure 5 As shown in;
[0171] aAdd switch operation and maintenance function;
[0172] b. Switch information is stored in the library table;
[0173] c. Send a message when the brake switch status changes, that is, when the brake switch status changes, the foreign exchange trading system automatically sends an alarm message;
[0174] (2) Brake switch operation: When each module is running, it is necessary to determine whether to brake based on the state of the switch. The transaction process after the introduction of the brake function is as follows: Figure 7 As shown in;
[0175] How to connect the braking function to each module:
[0176] Braking capability: The ability to intercept business functions, which is reflected in returning specific error responses.
[0177] For example, Fig. 9 As shown in FIG. 1 , it is a schematic diagram of the process of the brake switch being in different states when the transaction execution service accepts a transaction order, that is, the process of the on and off states of the brake switch when the transaction execution service accepts a transaction order is as follows: Fig. 9 As shown in , when the "Trading Order Service" in the foreign exchange trading system accepts a trading order, the "Trading Order Service" needs to call the "Trading Execution Service" to execute the order acceptance function. When the brake switch of the "Trading Execution Service" is in the off state, the "Trading Order Service" can normally call the "Trading Execution Service" to execute the order acceptance function and return a successful response to the "Trading Order Service"; when the brake switch of the "Trading Execution Service" is in the on state, the "Trading Order Service" calls the "Trading Execution Service" to execute the order acceptance function. Since the brake switch of the "Trading Execution Service" is in the on state, the "Trading Execution Service" cannot execute the order acceptance function and will return a failed response to the "Trading Order Service".
[0178] like Fig.10 As shown in FIG. 1 , it is a schematic diagram of intercepting service requests by configuring filters, that is, in the embodiment of the present application, multiple service modules need to increase the reading and braking capabilities of the brake switch, such as Fig.10 The foreign exchange trading system shown in the figure can intercept service requests by configuring filters to complete targeted work, which can achieve the characteristics of non-intrusion to the service core and easy expansion. At the same time, when entering the braking logic, if the braking switch is set to the on state, a failure response is directly returned, skipping the execution of the original business logic.
[0179] Specific execution logic of the braking function:
[0180] The introduction of braking functions in various modules of the foreign exchange trading system in the embodiment of the present application will affect the real-time trading link. In addition to the basic business functions, the real-time and availability of the trading link must still be guaranteed.
[0181] Among them, real-time performance refers to ensuring the rapid response of the original business functions. After the module introduces the braking function, the impact on business time consumption is reduced to a minimum. At the same time, the foreign exchange trading system reads the brake switch value by reading memory data, avoiding time-consuming operations such as reading the database.
[0182] Availability: refers to the original business function remaining normal while ensuring that the module's braking function is abnormal; that is, the method provided in the embodiment of the present application requires the foreign exchange trading system to read and judge the brake switch value, and it must be clear that the value of the module's brake switch is in the on state before the brake logic is executed.
[0183] In addition, when any other unknown and abnormal conditions occur, the foreign exchange trading system will automatically turn off the braking function to ensure the normal original business functions.
[0184] Monitoring functions of the brake switch:
[0185] The braking function is only used for online verification, so under normal circumstances, the brake switch value must be kept in the normally closed state. In the embodiment of the present application, the foreign exchange trading system introduces a brake switch monitoring function. The foreign exchange trading system needs to judge the brake status value in the memory of each module. When the brake switch value is in the on state for more than half an hour, the foreign exchange trading system will automatically trigger an alarm to prevent the brake switch from being accidentally started and affecting the normal operation of online business.
[0186] In addition, in addition to reading the database through a scheduled task, the data reading of the brake switch in the embodiment of the present application can also be synchronized with the change of the brake switch status through event triggering. For example, when the user modifies the status of the brake switch, a notification message is automatically sent to the corresponding module to synchronize the modification of the switch status in the memory data.
[0187] The beneficial effects of the technical solution of this application include:
[0188] The brake switch management capability provided in the embodiment of the present application realizes the change of the brake switch state through the button control of the interface, shields the complex business data of the backend, and greatly reduces the risk of human operation errors; at the same time, the technical solution of the present application can provide braking capabilities for various backend services, and the braked module realizes the braking function by configuring the filter, and returns the specified response when the upstream request is normally accepted, so as to achieve the advantages of non-intrusion to the core business logic and easy expansion. At the same time, the technical solution of the present application can realize the fixed mode of the brake switch combination of each module, which can reduce the complexity of the verification process, eliminate the barriers caused by the different understanding of the business by developers, and maintain automated test cases for the fixed verification process as a checkpoint before the version iteration is launched, which effectively improves the R&D quality of the business system version iteration and reduces the testing cost.
[0189] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0190] Based on the same inventive concept, the embodiment of the present application also provides a business system processing device for implementing the business system processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more business system processing device embodiments provided below can refer to the limitations on the business system processing method above, and will not be repeated here.
[0191] In one embodiment, Fig.11 As shown, a business system processing device is provided, including: a receiving module 1102, a reading module 1104, an intercepting module 1106 and a processing module 1108, wherein:
[0192] The receiving module 1102 is used to receive a business service request including interactive link information in the case where the business system has been published.
[0193] The reading module 1104 is used to read the brake switch status of the target business service through the filter of the target business service when the target business service involved is called in sequence based on the interactive link information.
[0194] The interception module 1106 is used to intercept the business service request through a filter when the brake switch state is the start state, and return an error response based on the intercepted business service request.
[0195] The processing module 1108 is used to respond to the business service request according to the business logic of the target business service when the brake switch state is the off state, and return a response result corresponding to the business service request.
[0196] In one embodiment, the device also includes: a display module and a deletion module, the display module is used to display the business service of the created braking function in response to the triggering operation of the first control in the management interface of the brake switch; the deletion module is used to delete the business service corresponding to the first service selection operation from the management interface in response to the first service selection operation.
[0197] In one embodiment, the device also includes: an adding module, and the display module is also used to display the business service without creating a braking function in response to the triggering operation of the second control in the management interface; the adding module is used to add the business service corresponding to the second service selection operation to the management interface in response to the second service selection operation.
[0198] In one embodiment, the device also includes: a change module and a storage module, the change module is used to respond to a modification operation in the management interface of the brake switch and change the state of the brake switch of the business service corresponding to the modification operation; the storage module is used to store the changed brake switch state in a database; the display module is also used to display the changed brake switch state in the management interface shown.
[0199] In one embodiment, the device also includes: a generating module and a sending module, the generating module is used to generate a first alarm message based on the changed brake switch state; the sending module is used to send the first alarm message to a management device to prompt that the brake switch state has changed.
[0200] In one embodiment, the device further comprises: a calling module, configured to call an operation and maintenance management service, so that the operation and maintenance management service updates the brake switch state in the brake switch library table in the database based on the changed brake switch state.
[0201] In one embodiment, the device also includes: an acquisition module and an update module, the sending module is also used to send a notification message to the first filter of the business service corresponding to the modification operation, so that the first filter updates the brake switch status in the memory data; the acquisition module is used to periodically obtain the brake switch status of the business service from the database based on a preset timing task; the update module is used to update the brake switch status in the memory data through the second filter when it is determined that the brake switch status has changed; the second filter is the filter of the business service corresponding to the changed brake switch status.
[0202] In one embodiment, the device further includes: a setting module for setting the brake switch state in the memory data to the closed state through a filter of the business service when an exception occurs during the process of reading the brake switch state of the business service from the database.
[0203] In one embodiment, the business system is a grayscale version of the business system; the device also includes: a publishing module, which is used to fully publish the grayscale version of the business system when the verification of the abnormal business scenario is completed based on the error response.
[0204] In one embodiment, the brake switch state of the first business service and the brake switch state of the second business service in the business system are different; the generation module is also used to generate an automated test case based on the brake switch state of the first business service and the brake switch state of the second business service, and execute the automated test case to obtain a business response result; the publishing module is also used to fully publish the grayscale version of the business system when the verification of the abnormal business scenario is completed based on the business response result; wherein, the business response result is determined based on the error response returned by the target business service involved in the call.
[0205] In one embodiment, the device also includes: a comparison module, used to compare the parameter value carried in the error response with the preset parameter value to obtain a comparison result; the publishing module is also used to fully publish the grayscale version of the business system when the comparison result indicates that the parameter value is consistent with the preset parameter value.
[0206] In one embodiment, the interactive link information includes the service name of the target business service; the device also includes: a query module and an output module, the query module is used to query the brake switch state corresponding to the service name in the memory data through the filter of the target business service when the target business service is called; the output module is used to output a second alarm message when the brake switch state of the target business service is in an on state and the time in the on state exceeds a preset time threshold.
[0207] Each module in the above-mentioned business system processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0208] In one embodiment, a computer device is provided. The computer device may be a terminal or a server. In this embodiment, the computer device is described as a server. The internal structure diagram thereof may be as follows: Fig.12 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store business system processing data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a business system processing method is implemented.
[0209] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0210] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0211] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0212] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0213] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0214] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0215] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0216] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A business system processing method, characterized in that: The method comprises: In the case where the business system has been published, receiving a business service request including interactive link information; When the target business services involved are called in sequence based on the interactive link information, the brake switch state of the target business service is read through the filter of the target business service; When the brake switch state is in the start state, the business service request is intercepted by the filter, and an error response is returned based on the intercepted business service request; When the brake switch state is in the off state, the business service request is responded to and processed according to the business logic of the target business service, and a response result corresponding to the business service request is returned.
2. The method according to claim 1, characterized in that Before receiving the business service request including the interactive link information, the method further includes: In response to a triggering operation on a first control in a management interface of a brake switch, displaying a business service for which a brake function has been created; In response to a first service selection operation, a business service corresponding to the first service selection operation is deleted from the management interface.
3. The method according to claim 2, characterized in that Before receiving the business service request including the interactive link information, the method further includes: In response to a triggering operation on a second control in the management interface, displaying a business service for which a braking function has not been created; In response to the second service selection operation, a business service corresponding to the second service selection operation is added to the management interface.
4. The method according to claim 1, characterized in that: Before receiving the business service request including the interactive link information, the method further includes: In response to a modification operation in the management interface of the brake switch, changing the state of the brake switch of the business service corresponding to the modification operation; storing the changed brake switch state in a database; The changed brake switch status is displayed in the management interface.
5. The method according to claim 4, characterized in that The method further comprises: generating first warning information based on the changed brake switch state; The first alarm information is sent to a management device to prompt that the brake switch state has changed.
6. The method according to claim 4, characterized in that The step of storing the changed brake switch state in a database comprises: The operation and maintenance management service is called so that the operation and maintenance management service updates the brake switch state in the brake switch library table in the database based on the changed brake switch state.
7. The method according to claim 4, characterized in that After the state of the brake switch of the business service corresponding to the modification operation is changed in response to the modification operation in the management interface of the brake switch, the method further includes: Sending a notification message to the first filter of the business service corresponding to the modification operation, so that the first filter updates the brake switch state in the memory data; or, Based on the preset timing task, the brake switch status of the business service is periodically obtained from the database; when it is determined that the brake switch status has changed, the brake switch status in the memory data is updated through the second filter; the second filter is the filter of the business service corresponding to the changed brake switch status.
8. The method according to claim 7, characterized in that The method further comprises: When an exception occurs in the process of reading the brake switch state of the business service from the database, the brake switch state in the memory data is set to the closed state through the filter of the business service.
9. The method according to claim 1, characterized in that: The business system is a gray version business system; the method further includes: When the verification of the abnormal business scenario is completed based on the error response, the grayscale version of the business system is fully released.
10. The method according to claim 9, characterized in that The brake switch state of the first business service in the business system is different from the brake switch state of the second business service; the method further includes: Generate an automated test case based on the brake switch state of the first business service and the brake switch state of the second business service, and execute the automated test case to obtain a business response result; When the verification of the abnormal business scenario is completed based on the error response, the grayscale version of the business system is fully released, including: When the verification of the abnormal business scenario is completed based on the business response result, the grayscale version of the business system is fully released; wherein the business response result is determined based on the error response returned by the target business service involved in the call.
11. The method according to claim 9, characterized in that The method further comprises: Compare the parameter value carried in the error response with the preset parameter value to obtain a comparison result; When the verification of the abnormal business scenario is completed based on the error response, the grayscale version of the business system is fully released, including: When the comparison result indicates that the parameter value is consistent with the preset parameter value, the grayscale version of the business system is fully released.
12. The method according to any one of claims 1 to 11, characterized in that: The interactive link information includes the service name of the target business service; The step of reading the brake switch state of the business service through the filter of the business service includes: When the target business service is called, query the brake switch state corresponding to the service name in the memory data through the filter of the target business service; The method further includes: when the brake switch state of the target business service is in an on state and the time in the on state exceeds a preset time threshold, outputting second alarm information.
13. A business system processing device, characterized in that: The device comprises: A receiving module, used for receiving a business service request including interactive link information when the business system has been published; A reading module, used for reading the brake switch state of the target business service through the filter of the target business service when calling the target business service involved in sequence based on the interactive link information; An interception module, used for intercepting the business service request through the filter when the brake switch state is in the start state, and returning an error response based on the intercepted business service request; The processing module is used to respond to the business service request according to the business logic of the target business service when the brake switch state is in the off state, and return a response result corresponding to the business service request.
14. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 12 are implemented.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Method and apparatus for modifying configuration information of service
CN106453501A
Multiprocess load balancing method and device
CN107508757A
Service intercepting device, method, apparatus and storage medium
CN109286610A
Function switch state switching method and device, medium and computer equipment
CN109614161A
Adaptable circuit breaker chain for micro services
CN110049090A
