Method for controlling start-stop item, method for processing service request and device thereof
By configuring the control dimensions and policies of the start-stop items, and generating and broadcasting control messages, the problem of lack of unified specifications and difficult operation of the start-stop item setting mode is solved, centralized control and efficient cleaning of the start-stop items are realized, and the system is improved Maintenance efficiency and functional consistency.
Patent Information
- Application Number
- CN202310675294.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-08
- Publication Date
- 2024-12-10
AI Technical Summary
In the prior art, the start-stop setting mode lacks unified specifications, which is difficult to operate, and it is difficult to clean up after use, resulting in system functions redundant and low maintenance efficiency.
By configuring the control dimensions and control policies of the start-stop items, including the effective time, the failure time and the destruction time, the control messages are generated and broadcasted, and the start-stop items in the business system are unified to ensure that each business system automatically reaches the specified time. Execute the corresponding logic.
Centralized control of start and stop items is realized, avoiding the repeated configuration of the same item by multiple business systems, improving operational uniformity and cleaning efficiency, and ensuring the standardization and efficiency of system functions.
Smart Images

Figure CN119105800A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method for controlling start and stop items, a method for processing business requests and a device thereof. Background Art
[0002] With the diversification of business development, it has become a normal practice for multiple systems to develop multiple projects at the same time. How to ensure the synchronous development of multiple system functions without affecting each other has become a problem that every system developer must consider. As a result, start and stop items from different design angles have emerged in various systems (such as version start and stop items, product start and stop items, service start and stop items, and account start and stop items). The start and stop items of the project are scattered in various systems. If you want to turn on or off a function, the maintainers of each system need to operate the start and stop items in each system respectively.
[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:
[0004] There is no unified standard for the start and stop item setting mode; the start and stop item settings are difficult to operate in each system; and the start and stop items are difficult to clean up after use. Summary of the invention
[0005] In view of this, the embodiments of the present invention provide a method for controlling start and stop items, a method for processing service requests and a device thereof, so as to solve the technical problems that the start and stop item setting mode has no unified standard and is difficult to operate.
[0006] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for controlling start-stop items is provided, which is applied to a start-stop item control system, and includes:
[0007] Configure the control dimensions and control strategies corresponding to each start and stop item, wherein the control strategy includes the effective time;
[0008] Traverse the effective time of each start and stop item to determine whether there is a target start and stop item within the effective time at the current time; if so, generate a start and stop item control message according to the control dimension and control strategy corresponding to the target start and stop item, and broadcast the start and stop item control message to each business system that has subscribed to the start and stop item control message to control each business system to run the first business logic corresponding to the target start and stop item after it is turned on.
[0009] Optionally, before configuring the control dimensions and control strategies corresponding to each start and stop item, the following steps are also included:
[0010] Broadcasting a subscription message to each business system, wherein the subscription message is each field included in the start / stop item control message;
[0011] Receive a response message returned by each business system, wherein the response message includes a control message for subscribing to the start and stop item.
[0012] Optionally, the start / stop item control message includes the following fields:
[0013] The identification, control dimension, control strategy and control instruction of the start and stop items, where the control instruction is to turn on or off.
[0014] Optionally, the control strategy also includes an expiration time;
[0015] The method further comprises:
[0016] Determine whether there is a target start / stop item within the expiration time at the current time; if so, generate a start / stop item control message according to the control dimension and control strategy corresponding to the target start / stop item, and broadcast the start / stop item control message to each business system that has subscribed to the start / stop item control message to control each business system to run the second business logic corresponding to the target start / stop item after it is closed.
[0017] Optionally, the control strategy also includes a permanent effective time and a destruction time;
[0018] The method further comprises:
[0019] Determine whether there is a target start / stop item within the permanent effective time at the current time; if so, generate a start / stop item control message according to the control dimension and control strategy corresponding to the target start / stop item, and broadcast the start / stop item control message to each business system that has subscribed to the start / stop item control message, so as to control each business system to run the first business logic corresponding to the start / stop item after the target start / stop item is enabled;
[0020] Calculate the destruction time based on the current time and destruction duration;
[0021] Determine whether there is a target start / stop item within the destruction time at the current time; if so, clear the target start / stop item and its corresponding control dimension and control strategy.
[0022] In addition, according to another aspect of an embodiment of the present invention, a method for processing a service request is provided, which is applied to a service system and includes:
[0023] Receiving a start / stop item control message broadcast by a start / stop item control system, parsing the start / stop item control message, thereby obtaining an identifier, a control dimension, a control strategy, and a control instruction of the target start / stop item, wherein the control instruction is to start;
[0024] Receive business requests from upstream business systems, parse the business requests, and obtain business data;
[0025] Determine whether the business data hits the control dimension. If so, find the first business logic corresponding to the target start and stop item after it is turned on, process the business data based on the first business logic, and return the processing result.
[0026] Optionally, before receiving the start / stop item control message broadcasted by the start / stop item control system, the method further includes:
[0027] Receiving a subscription message broadcasted by the start / stop item control system, wherein the subscription message is each field included in the start / stop item control message;
[0028] A response message is returned to the start / stop item control system, wherein the response message is for subscribing to the start / stop item control message.
[0029] In addition, according to another aspect of an embodiment of the present invention, a device for controlling a start-stop item is provided, which is arranged in a start-stop item control system and includes:
[0030] A configuration module, used to configure the control dimensions and control strategies corresponding to each start and stop item, wherein the control strategy includes an effective time;
[0031] The control module is used to traverse the effective time of each start and stop item, and determine whether there is a target start and stop item within the effective time at the current time; if so, generate a start and stop item control message according to the control dimension and control strategy corresponding to the target start and stop item, and broadcast the start and stop item control message to each business system that has subscribed to the start and stop item control message, so as to control each business system to run the first business logic corresponding to the target start and stop item after it is turned on.
[0032] Optionally, the system further includes a first subscription module, configured to:
[0033] Broadcasting a subscription message to each business system, wherein the subscription message is each field included in the start / stop item control message;
[0034] Receive a response message returned by each business system, wherein the response message includes a control message for subscribing to the start and stop item.
[0035] Optionally, the start / stop item control message includes the following fields:
[0036] The identification, control dimension, control strategy and control instruction of the start and stop items, where the control instruction is to turn on or off.
[0037] Optionally, the control strategy also includes an expiration time;
[0038] The control module is also used for:
[0039] Determine whether there is a target start / stop item within the expiration time at the current time; if so, generate a start / stop item control message according to the control dimension and control strategy corresponding to the target start / stop item, and broadcast the start / stop item control message to each business system that has subscribed to the start / stop item control message to control each business system to run the second business logic corresponding to the target start / stop item after it is closed.
[0040] Optionally, the control strategy also includes a permanent effective time and a destruction time;
[0041] The control module is also used for:
[0042] Determine whether there is a target start / stop item within the permanent effective time at the current time; if so, generate a start / stop item control message according to the control dimension and control strategy corresponding to the target start / stop item, and broadcast the start / stop item control message to each business system that has subscribed to the start / stop item control message, so as to control each business system to run the first business logic corresponding to the start / stop item after the target start / stop item is enabled;
[0043] Calculate the destruction time based on the current time and destruction duration;
[0044] Determine whether there is a target start / stop item within the destruction time at the current time; if so, clear the target start / stop item and its corresponding control dimension and control strategy.
[0045] In addition, according to another aspect of an embodiment of the present invention, a device for controlling start and stop items is provided, which is arranged in a business system and includes:
[0046] A receiving module is used to receive a start / stop item control message broadcast by a start / stop item control system, parse the start / stop item control message, and obtain the identifier, control dimension, control strategy, and control instruction of the target start / stop item, wherein the control instruction is to start; receive a business request from an upstream business system, and parse the business request to obtain business data;
[0047] The processing module is used to determine whether the business data hits the control dimension. If so, it searches for the first business logic corresponding to the target start and stop item after it is turned on, processes the business data based on the first business logic, and returns the processing result.
[0048] Optionally, a second subscription module is further included, for:
[0049] Receiving a subscription message broadcasted by the start / stop item control system, wherein the subscription message is each field included in the start / stop item control message;
[0050] A response message is returned to the start / stop item control system, wherein the response message is for subscribing to the start / stop item control message.
[0051] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, including:
[0052] one or more processors;
[0053] a storage device for storing one or more programs,
[0054] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of the above embodiments.
[0055] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described in any one of the above embodiments is implemented.
[0056] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method described in any one of the above embodiments is implemented.
[0057] One embodiment of the above invention has the following advantages or beneficial effects: because the control dimensions and control strategies corresponding to each start and stop item are configured first, and then it is determined whether there is a target start and stop item within the effective time at the current time, if so, a start and stop item control message is generated and broadcast to each business system, so as to control each business system to run the corresponding business logic after the target start and stop item is turned on. Therefore, the technical problem that the start and stop item setting mode in the prior art has no unified standard and is difficult to operate is overcome. The embodiment of the present invention centrally controls each start and stop item through a start and stop item control system, avoiding the redundancy of system functions caused by repeated configuration of the same start and stop item by multiple business systems, and when the start and stop item is used up, the start and stop item can be centrally cleared within a specified time range.
[0058] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific implementation examples. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0060] Figure 1 is a flow chart of a method for controlling start and stop items according to an embodiment of the present invention;
[0061] Figure 2 is a flow chart of a method for controlling start and stop items according to a reference embodiment of the present invention;
[0062] Figure 3 is a flow chart of a method for controlling start and stop items according to yet another reference embodiment of the present invention;
[0063] Figure 4 is a flowchart of a method for controlling start and stop items according to another embodiment of the present invention;
[0064] Figure 5 is a flow chart of a method for controlling start and stop items according to yet another reference embodiment of the present invention;
[0065] Figure 6 is a schematic diagram of a device for controlling start and stop items according to an embodiment of the present invention;
[0066] Figure 7 is a schematic diagram of a device for controlling start and stop items according to another embodiment of the present invention;
[0067] Figure 8 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0068] Fig. 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0069] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0070] It should be noted that in the technical solution of this application, the acquisition, storage, use, and processing of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0071] There are various types of start and stop items. The start and stop items set in various systems of the same project are also varied, and there is no unified standard. Once the start and stop items are set, there will be operations to turn the start and stop items on and off. At present, the start and stop items of the project are scattered in various systems. If you want to turn on or off a function, the maintainers of each system need to operate the start and stop items in each system respectively, and the operation instructions of the start and stop items are generally sent by the business to the contact persons of each system through email. The risk of inconsistent operation of each system is extremely high. Therefore, the existing technology has the following technical problems:
[0072] 1) There is no unified standard for setting start and stop items: In the same project, different systems set start and stop items of different dimensions based on existing habits or developers' understanding of requirements, which increases the difficulty of business function verification;
[0073] 2) It is difficult to set the start and stop items in each system: For the same project, the start and stop items are set in each system. If the business personnel want to verify a certain function of the requirement, they need to notify the maintainers of each system to open the start and stop items at the same time for the business personnel to verify. If one or more systems are turned on or off at an inconsistent time during the process of turning on or off the start and stop items for all systems, the full-link system function verification may fail.
[0074] 3) It is difficult to clean up the start and stop items after use: With the continuous development of the system, the functions tend to be stable after a period of business demand operation. It is necessary to shut down the start and stop items in each system to avoid excessive accumulation of start and stop items and form online problems. However, since the start and stop items are scattered in various systems, no relevant business personnel will care about the offline operation of the start and stop items after the functions meet the business requirements. Therefore, the offline operation of the start and stop items scattered in various systems depends entirely on the initiative of the maintenance personnel of each system. The replacement of old and new system maintenance personnel also causes some functional start and stop items to be taken offline in a timely manner.
[0075] In order to solve the above technical problems, the embodiment of the present invention sets a unique start-stop item in the start-stop item control system. After the start-stop item is turned on or off, each system automatically receives a unified operation instruction and completes the unified operation at the same time.
[0076] Figure 1 is a flow chart of a method for controlling start and stop items according to an embodiment of the present invention. As an embodiment of the present invention, Figure 1 As shown, the method for controlling the start-stop item is applied to the start-stop item control system and may include:
[0077] Step 101: configure the control dimensions and control strategies corresponding to each start and stop item, wherein the control strategies include an effective time.
[0078] First, configure each start and stop item and its corresponding control dimension and control strategy. The control dimension can be a version dimension, a product dimension, or an account dimension. The control strategy can include the effective time, the expiration time, and the destruction time. It can also include exclusivity (exclusive or non-exclusive), priority (1, 2, or 3), etc. It should be pointed out that the configuration personnel can set multiple start and stop items according to the needs, and configure the control dimensions and control strategies corresponding to each start and stop item. If the control dimensions of two start and stop items are the same, the priority needs to be further configured. The start and stop item control system controls each business system according to the start and stop item with the highest priority.
[0079] The life cycle of the start and stop item can be divided into the effective period, expiration period and destruction period. Each start and stop item has its own life cycle. Each business system is under the control of the start and stop item control system. The start and stop items can be set by the business operator in the start and stop item control system. After the start or stop item is turned on or off, each business system automatically receives a unified operation instruction and completes the unified operation at the same time.
[0080] Step 102, traverse the effective time of each start and stop item, and determine whether there is a target start and stop item within the effective time at the current time; if so, execute step 103; if not, end.
[0081] The start / stop item control system traverses the effective time of each start / stop item, and determines whether there is a target start / stop item within the effective time of the current time of the start / stop item control system. If there is (there may be one or more), execute step 103; if not, end.
[0082] Step 103, generate a start / stop item control message according to the control dimension and control strategy corresponding to the target start / stop item, and broadcast the start / stop item control message to each business system that has subscribed to the start / stop item control message to control each business system to run the first business logic corresponding to the target start / stop item after it is turned on.
[0083] If there is a target start / stop item whose current time of the start / stop item control system is within the effective time, a start / stop item control message is generated according to the control dimension and control strategy corresponding to the target start / stop item. The start / stop item control message includes the following fields: the start / stop item identifier, control dimension, control strategy and control instruction, and the control instruction is on. Then, the start / stop item control system broadcasts the start / stop item control message to each business system that has subscribed to the start / stop item control message. After receiving the start / stop item control message, each business system parses it to obtain information such as the start / stop item identifier, control dimension, control strategy and control instruction.
[0084] For a certain business system, when the business system receives a business request from an upstream business system, it parses the business request to obtain business data, and then determines whether the business data hits the control dimension of the start / stop item. If it hits, the first business logic corresponding to the start / stop item is found according to the identifier of the start / stop item, and the business data is processed based on the first business logic, and finally the processing result is returned to the upstream business system.
[0085] For example, the control dimension of a start / stop item in the start / stop item control system is the account dimension (such as a certain account, or a certain type of account), the effective date is May 1, 2022, the expiration date is October 2, 2022, the exclusivity is non-exclusive, and the priority is 1 (the highest priority).
[0086] After the business system receives the business request, if the user account hits the control dimension of the start / stop item, the business request is processed according to the business logic corresponding to the start / stop item (the new business logic, named business logic A); if the control dimension of the start / stop item is not hit, the business request is processed according to the original business logic (the old business logic, named business logic B).
[0087] Therefore, when the user places an order on May 2, 2020, and hits the control dimension of the start and stop item, the user's business request is processed according to business logic A; when the user places an order on November 2, 2022, and hits the control dimension of the start and stop item, the user's business request is processed according to business logic B.
[0088] In the embodiment of the present invention, it is only necessary to configure the start and stop items in the start and stop item control system, and it is not necessary to configure the start and stop items in each business system. Each business system uniformly obeys the instructions of the start and stop item control system, so that each business system can uniformly open and close the start and stop items. It should be pointed out that the business logic corresponding to each start and stop item identifier after opening and closing is pre-written in the code of each business system, so the corresponding business logic can be accurately run through the start and stop item identifier, thereby efficiently completing the system function verification.
[0089] According to the various embodiments described above, it can be seen that the embodiments of the present invention first configure the control dimensions and control strategies corresponding to each start and stop item, and then determine whether there is a target start and stop item within the effective time at the current time. If so, a start and stop item control message is generated and broadcast to each business system to control each business system to run the corresponding business logic after the target start and stop item is turned on. This solves the technical problems in the prior art that the start and stop item setting mode has no unified specifications and is difficult to operate. The embodiments of the present invention centrally control each start and stop item through a start and stop item control system to avoid multiple business systems repeatedly configuring the same start and stop item and causing redundancy in system functions, and when the start and stop item is used up, the start and stop item can be centrally cleared within a specified time range.
[0090] Figure 2 is a flow chart of a method for controlling start and stop items according to a reference embodiment of the present invention. As another embodiment of the present invention, Figure 2 As shown, the method for controlling the start-stop item is applied to the start-stop item control system and may include:
[0091] Step 201, broadcasting a subscription message to each business system, wherein the subscription message is each field included in the start / stop item control message.
[0092] like Figure 3 The start-stop item control system broadcasts subscription messages to various business systems (such as commodity systems, settlement systems, order systems, production systems, distribution systems and other subsystems), and the subscription messages are the various fields contained in the start-stop item control message, that is, the various fields contained in the start-stop item control message are agreed with each business system. Among them, the start-stop item control message contains at least the following fields: the start-stop item identifier, control dimension, control strategy and control instruction, and the control instruction is to open or close.
[0093] Step 202: Receive a response message returned by each business system, wherein the response message includes a control message for subscribing to the start and stop item.
[0094] After receiving the subscription message broadcast by the start / stop item control system, each business system parses it to obtain the agreed fields. If the business system needs to subscribe to the start / stop item control message, it returns a response message of the subscription to the start / stop item control message to the start / stop item control system; if the business system does not need to subscribe to the start / stop item control message, it may not return a response message.
[0095] Step 203: configure the control dimensions and control strategies corresponding to each start and stop item, wherein the control strategies include an effective time, an expiration time, and a destruction time.
[0096] Configuration personnel configure each start-stop item and its corresponding control dimension and control strategy in the start-stop item control system according to actual needs, such as Figure 3 As shown, the control dimensions and control strategies of the start and stop items are set. The control strategies include the effective time, the expiration time, and the destruction time after permanent effectiveness, etc., and the exclusivity and priority can be further set.
[0097] Step 204, traverse the effective time of each start and stop item, and determine whether there is a target start and stop item within the effective time at the current time; if so, generate a start and stop item control message according to the control dimension and control strategy corresponding to the target start and stop item, and broadcast the start and stop item control message to each business system that has subscribed to the start and stop item control message, so as to control each business system to run the first business logic corresponding to the target start and stop item after it is turned on.
[0098] like Figure 3 As shown, each start and stop item is traversed to determine whether there is a target start and stop item within the effective time of the current time of the start and stop item control system. If so, a start and stop item control message is generated according to the control dimension and control strategy corresponding to the target start and stop item. The start and stop item control message includes the following fields: the start and stop item identifier, control dimension, control strategy and control instruction, and the control instruction is to start; then the start and stop item control message is broadcast to each business system that has subscribed to the start and stop item control message to control each business system to run the first business logic corresponding to the target start and stop item after it is turned on.
[0099] Continue to traverse each start and stop item. If there is a target start and stop item whose current time of the start and stop item control system is within the effective time, a start and stop item control message is generated, which will not be repeated here.
[0100] Step 205, determine whether there is a target start / stop item within the expiration time at the current time; if so, generate a start / stop item control message according to the control dimension and control strategy corresponding to the target start / stop item, and broadcast the start / stop item control message to each business system that has subscribed to the start / stop item control message, so as to control each business system to run the second business logic corresponding to the target start / stop item after it is closed.
[0101] Continue to traverse each start and stop item to determine whether there is a target start and stop item whose current time of the start and stop item control system is within the expiration time. If so, generate a start and stop item control message according to the control dimension and control strategy corresponding to the target start and stop item. The start and stop item control message includes the following fields: the start and stop item identifier, control dimension, control strategy and control instruction, and the control instruction is to close; then broadcast the start and stop item control message to each business system that has subscribed to the start and stop item control message to control each business system to run the second business logic corresponding to the target start and stop item after it is closed.
[0102] Continue to traverse each start and stop item. If there is a target start and stop item whose current time of the start and stop item control system is within the expiration time, a start and stop item control message is generated, which will not be repeated here.
[0103] During the expiration period of the start / stop item, it means that the start / stop item has passed its effective period. The currently set start / stop item dimension is no longer used as an identifier to trigger the new and old business logic. The start / stop item in the expiration period can be set to take effect at any time according to the requirements verified by the business personnel, and the invalid start / stop item can be turned into effective.
[0104] Step 206, determine whether there is a target start / stop item within the permanent effective time at the current time; if so, generate a start / stop item control message according to the control dimension and control strategy corresponding to the target start / stop item, and broadcast the start / stop item control message to each business system that has subscribed to the start / stop item control message, so as to control each business system to run the first business logic corresponding to the target start / stop item after it is turned on.
[0105] The configuration personnel configure the permanent effective time of each start and stop item in the start and stop item control system according to actual needs. The start and stop item control system continues to traverse each start and stop item to determine whether there is a target start and stop item whose current time is within the permanent effective time. If so, a start and stop item control message is generated according to the control dimension and control policy corresponding to the target start and stop item. The start and stop item control message includes the following fields: the start and stop item identifier, control dimension, control policy and control instruction, and the control instruction is to start; then the start and stop item control message is broadcast to each business system that has subscribed to the start and stop item control message to control each business system to run the first business logic corresponding to the target start and stop item after it is turned on.
[0106] During the effective period of the start / stop item, if after verification, the functions of the entire link meet the business requirements, you can configure the permanent effective time of the start / stop item in the start / stop item control system to make the new business logic in the business system take effect permanently.
[0107] Step 207, calculating the destruction time according to the current time and the destruction duration.
[0108] Add the current time of the start / stop item control system to the destruction time (such as 7 days or 15 days, etc.) to calculate the destruction time of the target start / stop item. The destruction period of the start / stop item indicates that the start / stop item will be automatically cleared by the system within a certain period of time.
[0109] Step 208, determine whether there is a target start / stop item within the destruction time at the current time; if so, clear the target start / stop item and its corresponding control dimension and control strategy.
[0110] It is determined whether there is a target start / stop item whose current time of the start / stop item control system is within the destruction time. If so, the target start / stop item and its corresponding control dimension and control strategy are cleared.
[0111] In addition, the specific implementation content of the method for controlling the start and stop items in a reference embodiment of the present invention has been described in detail in the method for controlling the start and stop items described above, so the repeated content will not be described here.
[0112] Figure 4 is a flow chart of a method for controlling start and stop items according to another embodiment of the present invention. As another embodiment of the present invention, Figure 4 As shown, the method for controlling the start and stop items is applied to a business system and may include:
[0113] Step 401, receiving a start / stop item control message broadcast by a start / stop item control system, parsing the start / stop item control message, thereby obtaining an identifier, a control dimension, a control strategy and a control instruction of the target start / stop item, wherein the control instruction is to start.
[0114] Business systems that have subscribed to the start and stop item control messages (such as commodity systems, settlement systems, order systems, production systems, distribution systems and other subsystems) receive the start and stop item control messages broadcast by the start and stop item control system and parse the received start and stop item control messages to obtain the identification, control dimension, control strategy and control instructions of the target start and stop item, and the control instruction is to start.
[0115] Step 402: receiving a business request from an upstream business system, parsing the business request, and obtaining business data.
[0116] The business system receives business requests from the upstream business system and parses the business requests to obtain business data (such as user account, product SKU, order time, delivery time, etc.).
[0117] Step 403, determine whether the business data hits the control dimension; if so, execute step 404; if not, execute step 405.
[0118] The business system determines whether the business data hits the control dimension of the target start and stop items (such as user account, SKU).
[0119] Step 404, searching for the first business logic corresponding to the target start / stop item after it is turned on, processing the business data based on the first business logic, and returning a processing result.
[0120] If the business data hits the control dimension of the target start / stop item, the business system searches for the first business logic (i.e., the new business logic) corresponding to the target start / stop item after it is enabled, and then processes the business data based on the first business logic and returns the processing result.
[0121] Step 405: Process the business data based on the current business logic and return the processing result.
[0122] If the business data does not hit the control dimension of the target start and stop item, the business system first processes the business data based on the current business logic (ie, the old business logic, that is, the second business logic) and returns the processing result.
[0123] The embodiment of the present invention centrally controls various start / stop items through a start / stop item control system, thereby avoiding redundant system functions caused by repeated configuration of the same start / stop item in multiple business systems, and when the start / stop items are used up, the start / stop items can be centrally cleared within a specified time range.
[0124] Figure 5 : is a flow chart of a method for controlling start and stop items according to another reference embodiment of the present invention. As another embodiment of the present invention, Figure 5 As shown, the method for controlling the start and stop items is applied to a business system and may include:
[0125] Step 501: receiving a subscription message broadcasted by the start / stop item control system, wherein the subscription message is each field included in the start / stop item control message.
[0126] Step 502: Return a response message to the start / stop item control system, wherein the response message is a message for subscribing to the start / stop item control message.
[0127] Step 503: receiving a start / stop item control message broadcasted by a start / stop item control system, parsing the start / stop item control message, thereby obtaining an identifier, a control dimension, a control strategy, and a control instruction of the target start / stop item, wherein the control instruction is to start.
[0128] Step 504: receiving a business request transmitted from an upstream business system, and parsing the business request to obtain business data.
[0129] Step 505 , determine whether the business data hits the control dimension; if so, execute step 506 ; if not, execute step 507 .
[0130] Step 506, searching for the first business logic corresponding to the target start / stop item after it is turned on, processing the business data based on the first business logic, and returning a processing result.
[0131] Step 507: Process the business data based on the current business logic and return the processing result.
[0132] In addition, the specific implementation content of the method for controlling the start and stop items in another reference embodiment of the present invention has been described in detail in the method for controlling the start and stop items described above, so the repeated content will not be described here.
[0133] Figure 6 Schematic diagram of a device for controlling start and stop items according to an embodiment of the present invention. Figure 6 As shown, the device 600 for controlling the start and stop items is arranged in the start and stop item control system, including a configuration module 601 and a control module 602; wherein, the configuration module 601 is used to configure the control dimensions and control strategies corresponding to each start and stop item, and the control strategies include the effective time; the control module 602 is used to traverse the effective time of each start and stop item, and determine whether there is a target start and stop item within the effective time at the current time; if so, a start and stop item control message is generated according to the control dimensions and control strategies corresponding to the target start and stop item, and the start and stop item control message is broadcast to each business system that has subscribed to the start and stop item control message, so as to control each business system to run the first business logic corresponding to the target start and stop item after it is turned on.
[0134] Optionally, the system further includes a first subscription module, configured to:
[0135] Broadcasting a subscription message to each business system, wherein the subscription message is each field included in the start / stop item control message;
[0136] Receive a response message returned by each business system, wherein the response message includes a control message for subscribing to the start and stop item.
[0137] Optionally, the start / stop item control message includes the following fields:
[0138] The identification, control dimension, control strategy and control instruction of the start and stop items, where the control instruction is to turn on or off.
[0139] Optionally, the control strategy also includes an expiration time;
[0140] The control module 602 is also used for:
[0141] Determine whether there is a target start / stop item within the expiration time at the current time; if so, generate a start / stop item control message according to the control dimension and control strategy corresponding to the target start / stop item, and broadcast the start / stop item control message to each business system that has subscribed to the start / stop item control message to control each business system to run the second business logic corresponding to the target start / stop item after it is closed.
[0142] Optionally, the control strategy also includes a permanent effective time and a destruction time;
[0143] The control module 602 is also used for:
[0144] Determine whether there is a target start / stop item within the permanent effective time at the current time; if so, generate a start / stop item control message according to the control dimension and control strategy corresponding to the target start / stop item, and broadcast the start / stop item control message to each business system that has subscribed to the start / stop item control message, so as to control each business system to run the first business logic corresponding to the start / stop item after the target start / stop item is enabled;
[0145] Calculate the destruction time based on the current time and destruction duration;
[0146] Determine whether there is a target start / stop item within the destruction time at the current time; if so, clear the target start / stop item and its corresponding control dimension and control strategy.
[0147] It should be noted that the specific implementation content of the device for controlling the start and stop items of the present invention has been described in detail in the method for controlling the start and stop items described above, so the repeated content will not be described again here.
[0148] Figure 7 FIG. 1 is a schematic diagram of a device for controlling start and stop items according to another embodiment of the present invention. Figure 7 As shown, the device 700 for controlling the start and stop items is set in the business system, including a receiving module 701 and a processing module 702; wherein the receiving module 701 is used to receive the start and stop item control message broadcast by the start and stop item control system, parse the start and stop item control message, so as to obtain the identification, control dimension, control strategy and control instruction of the target start and stop item, and the control instruction is to start; receive the business request transmitted by the upstream business system, parse the business request, so as to obtain business data; the processing module 702 is used to determine whether the business data hits the control dimension, and if so, find the first business logic corresponding to the start of the target start and stop item, process the business data based on the first business logic, and return the processing result.
[0149] Optionally, a second subscription module is further included, for:
[0150] Receiving a subscription message broadcasted by the start / stop item control system, wherein the subscription message is each field included in the start / stop item control message;
[0151] A response message is returned to the start / stop item control system, wherein the response message is for subscribing to the start / stop item control message.
[0152] It should be noted that the specific implementation content of the device for controlling the start and stop items of the present invention has been described in detail in the method for controlling the start and stop items described above, so the repeated content will not be described again here.
[0153] Figure 8An exemplary system architecture 800 is shown to which the method for controlling start / stop items or the apparatus for controlling start / stop items according to the embodiments of the present invention can be applied.
[0154] like Figure 8 As shown, system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. Network 804 is used to provide a medium for communication links between terminal devices 801, 802, 803 and server 805. Network 804 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0155] Users can use terminal devices 801, 802, and 803 to interact with server 805 through network 804 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 801, 802, and 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).
[0156] The terminal devices 801 , 802 , and 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0157] The server 805 may be a server that provides various services, such as a backend control server (for example only) that provides support for shopping websites browsed by users using the terminal devices 801, 802, and 803. The backend control server may analyze and process the received data such as the item information query request, and feed back the processing results to the terminal device.
[0158] It should be noted that the method for controlling the start and stop items provided in the embodiment of the present invention is generally executed by the server 805, and accordingly, the device for controlling the start and stop items is generally set in the server 805. The method for processing a service request provided in the embodiment of the present invention can be executed by the terminal devices 801, 802, and 803, and accordingly, the device for processing a service request can be set in the terminal devices 801, 802, and 803.
[0159] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0160] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 of a terminal device suitable for implementing an embodiment of the present invention. Fig. 9 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0161] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0162] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.
[0163] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are executed.
[0164] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0165] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0166] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a configuration module and a control module, wherein the names of these modules do not constitute a limitation on the modules themselves in some cases.
[0167] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a receiving module and a processing module, wherein the names of these modules do not constitute a limitation on the modules themselves in some cases.
[0168] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device implements the following method: configure the control dimensions and control strategies corresponding to each start and stop item, and the control strategies include effective time; traverse the effective time of each start and stop item, and determine whether there is a target start and stop item within the effective time at the current time; if so, generate a start and stop item control message according to the control dimension and control strategy corresponding to the target start and stop item, and broadcast the start and stop item control message to each business system that has subscribed to the start and stop item control message, so as to control each business system to run the first business logic corresponding to the target start and stop item after it is turned on.
[0169] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device implements the following method: receiving a start-stop item control message broadcast by a start-stop item control system, parsing the start-stop item control message, thereby obtaining the identification, control dimension, control strategy and control instruction of the target start-stop item, and the control instruction is to start; receiving a business request transmitted by an upstream business system, parsing the business request, thereby obtaining business data; determining whether the business data hits the control dimension, and if so, searching for the first business logic corresponding to the start of the target start-stop item, processing the business data based on the first business logic, and returning the processing result.
[0170] As another aspect, an embodiment of the present invention further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the method described in any of the above embodiments is implemented.
[0171] According to the technical solution of the embodiment of the present invention, the control dimensions and control strategies corresponding to each start and stop item are configured first, and then it is determined whether there is a target start and stop item within the effective time at the current time. If so, a start and stop item control message is generated and broadcast to each business system to control each business system to run the corresponding business logic after the target start and stop item is turned on. Therefore, the technical problem of the lack of unified specifications and high operational difficulty of the start and stop item setting mode in the prior art is overcome. The embodiment of the present invention centrally controls each start and stop item through a start and stop item control system, avoiding the redundancy of system functions caused by repeated configuration of the same start and stop item by multiple business systems, and when the start and stop item is used up, the start and stop item can be centrally cleared within a specified time range.
[0172] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for controlling start and stop items, characterized in that: Applied to start-stop control system, including: Configure the control dimensions and control strategies corresponding to each start and stop item, wherein the control strategy includes the effective time; Traverse the effective time of each start and stop item to determine whether there is a target start and stop item within the effective time at the current time; if so, generate a start and stop item control message according to the control dimension and control strategy corresponding to the target start and stop item, and broadcast the start and stop item control message to each business system that has subscribed to the start and stop item control message to control each business system to run the first business logic corresponding to the target start and stop item after it is turned on.
2. The method according to claim 1, characterized in that Before configuring the control dimensions and control strategies corresponding to each start and stop item, the following are also required: Broadcasting a subscription message to each business system, wherein the subscription message is each field included in the start / stop item control message; Receive a response message returned by each business system, wherein the response message includes a control message for subscribing to the start and stop item.
3. The method according to claim 2, characterized in that The start / stop item control message includes the following fields: The identification, control dimension, control strategy and control instruction of the start and stop items, where the control instruction is to turn on or off.
4. The method according to claim 1, characterized in that: The control strategy also includes an expiration time; The method further comprises: Determine whether there is a target start / stop item within the expiration time at the current time; if so, generate a start / stop item control message according to the control dimension and control strategy corresponding to the target start / stop item, and broadcast the start / stop item control message to each business system that has subscribed to the start / stop item control message to control each business system to run the second business logic corresponding to the target start / stop item after it is closed.
5. The method according to claim 1, characterized in that The control strategy also includes a permanent effective time and a destruction time; The method further comprises: Determine whether there is a target start / stop item within the permanent effective time at the current time; if so, generate a start / stop item control message according to the control dimension and control strategy corresponding to the target start / stop item, and broadcast the start / stop item control message to each business system that has subscribed to the start / stop item control message, so as to control each business system to run the first business logic corresponding to the start / stop item after the target start / stop item is enabled; Calculate the destruction time based on the current time and destruction duration; Determine whether there is a target start / stop item within the destruction time at the current time; if so, clear the target start / stop item and its corresponding control dimension and control strategy.
6. A method for processing a service request, characterized in that: Applied to business systems, including: Receiving a start / stop item control message broadcast by a start / stop item control system, parsing the start / stop item control message, thereby obtaining an identifier, a control dimension, a control strategy, and a control instruction of the target start / stop item, wherein the control instruction is to start; Receive business requests from upstream business systems, parse the business requests, and obtain business data; Determine whether the business data hits the control dimension. If so, find the first business logic corresponding to the target start and stop item after it is turned on, process the business data based on the first business logic, and return the processing result.
7. The method according to claim 6, characterized in that Before receiving the start / stop item control message broadcast by the start / stop item control system, the method further includes: Receiving a subscription message broadcasted by the start / stop item control system, wherein the subscription message is each field included in the start / stop item control message; A response message is returned to the start / stop item control system, wherein the response message is for subscribing to the start / stop item control message.
8. A device for controlling start and stop items, characterized in that: Set in the start-stop control system, including: A configuration module, used to configure the control dimensions and control strategies corresponding to each start and stop item, wherein the control strategy includes an effective time; The control module is used to traverse the effective time of each start and stop item, and determine whether there is a target start and stop item within the effective time at the current time; if so, generate a start and stop item control message according to the control dimension and control strategy corresponding to the target start and stop item, and broadcast the start and stop item control message to each business system that has subscribed to the start and stop item control message, so as to control each business system to run the first business logic corresponding to the start and stop item after it is turned on.
9. A device for processing a service request, characterized in that: Set up in the business system, including: A receiving module is used to receive a start / stop item control message broadcast by a start / stop item control system, parse the start / stop item control message, and obtain the identifier, control dimension, control strategy, and control instruction of the target start / stop item, wherein the control instruction is to start; receive a business request from an upstream business system, and parse the business request to obtain business data; The processing module is used to determine whether the business data hits the control dimension. If so, it searches for the first business logic corresponding to the target start and stop item after it is turned on, processes the business data based on the first business logic, and returns the processing result.
10. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
11. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
