Business processing method and apparatus, program product, and electronic device

By receiving requests and dynamically adjusting business processes when the main switch is on, and by utilizing a distributed configuration center and caching mechanism, the problem of server restarts when updating business processes is solved, thus achieving efficient and flexible business processing.

CN119835328BActive Publication Date: 2026-03-24INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

When updating business processes, existing technologies require restarting the server, causing business services to be unavailable for a period of time, making it impossible to process business efficiently.

Method used

By receiving business processing requests under the master switch of the target business, determining the set of business processes, and transmitting the switch identifier to the server, the business processes are dynamically adjusted. The switch value is updated in real time using a distributed configuration center and a preset caching mechanism to avoid restarting the server.

Benefits of technology

It improves the flexibility and efficiency of business processing, responds to changes in business needs in real time, avoids business service unavailability, and achieves efficient business processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119835328B_ABST
    Figure CN119835328B_ABST
Patent Text Reader

Abstract

The application discloses a business processing method and device, a program product and electronic equipment, and relates to the field of financial technology or other related fields, and the business processing method comprises the following steps: receiving a business processing request about a target business in the case that a total switch of the target business is turned on; determining a business process set based on the business processing request; transmitting switch identifiers corresponding to all business processes to a server; receiving a to-be-modified switch identifier returned by the server and needing to modify a switch value; modifying an initial switch value indicated by the to-be-modified switch identifier to obtain a target switch value; and processing the target business based on all target switch values and all unmodified initial switch values. The application solves the technical problem in the prior art that the server needs to be restarted when the business process is updated, and the business service is unavailable for a period of time.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of financial technology, in particular to a business processing method and device, program product and electronic equipment. BACKGROUND

[0002] With the rapid development of technology and the continuous change of business needs, it is necessary to continuously update the business processes corresponding to the business to improve the business processing performance and optimize the user experience. In order to ensure that the updated business process can be smoothly integrated with the existing system and process, a transition between the new and old processes needs to be made.

[0003] However, when switching between the new and old processes, the server needs to be restarted, resulting in a period of unavailability of business services.

[0004] At present, there is no effective solution to the above problems. SUMMARY

[0005] The embodiments of the present application provide a business processing method and device, program product and electronic equipment to at least solve the technical problem that the server needs to be restarted when updating the business process in the related art, resulting in a period of unavailability of business services.

[0006] According to an aspect of an embodiment of the present application, a business processing method is provided, comprising: receiving a business processing request about a target business in the case that a total switch of the target business is turned on; determining a business process set based on the business processing request, wherein each business process in the business process set corresponds to a switch identifier, and each switch identifier indicates a switch corresponding to an initial switch value; transmitting the switch identifiers corresponding to all business processes to a server, and receiving the to-be-modified switch identifiers returned by the server which need to modify the switch values; modifying the initial switch values indicated by the to-be-modified switch identifiers to obtain target switch values, and processing the target business based on all target switch values and all unmodified initial switch values.

[0007] In an embodiment of the present application, before receiving the business processing request about the target business in the case that the total switch of the target business is turned on, it further comprises: determining all business processes corresponding to each business; configuring a total switch for each business and a switch for each business process, wherein the total switch is used to control the execution of the business, and the switch is used to control the execution of the business process; recording the switch identifiers corresponding to each switch to a preset namespace in a distributed configuration center, wherein the distributed configuration center is used to receive the modification demand of the business and modify the switch values corresponding to the switch identifiers in the preset namespace based on the modification demand.

[0008] In an embodiment of the present application, after configuring the total switch for each service and configuring the switch for each service process, the method further comprises: in the case that the service needs to add a service scenario, constructing an added service process corresponding to the service scenario; configuring an added switch for the added service process, and recording the added switch identifier corresponding to the added switch to a preset namespace in the distributed configuration center.

[0009] In an embodiment of the present application, the server is configured to listen to the preset namespace in the distributed configuration center, and in the case that the switch value in the preset namespace is modified, record the switch identifier corresponding to the modified switch value as a to-be-modified switch identifier, and add all the to-be-modified switch identifiers to the preset cache.

[0010] In an embodiment of the present application, after transmitting the switch identifiers corresponding to all the service processes to the server, the method further comprises: the server matching the switch identifiers with the to-be-modified switch identifiers in the preset cache; in the case that the to-be-modified switch identifiers are successfully matched, returning the to-be-modified switch identifiers to the client.

[0011] In an embodiment of the present application, the initial switch value is a first preset value, and the target switch value is a second preset value, and the step of processing the target service based on all the target switch values and all the unmodified initial switch values comprises: based on the set of service processes, retaining the service processes corresponding to the first preset value, and deleting the service processes corresponding to the second preset value, to obtain a set of target service processes; executing all the target service processes in the set of target service processes to complete the processing of the target service.

[0012] In an embodiment of the present application, the service processing method further comprises: in the case that the front-end page of the client is refreshed or re-logged in, the client transmits the switch identifiers corresponding to all the service processes involved in the service executed by the front-end page to the server; based on the to-be-modified switch identifiers returned by the server, adjusting all the service processes involved in the service.

[0013] According to another aspect of the embodiment of the present application, a service processing device is also provided, comprising: a receiving unit configured to receive a service processing request about a target service in the case that the total switch of the target service is opened; a determining unit configured to determine a set of service processes based on the service processing request, wherein each service process in the set of service processes corresponds to a switch identifier, and each switch identifier indicates an initial switch value; a transmitting unit configured to transmit the switch identifiers corresponding to all the service processes to a server, and receive to-be-modified switch identifiers returned by the server which need to be modified; and a processing unit configured to modify the initial switch value indicated by the to-be-modified switch identifiers to obtain a target switch value, and process the target service based on all the target switch values and all the unmodified initial switch values.

[0014] In an embodiment of the present application, the service processing device further comprises: a first determination module, configured to determine all service flows corresponding to each service before receiving a service processing request about the target service when the total switch of the target service is turned on; a first configuration module, configured to configure a total switch for each service and a switch for each service flow, wherein the total switch is used to control the execution of the service, and the switch is used to control the execution of the service flow; and a first recording module, configured to record the switch identifier corresponding to each switch to a preset namespace in a distributed configuration center, wherein the distributed configuration center is used to receive a modification requirement of the service and modify the switch value corresponding to the switch identifier in the preset namespace based on the modification requirement.

[0015] In an embodiment of the present application, the service processing device further comprises: a first construction module, configured to construct an added service flow corresponding to a service scene after configuring a total switch for each service and a switch for each service flow, in the case that the service needs to add the service scene; and a first adding module, configured to configure an added switch for the added service flow and record an added switch identifier corresponding to the added switch to a preset namespace in a distributed configuration center.

[0016] In an embodiment of the present application, the server is configured to listen to the preset namespace in the distributed configuration center, and record the switch identifier corresponding to the modified switch value as a to-be-modified switch identifier and add all to-be-modified switch identifiers to the preset cache in the case that the switch value in the preset namespace is modified.

[0017] In an embodiment of the present application, the service processing device further comprises: a first matching module, configured to match the switch identifier with the to-be-modified switch identifier in the preset cache after transmitting all switch identifiers corresponding to the service flows to the server; and a first returning module, configured to return the to-be-modified switch identifier to the client in the case that the to-be-modified switch identifier is successfully matched.

[0018] In an embodiment of the present application, the initial switch value is a first preset value, the target switch value is a second preset value, and the processing unit comprises: a first reservation module, configured to reserve the service flow corresponding to the first preset value and delete the service flow corresponding to the second preset value based on the service flow set, to obtain a target service flow set; and a first execution module, configured to execute all target service flows in the target service flow set to complete the processing of the target service.

[0019] In an embodiment of the present application, the service processing apparatus further comprises: a first transmission module, configured to transmit, in a case where a front-end page of the client is refreshed or re-logged in, all switch identifiers corresponding to the business processes involved in the business executed by the front-end page to the server; and a first adjustment module, configured to adjust all the business processes involved in the business based on the to-be-modified switch identifiers returned by the server.

[0020] According to another aspect of the embodiments of the present application, a computer program product is also provided, comprising a non-volatile computer readable storage medium storing a computer program, which, when executed by a processor, implements any of the above business processing methods.

[0021] According to another aspect of the embodiments of the present application, an electronic device is also provided, comprising one or more processors and a memory, the memory being configured to store one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement any of the above business processing methods.

[0022] In the present application, by receiving a business processing request about a target business in a case where a total switch of the target business is opened, determining a set of business processes based on the business processing request, transmitting switch identifiers corresponding to all the business processes to a server, and receiving to-be-modified switch identifiers returned by the server which need to be modified, modifying initial switch values indicated by the to-be-modified switch identifiers to obtain target switch values, and processing the target business based on all the target switch values and all the unmodified initial switch values, the technical problem that a server needs to be restarted when updating business processes in the related art, resulting in that a business service is unavailable for a period of time, is solved.

[0023] In the present application, by receiving a business processing request in a case where a total switch of a target business is opened, determining a set of business processes based on the request, and then transmitting switch identifiers in the set to a server and receiving to-be-modified switch identifiers returned by the server, the business processes are dynamically adjusted. In this way, not only the flexibility and efficiency of business processing are improved, but also the change of business demand can be responded to in real time, avoiding the problem that business processing needs to be suspended due to modification of business processes, and achieving the technical effect of efficiently processing business. BRIEF DESCRIPTION OF DRAWINGS

[0024] The accompanying drawings, which are included to provide a further understanding of the present application and constitute a part of this application, illustrate embodiments of the present application and together with the description serve to explain the present application. In the drawings:

[0025] Figure 1A hardware structure block diagram of a computer terminal (or mobile device) for implementing the business processing method is shown;

[0026] Figure 2 is a flow chart of the business processing method according to Embodiment 1 of the present application;

[0027] Figure 3 is a schematic diagram of an optional business processing device according to an embodiment of the present application;

[0028] Figure 4 is a structure block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to make the personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.

[0030] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] It should be noted that the business processing method and its device in the present application can be used in the case of business processing of financial technology, and can also be used in the case of business processing of any field other than financial technology. The application field of the business processing method and its device in the present application is not limited.

[0032] It should be noted that the information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) collected and related to the present application are all information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards in relevant regions, necessary security measures are taken, do not violate public order and good customs, and provide corresponding operation portal for user selection authorization or refusal. For example, the system and related users or institutions are provided with an interface, and before obtaining the relevant information, the interface needs to send a request to the aforementioned user or institution, and after receiving the consent information feedback from the aforementioned user or institution, the relevant information is obtained.

[0033] In the present application, by setting the total switch of the service, and setting the switch under each scene (i.e. service process) in the front end, and then setting the switch value by dynamic variable in the back end, the service can be normally processed when the service process is modified. In actual application, the above method can improve the response speed of service processing and user satisfaction, especially in the scene where the service logic or process needs to be frequently adjusted, the advantage is more obvious.

[0034] The present application will be described in detail below in conjunction with various embodiments.

[0035] Embodiment 1

[0036] According to the embodiments of the present application, an embodiment of a service processing method is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a group of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0037] The method embodiment provided by the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a service processing method is shown. As shown in Figure 1 The computer terminal 10 (or mobile device) can include one or more Figure 1The computer terminal 10 can include a processor 102 (which can include, but is not limited to, a microprocessor (MCU) or a programmable logic device (FPGA) or the like), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, the computer terminal 10 can include a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports of the BUS), a network interface (which can be connected to a wired and / or wireless network), a power supply, and / or a camera. Those skilled in the art will understand that Figure 1 The structure shown is merely illustrative and does not limit the structure of the electronic device described above. For example, the computer terminal 10 can include more or fewer components than those shown in the figure, or have a different configuration than that shown in the figure. Figure 1 For example, the computer terminal 10 can include more or fewer components than those shown in the figure, or have a different configuration than that shown in the figure. Figure 1 For example, the computer terminal 10 can include more or fewer components than those shown in the figure, or have a different configuration than that shown in the figure.

[0038] It should be noted that the one or more processors 102 and / or other data processing circuits described above can be referred to herein generally as "data processing circuits". The data processing circuits can be embodied in whole or in part as software, hardware, firmware, or any combination thereof. In addition, the data processing circuits can be a single independent processing module, or any one of the other elements incorporated into the computer terminal 10 (or mobile device) in whole or in part. As referred to in the embodiments of the present application, the data processing circuits serve as a processor to control, for example, the selection of the variable resistance terminal path connected to the interface.

[0039] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage means corresponding to the service processing method in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, i.e. implements the service processing method described above. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 can further include a memory remotely located with respect to the processor 102, which can be connected to the computer terminal 10 through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0040] The transmission device 106 is configured to receive or send data via a network. The network can include a wireless network provided by a communication provider of the computer terminal 10. In an example, the transmission device 106 includes a network interface controller (NIC) that can connect to other network devices through a base station to communicate with the Internet. In an example, the transmission device 106 can be a radio frequency (RF) module that is configured to communicate with the Internet wirelessly.

[0041] The display can be a liquid crystal display (LCD) that is touch screen type, for example, which can enable a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0042] In the above operating environment, the present application provides a service processing method as shown in Figure 2 Figure 2 is a flowchart of the service processing method according to an embodiment of the present application, as shown in Figure 2 The method includes the following steps:

[0043] In step S201, a service processing request related to a target service is received when a total switch of the target service is turned on.

[0044] In the embodiment of the present application, a total switch of a service can be set on a service system to control whether to provide a service for the service through the total switch. For example, a total switch of a consumption coupon service is set, and if the total switch is turned on, it means that the current service system can provide a service for processing the consumption coupon service.

[0045] In the embodiment of the present application, the service system can check the state of the total switch to confirm whether it is turned on. For example, configuration information stored in a distributed configuration center is queried because the total switch value is dynamically adjustable and can be different in different server environments. If the total switch is in the turned-on state, a front-end page will display a function entry related to the target service, and a user can normally access and use the function. At the same time, a back-end service is ready to receive and process any request related to the target service. In the embodiment, after the back-end receives a service processing request sent by the front-end, it will further check the switch value of a service flow (i.e., a sub-flow) or a function related to the request. If the related switch is also turned on, the back-end will execute the corresponding service logic and return a processing result to the front-end.

[0046] ​In the embodiments of the present application, the "total switch" is a global control mechanism for turning on or off all front-end displays and back-end service logic related to a target service at one time. When the "total switch" is in the on state, it means that the service system allows to receive and process all requests related to the service.

[0047] In step S202, a set of service processes is determined based on the service processing request, wherein each service process in the set of service processes corresponds to a switch identifier, and each switch identifier indicates a switch corresponding to an initial switch value.

[0048] In the embodiments of the present application, when a user (or other system) initiates a service processing request to the service system, the service system can parse and determine the set of service processes related to the request. For example, when a user initiates a consumption coupon service processing request, the service system can query all service processes related to the consumption coupon service processing request (such as a consumption channel determination process, a consumption coupon cancellation process, etc.), and each service process corresponds to a switch (with a unique switch identifier) for individually controlling whether the service process is enabled. For example, an initial switch value corresponding to the switch can be set, and the initial switch value can be set as a first preset value (such as 1) by default, indicating that the switch is in the on state, and the service uses the service process corresponding to the switch.

[0049] In step S203, all switch identifiers corresponding to the service processes are transmitted to the server, and the server returns the to-be-modified switch identifiers that need to modify the switch values.

[0050] In the embodiments of the present application, when a user logs in or refreshes a page, the front end collects the switch identifiers of all processes related to the current service (i.e., service processes). These switch identifiers are usually included in the front-end JS (Java Script) file or request parameters for communication with the back end, indicating the list of service processes currently supported by the front end. Then, the front end sends all switch identifiers corresponding to the collected service processes to the server through a network request, and receives the to-be-modified switch identifiers returned by the server, so as to subsequently process the service according to the new switch values. For example, if the switch value of a certain service process is closed by the back end, the service process will not be executed, so that when some service processes are updated or offline, the processing of the service will not be affected.

[0051] In step S204, the initial switch value indicated by the to-be-modified switch identifier is modified to obtain a target switch value, and the target service is processed based on all target switch values and all unmodified initial switch values.

[0052] In the embodiments of the present application, the initial switch value of the received switch identifier indication to be modified can be modified to obtain a target switch value, that is, the first preset value (such as 1) is changed to the second preset value (such as 0) to indicate that the switch is changed from on to off. Then, the target service is processed according to the target switch value and all unmodified initial switch values (that is, according to the switch state of the switch of all service processes). For example, if the switch of a certain service process is off, the service process is not executed, and other service processes with the switch on are directly executed, so that real-time processing of services can be realized without suspending services during the process of taking some service processes offline or updating.

[0053] In summary, by receiving a service processing request under the condition that the total switch of the target service is on, determining a service process set based on the request, and then transmitting the switch identifier in the set to the server, the switch identifier returned by the server is received, so that the service process is dynamically adjusted. In this way, not only the flexibility and efficiency of service processing are improved, but also the changes in service demand can be responded to in real time, avoiding the problem that the service processing needs to be suspended due to the modification of service processes, achieving the technical effect of efficiently processing services, and further solving the technical problem in the related art that the server needs to be restarted when updating service processes, resulting in a period of unavailable service.

[0054] In order to accurately control each service process in the service, in the service processing method provided in Embodiment 1 of the present application, before receiving a service processing request about a target service under the condition that the total switch of the target service is on, all service processes corresponding to each service are determined; a total switch is configured for each service, and a switch is configured for each service process, wherein the total switch is used to control the execution of the service, and the switch is used to control the execution of the service process; the switch identifier corresponding to each switch is recorded in a preset namespace in a distributed configuration center, wherein the distributed configuration center is used to receive a modification demand of the service, and modify the switch value corresponding to the switch identifier in the preset namespace based on the modification demand.

[0055] In the embodiments of the present application, all service processes contained in each service (for example, a consumption coupon management service) can be determined first. These service processes can involve aspects such as front-end display, back-end service calling, data processing, and permission verification, for example, a consumption coupon cancellation service process, a service process for interfacing with a third-party channel, and the like. In addition, a total switch is configured for each service to control the online or offline state of the service. At the same time, a switch is configured for each specific service process in the service to control the execution state of the single service process. The values of these switches reflect whether the service process should be activated or disabled. Then, each switch identifier is recorded in a preset namespace of a distributed configuration center to facilitate subsequent real-time acquisition of the real-time switch value corresponding to each switch identifier.

[0056] In the embodiment of the application, the distributed configuration center is a system for storing and managing configuration information in a centralized manner, which can ensure that the configuration information on all server nodes is consistent and also supports real-time dynamic updating of the configuration information. If a business needs to be modified (for example, a business scenario needs to be added (such as adding a third-party consumption coupon channel in a consumption coupon management transaction) or a program corresponding to a business scenario needs to be upgraded), the distributed configuration center can modify the switch value of the switch identifier corresponding to the business process to be modified in the preset namespace from the first preset value to the second preset value to close the business process, and open the business process after the program corresponding to the business process is updated.

[0057] In order to add a business process on a business, in the business processing method provided in Embodiment 1 of the application, after configuring a total switch for each business and configuring a switch for each business process, in the case where a business scenario needs to be added, a newly added business process corresponding to the business scenario is constructed; a newly added switch is configured for the newly added business process, and a newly added switch identifier corresponding to the newly added switch is recorded in a preset namespace in the distributed configuration center.

[0058] In the embodiment of the application, when a business requirement changes and a new business scenario needs to be introduced, a corresponding business process can be designed and implemented according to the new requirement. For example, a consumption coupon management transaction can need to add a business scenario of “issuing a consumption coupon through a third-party channel”, and then a front-end display logic and a back-end service calling process corresponding thereto can be constructed. In order to control the online and offline of the newly added business process, a newly added switch can be configured for each newly added business process, and an identifier of the newly added switch can be recorded in a preset namespace in the distributed configuration center.

[0059] In the embodiment, by configuring a newly added switch for a newly added business process in the distributed configuration center and recording an identifier of the newly added switch, the state of the newly added business process can be dynamically controlled to adapt to changes in business requirements, simplify the deployment process, and improve maintainability, security and user experience.

[0060] In order to listen to whether a switch value of a business process is modified in real time, in the business processing method provided in Embodiment 1 of the application, the server is configured to listen to a preset namespace in the distributed configuration center, and in the case where it is listened that a switch value in the preset namespace is modified, a switch identifier corresponding to the modified switch value is recorded as a to-be-modified switch identifier, and all to-be-modified switch identifiers are added to a preset cache.

[0061] In the embodiment of the application, the server monitors the changes of all switch values stored in the preset namespace in the distributed configuration center through the listening mechanism of the distributed service framework. The preset namespace is a space reserved in the configuration center for system switch configuration, and is used to store the switch values of all business processes. When the server listens to the change of a switch value in the configuration center, the switch identifier corresponding to the changed switch value can be recorded and marked as a "to-be-modified switch identifier". This indicates that the front end may not know about the update of the switch value and needs to be synchronized. Moreover, all the switch identifiers marked as to-be-modified can be added to the preset cache, so that when the front end receives a business involving the business processes indicated by these switch identifiers, the front end can be timely notified to close these business processes to avoid the failure of business execution.

[0062] Here, the preset cache is a memory caching mechanism used to store data to be updated, so as to reduce the number of database accesses and improve the data processing speed. When the front end initiates a request, the back end reads the to-be-modified switch identifiers from the preset cache, avoiding direct database query and improving the response efficiency of the system.

[0063] In the embodiment, the server listens to the preset namespace in the distributed configuration center, and records the switch identifiers corresponding to the modified switch values as to-be-modified switch identifiers and adds them to the preset cache. This mechanism can realize real-time dynamic update, reduce database load, improve front-end and back-end synchronization efficiency, enhance system flexibility and stability, simplify operation and maintenance work, and ultimately improve user experience.

[0064] In order to accurately determine the to-be-modified switch identifier, in the business processing method provided in Embodiment 1 of the application, after transmitting the switch identifiers corresponding to all business processes to the server, the server matches the switch identifiers with the to-be-modified switch identifiers in the preset cache; in the case of successfully matching the to-be-modified switch identifiers, the to-be-modified switch identifiers are returned to the client.

[0065] In the embodiment of the application, when the server receives the request (containing the switch identifiers corresponding to all business processes) sent by the front end, it compares each switch identifier with the to-be-modified switch identifiers recorded in the preset cache. The preset cache contains all the switch identifiers to be updated, which are identified by the server through listening to the updates of the distributed configuration center. If the to-be-modified switch identifiers consistent with the switch identifiers contained in the front-end request are successfully matched in the preset cache, the server returns these to-be-modified switch identifiers to the front end. This means that the switch values of some business processes requested by the front end have changed in the back end, and the front end needs to adjust its logic according to the received to-be-modified switch identifiers, such as closing some functions or updating the user interface.

[0066] Optionally, the initial switch value is a first preset value, and the target switch value is a second preset value. To improve the accuracy of processing the target service, in the service processing method provided in Embodiment 1 of the present application, based on the service flow set, the service flow corresponding to the first preset value is retained, and the service flow corresponding to the second preset value is deleted, to obtain a target service flow set; all target service flows in the target service flow set are executed to complete the processing of the target service.

[0067] In the embodiment of the present application, the initial switch value is a default switch value, which is a first preset value (such as 1), that is, the switch of all service flows is opened by default, and the target switch value is a second preset value (such as 0), that is, when the service flow cannot be used, the corresponding switch value needs to be modified so that the service flow is temporarily offline.

[0068] In the embodiment of the present application, all service flows configured with switch values are screened to obtain a target service flow set that can finally be executed. In this embodiment, the first preset value indicates that the switch of the service flow is "on" (i.e., allowed to execute), and the second preset value indicates that the switch of the service flow is "off" (i.e., prohibited to execute). The switch state of each service flow can be checked, and all service flows with the first preset value (on) are retained, while service flows with the second preset value (off) are deleted, thereby obtaining a target service flow set.

[0069] In the embodiment of the present application, after obtaining the target service flow set, only the service flows contained in the set are executed, that is, all service flows with the switch "on". This means that the system will only run those service logics that are currently allowed to execute, while skipping those disabled flows. In this way, even when some service flows are offline or upgraded, services can still be provided.

[0070] To realize real-time adjustment of service flows in a service, in the service processing method provided in Embodiment 1 of the present application, in the case that the front-end page of the client is refreshed or re-logged in, the client transmits switch identifiers corresponding to all service flows involved in the service executed by the front-end page to the server; based on the to-be-modified switch identifiers returned by the server, all service flows involved in the service are adjusted.

[0071] In the embodiment of the present application, because the problems such as code, service demand, and the like cannot be avoided temporarily, the corresponding service flow can be logically offline by closing the switch, and when some service flows are offline, the front-end page service will be temporarily interrupted and need to be refreshed to continue execution. Therefore, if the front-end page is refreshed or re-logged in, the client needs to send the switch identifiers of the service flows involved in the currently executed service to the server, and the server returns the to-be-modified switch identifiers that need to be changed.

[0072] In the embodiment of the present application, whenever the user refreshes the front-end page or relogs in, the client sends the switch identifiers of all the business processes involved in the current page to the server. These identifiers are unique identifiers of the business processes executed by the front end, which are used to inform the server which business processes are being used by the front end. After receiving these switch identifiers, the server compares them with the to-be-modified switch identifiers in the preset cache. If it finds any matching to-be-modified switch identifiers, it means that the switch states of these business processes have been updated in the back end, and the server will feed back these to-be-modified switch identifiers and their new switch values to the client. After receiving the to-be-modified switch identifiers, the client will adjust the execution of the business processes according to the new switch states. If the switch value is set to off, the client will accordingly close or hide the relevant business processes, and if the switch is set to on, the client will ensure that these business processes are available.

[0073] In the embodiment, by transmitting the switch identifiers to the server when the front-end page is refreshed or relogged in, and adjusting the front-end business processes according to the to-be-modified switch identifiers returned by the server, this mechanism can realize real-time state synchronization, improve system response speed, does not need to restart the service, flexibly responds to business changes, improves user experience, reduces maintenance cost, enhances system security and stability.

[0074] The business processing method provided by the embodiment of the present application can receive a business processing request under the condition that the total switch of the target business is turned on, determine a business process set based on the request, then transmit the switch identifiers in the set to the server, receive the to-be-modified switch identifiers returned by the server, and dynamically adjust the business processes. In this way, not only the flexibility and efficiency of business processing are improved, but also the changes in business demand can be responded to in real time, avoiding the problem that the business service becomes unavailable and the business processing needs to be suspended due to the modification of business processes, achieving the technical effect of efficiently processing business, and further solving the technical problem in the related art that the server needs to be restarted when the business processes are updated, resulting in a period of time during which the business service is unavailable.

[0075] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a group of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0076] Embodiment 2

[0077] The embodiment of the present application also provides a business processing device. It should be noted that the business processing device of the embodiment of the present application can be used to execute the business processing method provided by the embodiment of the present application. The business processing device provided by the embodiment of the present application is introduced as follows.

[0078] According to the embodiment of the present application, a device for implementing the above business processing method is also provided. Figure 3 is a schematic diagram of an optional business processing device according to the embodiment of the present application, as shown in the figure, the business processing device can include a receiving unit 30, a determining unit 31, a transmitting unit 32, and a processing unit 33. Figure 3

[0079] The receiving unit 30 is configured to receive a business processing request about a target business when a total switch of the target business is turned on.

[0080] The determining unit 31 is configured to determine a set of business processes based on the business processing request, wherein each business process in the set of business processes corresponds to a switch identifier, and each switch identifier indicates a switch corresponding to an initial switch value.

[0081] The transmitting unit 32 is configured to transmit the switch identifiers corresponding to all the business processes to a server, and receive a to-be-modified switch identifier returned by the server, which needs to be modified.

[0082] The processing unit 33 is configured to modify the initial switch value indicated by the to-be-modified switch identifier to obtain a target switch value, and process the target business based on all the target switch values and all the unmodified initial switch values.

[0083] The business processing device provided by the embodiment of the present application receives a business processing request when a total switch of a target business is turned on, determines a set of business processes based on the request, then transmits the switch identifiers in the set to a server, and receives a to-be-modified switch identifier returned by the server, thereby dynamically adjusting the business processes. In this way, the flexibility and efficiency of business processing are improved, the changes in business demand can be responded to in real time, the problem that the business service becomes unavailable and the business processing needs to be suspended due to the modification of business processes is avoided, the technical problem that the server needs to be restarted when the business processes are updated in the related art, resulting in that the business service is unavailable for a period of time, is solved, and the technical effect of efficiently processing the business is achieved.

[0084] Optionally, the business processing device further includes a first determining module configured to determine all the business processes corresponding to each business before receiving the business processing request about the target business when the total switch of the target business is turned on, a first configuration module configured to configure a total switch for each business and configure a switch for each business process, wherein the total switch is used to control the execution of the business, and the switch is used to control the execution of the business process, and a first recording module configured to record the switch identifier corresponding to each switch to a preset namespace in a distributed configuration center, wherein the distributed configuration center is used to receive a modification demand of the business, and modify the switch value corresponding to the switch identifier in the preset namespace based on the modification demand. ​

[0085] Optionally, the business processing apparatus further comprises: a first construction module, configured to, after configuring a total switch for each business and configuring a switch for each business process, construct a newly-added business process corresponding to a business scenario in a case where the business needs to add the business scenario; and a first adding module, configured to configure a newly-added switch for the newly-added business process and record a newly-added switch identifier corresponding to the newly-added switch in a preset namespace in the distributed configuration center.

[0086] Optionally, the server is configured to listen to the preset namespace in the distributed configuration center, and in a case where it is listened that a switch value in the preset namespace is modified, record a switch identifier corresponding to the modified switch value as a to-be-modified switch identifier and add all the to-be-modified switch identifiers to a preset cache.

[0087] Optionally, the business processing apparatus further comprises: a first matching module, configured to, after transmitting the switch identifiers corresponding to all the business processes to the server, match, by the server, the switch identifiers with the to-be-modified switch identifiers in the preset cache; and a first returning module, configured to, in a case where the to-be-modified switch identifiers are successfully matched, return the to-be-modified switch identifiers to the client.

[0088] Optionally, the initial switch value is a first preset value, the target switch value is a second preset value, and the processing unit comprises: a first retaining module, configured to retain, based on the set of business processes, a business process corresponding to the first preset value and delete a business process corresponding to the second preset value, to obtain a target set of business processes; and a first executing module, configured to execute all the target business processes in the target set of business processes to complete processing of the target business.

[0089] Optionally, the business processing apparatus further comprises: a first transmitting module, configured to, in a case where a front-end page of the client is refreshed or re-logged in, transmit, by the client, switch identifiers corresponding to all the business processes involved in a business executed by the front-end page to the server; and a first adjusting module, configured to adjust, based on the to-be-modified switch identifiers returned by the server, all the business processes involved in the business.

[0090] The business processing apparatus described above can further comprise a processor and a memory, and the receiving unit 30, the determining unit 31, the transmitting unit 32, the processing unit 33, etc. are all stored in the memory as program units, and the corresponding functions are realized by the processor executing the program units stored in the memory.

[0091] The processor described above comprises a core, and the core retrieves corresponding program units from the memory. The core can be set to one or more, and the initial switch value indicated by the to-be-modified switch identifier is modified by adjusting the core parameters to obtain a target switch value, and the target business is processed based on all the target switch values and all the unmodified initial switch values.

[0092] The aforementioned memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0093] It should be noted that the receiving unit 30, determining unit 31, transmitting unit 32, and processing unit 33 correspond to steps S201 to S204 in Embodiment 1. The instances and application scenarios implemented by the above units and corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above units can also be part of a device and run in the computer terminal 10 provided in Embodiment 1.

[0094] Example 3

[0095] Embodiments of this application may provide an electronic device. Figure 4 This is a structural block diagram of an electronic device according to an embodiment of the present invention. Figure 4 As shown, the electronic device may include: one or more ( Figure 4 Only one of the following is shown: processor 402, memory 404, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0096] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the business processing method and apparatus in this application embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned business processing method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0097] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: receiving a service processing request about the target service in the case that the total switch of the target service is turned on; determining a service flow set based on the service processing request, wherein each service flow in the service flow set corresponds to a switch identifier, and each switch identifier indicates a switch corresponding to an initial switch value; transmitting all switch identifiers corresponding to the service flows to the server and receiving the to-be-modified switch identifiers returned by the server which need to modify the switch values; modifying the initial switch values indicated by the to-be-modified switch identifiers to obtain target switch values, and processing the target service based on all target switch values and all unmodified initial switch values.

[0098] The processor can also call information and application programs stored in the memory through the transmission device to perform the following steps: determining all service flows corresponding to each service; configuring a total switch for each service and configuring a switch for each service flow, wherein the total switch is used to control the execution of the service, and the switch is used to control the execution of the service flow; recording the switch identifier corresponding to each switch to a preset namespace in the distributed configuration center, wherein the distributed configuration center is used to receive a modification requirement of the service and modify the switch value corresponding to the switch identifier in the preset namespace based on the modification requirement.

[0099] The processor can also call information and application programs stored in the memory through the transmission device to perform the following steps: in the case that the service needs to add a service scenario, constructing an added service flow corresponding to the service scenario; configuring an added switch for the added service flow and recording the added switch identifier corresponding to the added switch to a preset namespace in the distributed configuration center.

[0100] The processor can also call information and application programs stored in the memory through the transmission device to perform the following steps: the server is used to listen to the preset namespace in the distributed configuration center, and in the case that the switch value in the preset namespace is modified, record the switch identifier corresponding to the modified switch value as a to-be-modified switch identifier, and add all to-be-modified switch identifiers to the preset cache.

[0101] The processor can also call information and application programs stored in the memory through the transmission device to perform the following steps: the server matches the switch identifier with the to-be-modified switch identifier in the preset cache; in the case that the to-be-modified switch identifier is successfully matched, the to-be-modified switch identifier is returned to the client.

[0102] The processor can also call information and application programs stored in the memory through the transmission device to perform the following steps: based on the set of business processes, retaining the business process corresponding to the first preset value and deleting the business process corresponding to the second preset value to obtain a target set of business processes; and executing all target business processes in the target set of business processes to complete the processing of the target business.

[0103] The processor can also call information and application programs stored in the memory through the transmission device to perform the following steps: in the case that the front-end page of the client is refreshed or re-logged in, the client transmits the switch identifiers corresponding to all business processes involved in the business executed by the front-end page to the server; and based on the to-be-modified switch identifiers returned by the server, adjusting all business processes involved in the business.

[0104] By receiving a business processing request under the condition that the total switch of the target business is turned on, determining a set of business processes based on the request, transmitting the switch identifiers in the set to the server, and receiving the to-be-modified switch identifiers returned by the server, the business processes are dynamically adjusted. In this way, the flexibility and efficiency of business processing are improved, the changes in business requirements can be responded to in real time, the problem that the business service becomes unavailable and the business processing needs to be suspended due to the modification of business processes is avoided, the technical problem that the server needs to be restarted when the business processes are updated in the related art, resulting in that the business service is unavailable for a period of time, is solved, and the technical effect of efficiently processing the business is achieved.

[0105] Those skilled in the art can understand that Figure 4 The structure shown is only schematic, and the electronic device can also be a terminal device such as a smart phone, a tablet computer, a palm computer, and a Mobile Internet Device (MID). Figure 4 It does not limit the structure of the electronic device. For example, the electronic device can include more or fewer components (such as a network interface, a display device, etc.) than Figure 4 shown, or have a different configuration than Figure 4 shown.

[0106] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by programs instructing the related hardware of the terminal device, and the programs can be stored in a computer-readable storage medium, which can include a flash disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, etc.

[0107] Embodiment 4

[0108] The embodiment of the present application further provides a storage medium. Optionally, in the embodiment, the storage medium can be used to save the program code executed by the business processing method provided in the first embodiment.

[0109] Optionally, in the embodiment, the storage medium can be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.

[0110] The present application further provides a computer program product, which is adapted to execute the steps of the business processing method when executed on a data processing device.

[0111] The serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.

[0112] In the above embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0113] In the several embodiments provided by the present application, it should be understood that the disclosed technology can be implemented in other ways. Of course, the unit embodiment described above is only schematic. For example, the division of the units is only a logical function division. There can be another division manner for actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed coupling or direct coupling or communication connection between the units can be indirect coupling or communication connection through some interface, or electrical or other form.

[0114] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment.

[0115] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware, or in the form of software functional unit.

[0116] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0117] The above is only the preferred embodiment of the present application, and it should be pointed out that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should be considered as the protection scope of the present application.

Claims

1. A service processing method characterized by, The method comprises the following steps: receiving a service processing request about a target service in the case that a total switch of the target service is turned on; determining a service flow set based on the service processing request, wherein each service flow in the service flow set corresponds to a switch identifier, and each switch identifier indicates a switch corresponding to an initial switch value; transmitting all the switch identifiers corresponding to the service flows to a server, and receiving the to-be-modified switch identifiers returned by the server which need to be modified; modifying the initial switch values indicated by the to-be-modified switch identifiers to obtain target switch values, and processing the target service based on all the target switch values and all the unmodified initial switch values; wherein, before receiving the service processing request about the target service in the case that the total switch of the target service is turned on, the method further comprises the following steps: determining all the service flows corresponding to each service; configuring a total switch for each service and configuring a switch for each service flow, wherein the total switch is used to control the execution of the service, and the switch is used to control the execution of the service flow; recording the switch identifier corresponding to each switch to a preset namespace in a distributed configuration center, wherein the distributed configuration center is used to receive a modification demand of the service and modify the switch value corresponding to the switch identifier in the preset namespace based on the modification demand; the method further comprises the following step: in the case that the switch of a service flow is off, the service flow is not executed, and other service flows with the switch turned on are directly executed.

2. The service processing method according to claim 1, characterized by, after configuring a total switch for each service and configuring a switch for each service flow, the method further comprises the following steps: in the case that the service needs to add a service scenario, constructing an added service flow corresponding to the service scenario; configuring an added switch for the added service flow, and recording the added switch identifier corresponding to the added switch to the preset namespace in the distributed configuration center.

3. The service processing method according to claim 1, characterized by, the server is used to listen to the preset namespace in the distributed configuration center, and in the case that the switch value in the preset namespace is modified, the switch identifier corresponding to the modified switch value is recorded as the to-be-modified switch identifier, and all the to-be-modified switch identifiers are added to a preset cache.

4. The service processing method according to claim 3, characterized by, after transmitting all the switch identifiers corresponding to the service flows to the server, the method further comprises the following steps: the server matches the switch identifier with the to-be-modified switch identifier in the preset cache; in the case that the to-be-modified switch identifier is successfully matched, the to-be-modified switch identifier is returned to the client.

5. The service processing method of claim 1, wherein, the initial switch value is a first preset value, and the target switch value is a second preset value, and the step of processing the target service based on all the target switch values and all the unmodified initial switch values comprises the following steps: based on the service flow set, retaining the service flow corresponding to the first preset value and deleting the service flow corresponding to the second preset value to obtain a target service flow set; All target business processes in the target business process set are executed, and the processing of the target business is completed.

6. The service processing method of claim 1, wherein, The business processing method further includes: In a case where a front-end page of the client is refreshed or re-logged in, the client transmits, to the server, switch identifiers corresponding to all business processes involved in a business executed by the front-end page; Based on the to-be-modified switch identifiers returned by the server, all business processes involved in the business are adjusted.

7. A service processing apparatus characterized by comprising: Comprise: A receiving unit configured to receive a business processing request about a target business in a case where a total switch of the target business is on; A determining unit configured to determine a business process set based on the business processing request, wherein each business process in the business process set corresponds to a switch identifier, and each switch identifier indicates a switch corresponding to an initial switch value; A transmitting unit configured to transmit the switch identifiers corresponding to all the business processes to a server, and receive to-be-modified switch identifiers with modified switch values returned by the server; A processing unit configured to modify the initial switch values indicated by the to-be-modified switch identifiers to obtain target switch values, and process the target business based on all the target switch values and all the initial switch values that are not modified; The apparatus further comprises: a first determining module configured to determine all business processes corresponding to each business before receiving the business processing request about the target business in a case where a total switch of the target business is on; a first configuration module configured to configure a total switch for each business and configure a switch for each business process, wherein the total switch is used to control the execution of the business, and the switch is used to control the execution of the business process; and a first recording module configured to record a switch identifier corresponding to each switch to a preset namespace in a distributed configuration center, wherein the distributed configuration center is used to receive a modification requirement of the business and modify a switch value corresponding to the switch identifier in the preset namespace based on the modification requirement. In a case where a switch of a business process is off, the business process is not executed, and other business processes with the switch on are directly executed.

8. A computer program product, characterised in that, A non-volatile computer-readable storage medium storing a computer program, the computer program being executed by a processor to implement the business processing method of any one of claims 1 to 6.

9. An electronic device, comprising: One or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the business processing method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Information notification method and device

    CN111581502A

  • Directional configuration issuing method and device, equipment and storage medium

    CN116319321A