Grayscale release method, device, computer equipment and storage medium

By extracting and identifying grayscale control data and business data in the message queue, and obtaining processing rules for new and old systems, the problem of poor controllability of existing grayscale publishing methods is solved, and higher grayscale publishing controllability and flexibility are achieved.

CN114489770BActive Publication Date: 2025-03-14INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210092254.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-26
Publication Date
2025-03-14
Estimated Expiration
2042-01-26

AI Technical Summary

Technical Problem

When the existing grayscale publishing method based on streaming data processing systems starts running, grayscale publishing cannot control the start or end at a specified time, and cannot control where to start and end in the message queue, which has poor controllability.

Method used

By obtaining the message queue data and message queue data addresses, extracting the grayscale control data and service data in the message queue, identifying the system identification of the service data, and obtaining the processing rules of the service data by the new and old systems based on the system identification, grayscale status identification and message queue data address, and then performing grayscale release.

Benefits of technology

It realizes that different processing rules are implemented for new and old systems on different business data during the grayscale release process, improves the controllability of grayscale release, and controls the start and end time points of grayscale release through the first-in-first-out feature of the message queue, and enhances control of the release process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114489770B_ABST
    Figure CN114489770B_ABST
Patent Text Reader

Abstract

The present application relates to a grayscale publishing method, device, computer equipment, storage medium and computer program product, which can be used in the financial field or other fields. The method includes: obtaining message queue data and message queue data address; extracting grayscale control data from the message queue data to obtain a grayscale status identifier; extracting business data from the message queue data, obtaining a system identifier corresponding to the business data through data identification, and obtaining the processing rules of the new system and the old system for the business data according to the system identifier, the grayscale status identifier and the message queue data address; grayscale publishing is performed according to the processing rules of the new system and the old system for the business data. This method performs data identification on the business data to obtain the system identifier corresponding to the business data, so that during the grayscale publishing process, the new system and the old system execute different data processing rules for different business data, which can improve the controllability of grayscale publishing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a grayscale publishing method, apparatus, computer equipment, storage medium, and computer program product. Background Art

[0002] With the development of the Internet and computer technology, financial technology systems have penetrated into all areas of people's production and life. The market has put forward higher requirements on the stability of financial technology systems. Grayscale release technology has become an important guarantee for the stability of financial technology systems.

[0003] At present, when releasing a new version of the system, the grayscale release method based on the streaming data processing system will start a part of the new system B on the basis of keeping the old system A running, and the new and old systems will jointly process the input data; if there is no problem with the operation of the new system B, the old system A will be gradually shut down, and the new system B will be started accordingly until all versions are released. However, this grayscale release method starts when the new system B starts running, and stops when the old system A stops completely. The grayscale release process cannot be controlled to start or end at a specified time, nor can it control where to start and end in the message queue. There is a problem of poor controllability of grayscale release. Summary of the invention

[0004] Based on this, it is necessary to provide a grayscale release method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the controllability of grayscale release in order to address the problem of poor controllability of traditional grayscale release methods.

[0005] In a first aspect, the present application provides a grayscale release method. The method comprises:

[0006] Get the message queue data and the message queue data address;

[0007] Extract the grayscale control data in the message queue data to obtain the grayscale state identifier;

[0008] Extract the business data from the message queue data, obtain the system ID corresponding to the business data through data recognition, and obtain the processing rules of the new system and the old system for the business data based on the system ID, grayscale status ID and message queue data address;

[0009] Grayscale release is carried out based on the processing rules of business data in the new and old systems.

[0010] In one embodiment, extracting grayscale control data from the message queue data to obtain the grayscale state identifier includes:

[0011] Extract grayscale control data from message queue data;

[0012] If the grayscale control data is grayscale start data, the grayscale start state identifier is obtained, and the grayscale start state identifier and the message queue data address corresponding to the grayscale start data are respectively written into the key and value of the database key-value pair.

[0013] In one embodiment, extracting grayscale control data from the message queue data to obtain the grayscale state identifier further includes:

[0014] If the grayscale control data is grayscale end data, a grayscale end state identifier is obtained and the existing database key-value pair is deleted.

[0015] In one embodiment, extracting business data from the message queue data, obtaining a system identifier corresponding to the business data through data identification, and obtaining processing rules of the new system and the old system for the business data according to the system identifier, the gray state identifier, and the message queue data address include:

[0016] Extract business data from the message queue data, obtain the system identifier corresponding to the business data through data recognition, and read the database key-value pair;

[0017] If the key of the database key-value pair does not correspond to the grayscale start state identifier or the key of the database key-value pair is empty, the old system processes the business data;

[0018] If the key of the database key-value pair corresponds to the grayscale start state identifier, the first processing rules of the new system and the old system for the business data are obtained according to the value of the database key-value pair, the message queue data address and the system identifier.

[0019] In one embodiment, obtaining the first processing rule of the new system and the old system for the business data according to the value of the database key-value pair, the message queue data address and the system identifier includes:

[0020] If the data address represented by the value of the database key-value pair is greater than the message queue data address corresponding to the business data, the old system processes the business data;

[0021] If the data address represented by the value of the database key-value pair is smaller than the message queue data address corresponding to the business data, the second processing rule of the new system and the old system for the business data is obtained according to the system identifier.

[0022] In one embodiment, obtaining the second processing rules of the new system and the old system for the business data according to the system identifier includes:

[0023] If the system ID is the old system ID, the old system processes the business data;

[0024] If the system identifier is a new system identifier, the new system processes the business data.

[0025] In a second aspect, the present application also provides a grayscale publishing device. The device includes:

[0026] A data acquisition module is used to obtain message queue data and message queue data address;

[0027] A grayscale status identification acquisition module is used to extract grayscale control data from the message queue data to obtain a grayscale status identification;

[0028] The processing rule acquisition module is used to extract the business data in the message queue data, obtain the system identifier corresponding to the business data through data identification, and obtain the processing rules of the new system and the old system for the business data according to the system identifier, gray state identifier and message queue data address;

[0029] The grayscale release module is used to perform grayscale release according to the processing rules of business data in the new system and the old system.

[0030] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0031] Obtain message queue data and message queue data address; extract grayscale control data from the message queue data to obtain a grayscale status identifier; extract business data from the message queue data, obtain the system identifier corresponding to the business data through data identification, and obtain the processing rules of the new system and the old system for the business data based on the system identifier, grayscale status identifier and message queue data address; perform grayscale release based on the processing rules of the new system and the old system for the business data.

[0032] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0033] Obtain message queue data and message queue data address; extract grayscale control data from the message queue data to obtain a grayscale status identifier; extract business data from the message queue data, obtain the system identifier corresponding to the business data through data identification, and obtain the processing rules of the new system and the old system for the business data based on the system identifier, grayscale status identifier and message queue data address; perform grayscale release based on the processing rules of the new system and the old system for the business data.

[0034] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0035] Obtain message queue data and message queue data address; extract grayscale control data from the message queue data to obtain a grayscale status identifier; extract business data from the message queue data, obtain the system identifier corresponding to the business data through data identification, and obtain the processing rules of the new system and the old system for the business data based on the system identifier, grayscale status identifier and message queue data address; perform grayscale release based on the processing rules of the new system and the old system for the business data.

[0036] The grayscale publishing method, device, computer equipment, storage medium and computer program product obtain the message queue data and the message queue data address, extract the grayscale control data in the message queue data, obtain the grayscale status identifier, extract the business data in the message queue data, obtain the system identifier corresponding to the business data through data identification, and obtain the processing rules of the new system and the old system for the business data according to the system identifier, the grayscale status identifier and the message queue data address, and perform grayscale publishing according to the processing rules of the new system and the old system for the business data. The scheme of the above embodiment, by performing data identification on the business data and obtaining the system identifier corresponding to the business data, can realize that in the grayscale publishing process, the new system and the old system execute different data processing rules for different business data, thereby improving the controllability of grayscale publishing; based on the first-in-first-out characteristics of the message queue, the grayscale control data and the business data are written into the message queue, which can realize the control of the start and end time points of the grayscale publishing, and grayscale publishing is performed according to the grayscale status identifier and the message queue data address, which can realize the control of the start and end of the grayscale publishing at a specific position in the message queue, further improving the controllability of the grayscale publishing. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 This is an application environment diagram of a grayscale publishing method in an embodiment;

[0038] Figure 2 1 is a flow chart of a grayscale publishing method in one embodiment;

[0039] Figure 3 A schematic diagram of a process of grayscale release steps in an embodiment;

[0040] Figure 4 is a schematic diagram of a sub-process of S660 in an embodiment;

[0041] Figure 5 is a schematic diagram of a sub-process of S664 in one embodiment;

[0042] Figure 6 It is a flowchart of a grayscale publishing method in another embodiment;

[0043] Figure 7A schematic diagram of a process of grayscale publishing steps in another embodiment;

[0044] Figure 8 is a structural block diagram of a grayscale publishing device in an embodiment;

[0045] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0047] The grayscale publishing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 obtains the message queue data and the message queue data address; extracts the gray control data in the message queue data, obtains the gray state identifier; extracts the business data in the message queue data, obtains the system identifier corresponding to the business data through data identification, and obtains the processing rules of the new system and the old system for the business data according to the system identifier, the gray state identifier and the message queue data address; grayscale publishing is performed according to the processing rules of the new system and the old system for the business data. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0048] In one embodiment, Figure 2 As shown, a grayscale release method is provided, which is applied to Figure 1 The terminal 102 in the example is used as an example to illustrate, and the following steps are included:

[0049] S200, obtaining message queue data and a message queue data address.

[0050] Among them, the message queue is a container for storing messages during the transmission of messages. It is an important component in a distributed system. It mainly solves problems such as application coupling, asynchronous messages and traffic clipping, and realizes high-performance, high-availability, scalable and eventually consistent architecture. At present, in the production environment, the message queues used more are ActiveMQ, RabbitMQ, ZeroMQ, Kafka, MetaMQ and RocketMQ. Kafka is an open source stream processing platform developed by the Apache Software Foundation. It is a high-throughput distributed publish-subscribe message system. In practical applications, Kafka can be used for message queues, streaming processing and log aggregation, etc. It adopts a very flexible publish-subscribe mode. Both the server and the client can be expanded in real time and flexibly, and the offset mechanism can be used to accurately control the position of the client reading the message queue. Preferably, the message queue used in this application can be Kafka. It should be noted that this application does not specifically limit the type of message queue used. The message is sent to the message queue and recorded in the message queue in the order of the reception time. The obtained message queue data can be the body data of the message or the type of the message. The message queue data address is the address of the message recorded in the message queue.

[0051] Specifically, the message queue data and the message queue data address are obtained.

[0052] S400, extracting grayscale control data from the message queue data to obtain a grayscale state identifier.

[0053] Among them, grayscale release refers to a system release method that can smoothly transition between black and white. During the version release process, the old system and the new system are kept running in parallel. If there are no problems with the new system, the old system is gradually reduced and the new system is added until all versions are released. Grayscale release can ensure the stability of the overall system. Problems can be discovered and adjusted at the initial grayscale to ensure their impact. Grayscale control data is a special data written to the message queue by the grayscale release control program with a grayscale start or grayscale end field attached. The grayscale control data in the message queue data is extracted to obtain the grayscale status identifier, which is used to represent the grayscale start state or grayscale end state.

[0054] Specifically, the grayscale control data in the message queue data is extracted to obtain the grayscale state identifier.

[0055] S600, extracting business data from the message queue data, obtaining the system identifier corresponding to the business data through data identification, and obtaining the processing rules of the new system and the old system for the business data according to the system identifier, the gray state identifier and the message queue data address.

[0056] Among them, the new system is the target system of the grayscale release, and the old system is the source system of the grayscale release. During the grayscale release process, the new system and the old system are kept running in parallel, and the old system is gradually reduced, and the new system is started up until the release of the new system is completed. The business data is the data running in the old system. With the start of the grayscale release, it is gradually switched to the new system according to certain processing rules to achieve the normal operation of business data in the new system. The actual processing process of the two systems for data may not be the same, but they have the same status in the entire structure. The two are parallel and share data in the database. Business data comes from the upstream of the system, which can be various deposits, withdrawals and transfers generated in banking systems such as ATMs or teller machines. This application does not specifically limit the specific source of business data. Data identification refers to a data identification module set between the message queue and the new system or the message queue and the old system, which is used to perform data identification on the message queue data in the message queue. The data identification module contains a custom data identification rule. The upstream system writes the business data into the message queue. If the message queue data is grayscale control data, the grayscale start field and grayscale end field in the grayscale control data are identified through data identification, and the corresponding grayscale status identifier is notified to the new system and the old system. If the data in the message queue is business data, the system identifier corresponding to the business data is obtained through data identification. The system identifier is used to characterize whether the business data is processed by the new system or the old system, and then the processing rules of the new system and the old system for the business data are obtained according to the system identifier, grayscale status identifier and message queue data address.

[0057] Specifically, the business data in the message queue data is extracted, the system identifier corresponding to the business data is obtained through data recognition, and the processing rules of the new system and the old system for the business data are obtained based on the system identifier, the gray state identifier and the message queue data address.

[0058] S800: Grayscale release based on the business data processing rules of the new and old systems.

[0059] Among them, according to the processing rules of business data by the new system and the old system, the old system processes business data before the grayscale release starts. After the grayscale release starts, the old system and the new system process the business data respectively. After the grayscale release is completed, the release of the new system is completed.

[0060] Specifically, grayscale release is carried out based on the processing rules of business data in the new system and the old system.

[0061] In the above-mentioned grayscale publishing method, by obtaining the message queue data and the message queue data address, extracting the grayscale control data in the message queue data, obtaining the grayscale status identifier, extracting the business data in the message queue data, obtaining the system identifier corresponding to the business data through data identification, and obtaining the processing rules of the new system and the old system for the business data according to the system identifier, the grayscale status identifier and the message queue data address, grayscale publishing is performed according to the processing rules of the new system and the old system for the business data. The scheme of the above-mentioned embodiment, by performing data identification on the business data and obtaining the system identifier corresponding to the business data, can realize that in the grayscale publishing process, the new system and the old system execute different data processing rules for different business data, thereby improving the controllability of grayscale publishing; based on the first-in-first-out characteristics of the message queue, the grayscale control data and the business data are written into the message queue, thereby realizing the control of the start and end time points of the grayscale publishing, and grayscale publishing is performed according to the grayscale status identifier and the message queue data address, thereby realizing the control of the start and end of the grayscale publishing at a specific position in the message queue, thereby further improving the controllability of the grayscale publishing.

[0062] In one embodiment, extracting grayscale control data from message queue data and obtaining a grayscale status identifier includes: extracting grayscale control data from message queue data; if the grayscale control data is grayscale start data, obtaining a grayscale start status identifier, and writing the grayscale start status identifier and the message queue data address corresponding to the grayscale start data into the key and value of the database key-value pair, respectively.

[0063] In this embodiment, the grayscale control data includes grayscale start data, the grayscale control data in the message queue data is extracted, and the grayscale control data is sent to the data identification module. The data identification module identifies the obtained grayscale control data. If the grayscale control data is grayscale start data, the grayscale start state identifier is obtained, and the grayscale start state identifier and the message queue data address corresponding to the grayscale start data are written into the key and value of the database key-value pair respectively. The key-value pair database stores data as a set of key-value pairs, wherein the key is the index of the stored data, and the value is the data stored in the corresponding key. The key-value pair is applied in the database, and has the characteristics of fast query speed and support for high concurrent queries. In a publish-subscribe messaging system, message producers are called publishers, and consumers are called subscribers. Consumers request messages from a message queue and can subscribe to one or more Topics to consume these published messages. A Topic is a specific type of message stream, and each Topic contains one or more Partitions. When a Topic stores data, the data is randomly and evenly distributed in each Partition. Partition is a physical concept. The position where each message is written into the message queue is the Offset, which is the address of the message queue data corresponding to the message queue data. The Offset increases as the message is written. Specifically, when the grayscale publishing control program writes grayscale control data to the message queue, it also inserts a piece of grayscale control data into each Partition, that is, each Partition has its own grayscale status identifier. When a message is consumed by multiple consumers, each consumer accesses a different Partition, and the time of the grayscale start status identifier consumed is also different. Therefore, the control of the grayscale status is not controlled at the granularity of an entire Topic, but is accurate to the Offset of each Partition. The message queue data address corresponding to the grayscale start state identifier and the grayscale start data is written into the key and value of the database key-value pair respectively. The Topic-Partition corresponding to the grayscale start state identifier and the Offset corresponding to the Topic-Partition can also be written into the key and value of the database key-value pair.

[0064] The scheme of the above-mentioned embodiment can realize the grayscale parallel execution and state synchronization of the new system and the old system by writing the grayscale start state identifier and the message queue data address corresponding to the grayscale start data in the database key-value pair, and can realize the control of the start time point of grayscale release based on the first-in-first-out characteristic of the message queue by extracting the grayscale control data in the message queue data, and can realize the control of the grayscale release start point according to the grayscale start state identifier, and can realize the control of the grayscale release start at a specific position in the message queue, thereby improving the controllability of grayscale release.

[0065] In another embodiment, extracting grayscale control data from the message queue data to obtain a grayscale status identifier further includes: if the grayscale control data is grayscale end data, obtaining a grayscale end status identifier and deleting an existing database key-value pair.

[0066] In this embodiment, the grayscale control data also includes grayscale end data, the grayscale control data in the message queue data is extracted, and the grayscale control data is sent to the data identification module, the data identification module identifies the obtained grayscale control data, if the grayscale control data is grayscale end data, then the grayscale end state identifier is obtained, and the existing database key-value pair is deleted. Specifically, deleting the existing database key-value pair means deleting the grayscale start state identifier in the database key-value pair key and deleting the message queue data address corresponding to the grayscale start data in the key-value pair value.

[0067] The scheme of the above-mentioned embodiment can realize grayscale parallel execution and state synchronization between the new system and the old system by obtaining the grayscale end state identifier when the grayscale control data is the grayscale end data, and deleting the grayscale start state identifier in the database key-value pair and the message queue data address corresponding to the grayscale start data. By extracting the grayscale control data in the message queue data, based on the first-in-first-out characteristic of the message queue, it is possible to control the end time point of the grayscale release, and perform grayscale release according to the grayscale end state identifier, so as to control the end of the grayscale release at a specific position in the message queue, thereby further improving the controllability of the grayscale release.

[0068] In one embodiment, Figure 3 As shown, extract the business data in the message queue data, obtain the system identifier corresponding to the business data through data identification, and obtain the processing rules of the new system and the old system for the business data according to the system identifier, the gray state identifier and the message queue data address, including:

[0069] S620, extracting business data from the message queue data, obtaining a system identifier corresponding to the business data through data identification, and reading a database key-value pair;

[0070] S640, if the key of the database key-value pair does not correspond to the grayscale start state identifier or the key of the database key-value pair is empty, the old system processes the business data;

[0071] S660: If the key of the database key-value pair corresponds to the grayscale start state identifier, the first processing rule of the new system and the old system for the business data is obtained according to the value of the database key-value pair, the message queue data address and the system identifier.

[0072] In this embodiment, the business data in the message queue data is extracted, the business data is identified by the data identification module, and the system identifier corresponding to the business data is obtained. The new system and the old system receive the system identifier and grayscale control data sent by the data identification module, and read the database key-value pair. If the key of the database key-value pair does not correspond to the grayscale start state identifier or the key of the database key-value pair is empty, the old system processes the business data, that is, the grayscale start data has not been written to the message queue, the grayscale release has not started, and the business data will be processed by the old system; if the key of the database key-value pair corresponds to the grayscale start state identifier, the first processing rule of the new system and the old system for the business data is obtained according to the value of the database key-value pair, the message queue data address and the system identifier.

[0073] The scheme of the above embodiment extracts the business data from the message queue data, obtains the system identifier corresponding to the business data through data identification, and reads the database key-value pair, and determines whether the key of the database key-value pair corresponds to the grayscale start state identifier, or determines whether the key of the database key-value pair is empty, thereby deriving the first processing rule for the business data of the new system and the old system for grayscale release. Different data processing rules are executed on different business data based on the new system and the old system, thereby improving the controllability of grayscale release.

[0074] In another embodiment, Figure 4 As shown, according to the value of the database key-value pair, the message queue data address and the system identifier, the first processing rule of the new system and the old system for the business data is obtained, including:

[0075] S662, if the data address represented by the value of the database key-value pair is greater than the message queue data address corresponding to the business data, the old system processes the business data;

[0076] S664, if the data address represented by the value of the database key-value pair is smaller than the message queue data address corresponding to the business data, then obtain the second processing rule of the new system and the old system for the business data according to the system identifier.

[0077] In this embodiment, by judging the size of the data address represented by the value of the database key-value pair and the message queue data address corresponding to the business data, if the data address represented by the value of the database key-value pair is larger than the message queue data address corresponding to the business data, the old system processes the business data, that is, the grayscale start data is written after the business data. When the business data is written, the grayscale release has not started yet, and the business data is not included in the grayscale release range, and the business data is processed by the old system; if the data address represented by the value of the database key-value pair is smaller than the message queue data address corresponding to the business data, then according to the system identifier, the second processing rule for the business data by the new system and the old system is obtained.

[0078] The scheme of the above embodiment obtains the second processing rule of the new system and the old system for the business data by judging the data address represented by the value of the database key-value pair and the size of the message queue data address corresponding to the business data, and executes different data processing rules for different business data based on the new system and the old system, thereby improving the controllability of grayscale release.

[0079] In another embodiment, Figure 5 As shown, according to the system identifier, the second processing rules of the new system and the old system for the business data are obtained, including:

[0080] S665, if the system identifier is the old system identifier, the old system processes the business data;

[0081] S666: If the system identifier is a new system identifier, the new system processes the business data.

[0082] In this embodiment, the system identifier includes the old system identifier or the new system identifier. By judging the system identifier of the business data, if the system identifier is the old system identifier, the old system processes the business data, and if the system identifier is the new system identifier, the new system processes the business data. That is, after the grayscale release begins, it is also necessary to judge whether the business data is processed by the old system or the new system according to the different system identifiers of the business data. Furthermore, the business data with the system identifier of the old system identifier has been processed in the old system and has not been released to the new system. This application will send the business data with the old system identifier to the new system for processing after all the business data with non-old system identifiers have been processed by the new system, so as to achieve complete grayscale release.

[0083] The scheme of the above-mentioned embodiment, by judging different system identifiers of business data, realizes that during the grayscale release process, the business data is diverted to the new system or the old system for processing according to the different business data. For example, if the system identifier of high-risk business data is the old system identifier, the high-risk business data will still be processed by the old system, and the new system will give priority to processing low-risk business data, which is conducive to risk control of grayscale release and further increases the controllability of grayscale release.

[0084] To explain the grayscale publishing method and its effect in this solution in detail, the following is a detailed implementation example, in which the message queue uses the Kafka message queue and the database uses the Redis database:

[0085] For the grayscale release scenario of ATM systems, which is common in the financial field, the old system of the ATM is used as the business data producer, business data is obtained from the business data producer, grayscale control data is obtained from the grayscale release controller, and business data and grayscale control data are written into the Kafka message queue to obtain the data in the message queue and the address of the message queue data; the grayscale control data in the message queue data is extracted; if the grayscale control data is grayscale start data, the grayscale start state identifier is obtained, and the grayscale start state identifier and the message queue data address corresponding to the grayscale start data are written into the key and value of the redis database key-value pair respectively. ; If the grayscale control data is grayscale end data, obtain the grayscale end state identifier, delete the existing database key-value pairs, extract the business data in the message queue data, obtain the system identifier corresponding to the business data through the data identifier, and obtain the processing rules of the new system of the ATM machine and the old system of the ATM machine for business data according to the system identifier, grayscale state identifier and message queue data address, and grayscale release is performed according to the processing rules of the new system of the ATM machine and the old system of the ATM machine for business data, and the grayscale release of the new system of the ATM machine is completed. After the business data is processed, a text message is sent to the target customer to notify the target customer that the business data processing is completed, such as Figure 6 The figure shows a schematic diagram of the grayscale release process.

[0086] Extract the business data from the message queue data, obtain the system identifier corresponding to the business data through data identification, and obtain the processing rules of the new system and the old system for the business data according to the system identifier, the grayscale state identifier and the message queue data address. Specifically, extract the business data from the message queue data, obtain the system identifier corresponding to the business data through data identification, and read the database key-value pair; if the key of the database key-value pair does not correspond to the grayscale start state identifier or the key of the database key-value pair is empty, the old system of the ATM machine processes the business data; if the key of the database key-value pair corresponds to the grayscale start state identifier, if the data address represented by the value of the database key-value pair is greater than the message queue data address corresponding to the business data, the old system of the ATM machine processes the business data; if the data address represented by the value of the database key-value pair is less than the message queue data address corresponding to the business data, if the system identifier is the old system identifier, the old system of the ATM machine processes the business data; if the system identifier is the new system identifier, the new system of the ATM machine processes the business data; grayscale publishing is performed according to the processing rules of the business data of the new system and the old system of the ATM machine, such as Figure 7 The figure shows a schematic diagram of the steps for grayscale release.

[0087] The method of the present application can also be used for the grayscale release scenario of the ATM system in the financial field. The old system of the ATM is used as the business data producer, business data is obtained from the business data producer, grayscale control data is obtained from the grayscale release controller, and the business data and grayscale control data are written into the Kafka message queue. By obtaining the processing rules of the new system of the ATM and the old system of the ATM for the business data according to the system identifier, grayscale status identifier and message queue data address, grayscale release is performed according to the processing rules of the new system of the ATM and the old system of the ATM for the business data, and the grayscale release of the new system of the ATM is completed. It should be noted that the grayscale release method and device disclosed in the present application can also be used for grayscale release in other business system scenarios, and the business system scenarios to which the grayscale release method and device disclosed in the present application are applicable are not limited.

[0088] In the above-mentioned grayscale publishing method, by obtaining the message queue data and the message queue data address, extracting the grayscale control data in the message queue data, obtaining the grayscale status identifier, extracting the business data in the message queue data, obtaining the system identifier corresponding to the business data through data identification, and obtaining the processing rules of the new system and the old system for the business data according to the system identifier, the grayscale status identifier and the message queue data address, grayscale publishing is performed according to the processing rules of the new system and the old system for the business data. The scheme of the above-mentioned embodiment, by performing data identification on the business data and obtaining the system identifier corresponding to the business data, can realize that in the grayscale publishing process, the new system and the old system execute different data processing rules for different business data, thereby improving the controllability of grayscale publishing; based on the first-in-first-out characteristics of the message queue, the grayscale control data and the business data are written into the message queue, thereby realizing the control of the start and end time points of the grayscale publishing, and grayscale publishing is performed according to the grayscale status identifier and the message queue data address, thereby realizing the control of the start and end of the grayscale publishing at a specific position in the message queue, thereby further improving the controllability of the grayscale publishing.

[0089] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0090] Based on the same inventive concept, the embodiment of the present application also provides a grayscale publishing device for implementing the grayscale publishing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more grayscale publishing device embodiments provided below can refer to the limitations of the grayscale publishing method above, and will not be repeated here.

[0091] In one embodiment, Figure 8 As shown, a grayscale publishing device 100 is provided, comprising: a data acquisition module 120, a grayscale status identification acquisition module 140, a processing rule acquisition module 160 and a grayscale publishing module 180, wherein:

[0092] The data acquisition module 120 is used to obtain message queue data and message queue data addresses.

[0093] The grayscale status identifier acquisition module 140 is used to extract the grayscale control data in the message queue data to obtain the grayscale status identifier.

[0094] The processing rule acquisition module 160 is used to extract business data from the message queue data, obtain the system identifier corresponding to the business data through data identification, and obtain the processing rules of the new system and the old system for the business data based on the system identifier, gray state identifier and message queue data address.

[0095] The grayscale publishing module 180 is used to perform grayscale publishing according to the processing rules of the new system and the old system for business data.

[0096] In the above-mentioned grayscale publishing device, by obtaining the message queue data and the message queue data address, the grayscale control data in the message queue data is extracted, the grayscale status identifier is obtained, the business data in the message queue data is extracted, the system identifier corresponding to the business data is obtained through data identification, and the processing rules of the new system and the old system for the business data are obtained according to the system identifier, the grayscale status identifier and the message queue data address, and grayscale publishing is performed according to the processing rules of the new system and the old system for the business data. The scheme of the above-mentioned embodiment, by performing data identification on the business data and obtaining the system identifier corresponding to the business data, can realize that in the grayscale publishing process, the new system and the old system execute different data processing rules for different business data, thereby improving the controllability of grayscale publishing; based on the first-in-first-out characteristics of the message queue, the grayscale control data and the business data are written into the message queue, which can realize the control of the start and end time points of the grayscale publishing, and grayscale publishing is performed according to the grayscale status identifier and the message queue data address, which can realize the control of the start and end of the grayscale publishing at a specific position in the message queue, further improving the controllability of the grayscale publishing.

[0097] In one embodiment, the grayscale status identifier acquisition module 140 is also used to extract grayscale control data from the message queue data; if the grayscale control data is grayscale start data, the grayscale start status identifier is obtained, and the message queue data address corresponding to the grayscale start status identifier and the grayscale start data is written into the key and value of the database key-value pair respectively.

[0098] In one embodiment, the grayscale status identifier acquisition module 140 is further configured to obtain a grayscale end status identifier and delete an existing database key-value pair if the grayscale control data is grayscale end data.

[0099] In one embodiment, the processing rule acquisition module 160 is also used to extract business data from the message queue data, obtain the system identifier corresponding to the business data through data identification, and read the database key-value pair; if the key of the database key-value pair does not correspond to the grayscale start state identifier or the key of the database key-value pair is empty, the old system processes the business data; if the key of the database key-value pair corresponds to the grayscale start state identifier, then according to the value of the database key-value pair, the message queue data address and the system identifier, the first processing rule of the new system and the old system for the business data is obtained.

[0100] In one embodiment, the processing rule acquisition module 160 is also used to, if the data address represented by the value of the database key-value pair is greater than the message queue data address corresponding to the business data, then the old system processes the business data; if the data address represented by the value of the database key-value pair is less than the message queue data address corresponding to the business data, then, based on the system identifier, obtain the second processing rule for the business data by the new system and the old system.

[0101] In one embodiment, the processing rule acquisition module 160 is further configured to, if the system identifier is an old system identifier, process the service data using the old system; and, if the system identifier is a new system identifier, process the service data using the new system.

[0102] Each module in the above-mentioned grayscale publishing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0103] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig. 9As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store a grayscale start state identifier and a message queue data address. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a grayscale publishing method is implemented.

[0104] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0105] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0106] Get the message queue data and the message queue data address;

[0107] Extract the grayscale control data in the message queue data to obtain the grayscale state identifier;

[0108] Extract the business data from the message queue data, obtain the system ID corresponding to the business data through data recognition, and obtain the processing rules of the new system and the old system for the business data based on the system ID, grayscale status ID and message queue data address;

[0109] Grayscale release is carried out based on the processing rules of business data in the new and old systems.

[0110] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0111] Extract the grayscale control data in the message queue data; if the grayscale control data is grayscale start data, obtain the grayscale start state identifier, and write the grayscale start state identifier and the message queue data address corresponding to the grayscale start data into the key and value of the database key-value pair respectively.

[0112] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0113] If the grayscale control data is grayscale end data, a grayscale end state identifier is obtained and the existing database key-value pair is deleted.

[0114] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0115] Extract the business data from the message queue data, obtain the system identifier corresponding to the business data through data identification, and read the database key-value pair; if the key of the database key-value pair does not correspond to the grayscale start state identifier or the key of the database key-value pair is empty, the old system processes the business data; if the key of the database key-value pair corresponds to the grayscale start state identifier, obtain the first processing rule of the new system and the old system for the business data according to the value of the database key-value pair, the message queue data address and the system identifier.

[0116] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0117] If the data address represented by the value of the database key-value pair is greater than the message queue data address corresponding to the business data, the old system processes the business data; if the data address represented by the value of the database key-value pair is less than the message queue data address corresponding to the business data, the second processing rule for the business data of the new system and the old system is obtained according to the system identifier.

[0118] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0119] If the system identifier is the old system identifier, the old system processes the business data; if the system identifier is the new system identifier, the new system processes the business data.

[0120] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0121] Get the message queue data and the message queue data address;

[0122] Extract the grayscale control data in the message queue data to obtain the grayscale state identifier;

[0123] Extract the business data from the message queue data, obtain the system ID corresponding to the business data through data recognition, and obtain the processing rules of the new system and the old system for the business data based on the system ID, grayscale status ID and message queue data address;

[0124] Grayscale release is carried out based on the processing rules of business data in the new and old systems.

[0125] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0126] Extract the grayscale control data in the message queue data; if the grayscale control data is grayscale start data, obtain the grayscale start state identifier, and write the grayscale start state identifier and the message queue data address corresponding to the grayscale start data into the key and value of the database key-value pair respectively.

[0127] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0128] If the grayscale control data is grayscale end data, a grayscale end state identifier is obtained and the existing database key-value pair is deleted.

[0129] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0130] Extract the business data from the message queue data, obtain the system identifier corresponding to the business data through data identification, and read the database key-value pair; if the key of the database key-value pair does not correspond to the grayscale start state identifier or the key of the database key-value pair is empty, the old system processes the business data; if the key of the database key-value pair corresponds to the grayscale start state identifier, obtain the first processing rule of the new system and the old system for the business data according to the value of the database key-value pair, the message queue data address and the system identifier.

[0131] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0132] If the data address represented by the value of the database key-value pair is greater than the message queue data address corresponding to the business data, the old system processes the business data; if the data address represented by the value of the database key-value pair is less than the message queue data address corresponding to the business data, the second processing rule for the business data of the new system and the old system is obtained according to the system identifier.

[0133] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0134] If the system identifier is the old system identifier, the old system processes the business data; if the system identifier is the new system identifier, the new system processes the business data.

[0135] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0136] Get the message queue data and the message queue data address;

[0137] Extract the grayscale control data in the message queue data to obtain the grayscale state identifier;

[0138] Extract the business data from the message queue data, obtain the system ID corresponding to the business data through data recognition, and obtain the processing rules of the new system and the old system for the business data based on the system ID, grayscale status ID and message queue data address;

[0139] Grayscale release is carried out based on the processing rules of business data in the new and old systems.

[0140] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0141] Extract the grayscale control data in the message queue data; if the grayscale control data is grayscale start data, obtain the grayscale start state identifier, and write the grayscale start state identifier and the message queue data address corresponding to the grayscale start data into the key and value of the database key-value pair respectively.

[0142] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0143] If the grayscale control data is grayscale end data, a grayscale end state identifier is obtained and the existing database key-value pair is deleted.

[0144] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0145] Extract the business data from the message queue data, obtain the system identifier corresponding to the business data through data identification, and read the database key-value pair; if the key of the database key-value pair does not correspond to the grayscale start state identifier or the key of the database key-value pair is empty, the old system processes the business data; if the key of the database key-value pair corresponds to the grayscale start state identifier, obtain the first processing rule of the new system and the old system for the business data according to the value of the database key-value pair, the message queue data address and the system identifier.

[0146] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0147] If the data address represented by the value of the database key-value pair is greater than the message queue data address corresponding to the business data, the old system processes the business data; if the data address represented by the value of the database key-value pair is less than the message queue data address corresponding to the business data, the second processing rule for the business data of the new system and the old system is obtained according to the system identifier.

[0148] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0149] If the system identifier is the old system identifier, the old system processes the business data; if the system identifier is the new system identifier, the new system processes the business data.

[0150] It should be noted that the grayscale release method and device disclosed in the present application can be used for grayscale release in the financial field, and can also be used for grayscale release in any field other than the financial field. The application field of the grayscale release method and device disclosed in the present application is not limited. The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0151] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0152] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0153] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A grayscale release method, characterized in that: The method comprises: Get the message queue data and the message queue data address; Extracting grayscale control data from the message queue data to obtain a grayscale state identifier; Extracting the business data from the message queue data, obtaining the system identifier corresponding to the business data through data identification, and obtaining the processing rules of the new system and the old system for the business data according to the system identifier, the gray state identifier and the message queue data address; The processing rules of the business data are released in phases according to the new system and the old system. Among them, the grayscale control data is a special data written by the grayscale release control program to the message queue with a grayscale start or grayscale end field attached; The grayscale state flag is used to indicate the grayscale start state or grayscale end state; The message queue data address is the address where the message is recorded in the message queue; The extracting the grayscale control data in the message queue data to obtain the grayscale state identifier comprises: Extracting grayscale control data from the message queue data; If the grayscale control data is grayscale start data, a grayscale start state identifier is obtained, and the grayscale start state identifier and the message queue data address corresponding to the grayscale start data are written into the key and value of the database key-value pair respectively; The extracting the business data from the message queue data, obtaining the system identifier corresponding to the business data through data identification, and obtaining the processing rules of the new system and the old system for the business data according to the system identifier, the gray state identifier and the message queue data address includes: Extracting business data from the message queue data, obtaining a system identifier corresponding to the business data through data identification, and reading the database key-value pair; If the key of the database key-value pair does not correspond to the grayscale start state identifier or the key of the database key-value pair is empty, the old system processes the business data; If the key of the database key-value pair corresponds to the grayscale start state identifier, then according to the value of the database key-value pair, the message queue data address and the system identifier, obtain the first processing rule of the new system and the old system for the business data, The obtaining of the first processing rule of the new system and the old system for the business data according to the value of the database key-value pair, the message queue data address and the system identifier comprises: If the data address represented by the value of the database key-value pair is greater than the message queue data address corresponding to the business data, the old system processes the business data; If the data address represented by the value of the database key-value pair is smaller than the message queue data address corresponding to the business data, obtaining a second processing rule of the new system and the old system for the business data according to the system identifier; The obtaining, according to the system identifier, a second processing rule of the new system and the old system for the business data comprises: If the system identifier is an old system identifier, the old system processes the business data; If the system identifier is a new system identifier, the new system processes the service data.

2. The grayscale release method according to claim 1, characterized in that: The extracting the grayscale control data in the message queue data to obtain the grayscale state identifier also includes: If the grayscale control data is grayscale end data, a grayscale end state identifier is obtained, and the existing database key-value pair is deleted.

3. A grayscale release device, characterized in that: The device comprises: A data acquisition module is used to obtain message queue data and message queue data address; A grayscale status identification acquisition module, used to extract grayscale control data from the message queue data to obtain a grayscale status identification; A processing rule acquisition module, used to extract the business data in the message queue data, obtain the system identifier corresponding to the business data through data identification, and obtain the processing rules of the new system and the old system for the business data according to the system identifier, the gray state identifier and the message queue data address; A grayscale release module is used to perform grayscale release according to the processing rules of the new system and the old system for the business data. Among them, the grayscale control data is a special data written by the grayscale release control program to the message queue with a grayscale start or grayscale end field attached; The grayscale state flag is used to indicate the grayscale start state or grayscale end state; The message queue data address is the address where the message is recorded in the message queue; The extracting the grayscale control data in the message queue data to obtain the grayscale state identifier comprises: Extracting grayscale control data from the message queue data; If the grayscale control data is grayscale start data, a grayscale start state identifier is obtained, and the grayscale start state identifier and the message queue data address corresponding to the grayscale start data are written into the key and value of the database key-value pair respectively; The extracting the business data from the message queue data, obtaining the system identifier corresponding to the business data through data identification, and obtaining the processing rules of the new system and the old system for the business data according to the system identifier, the gray state identifier and the message queue data address includes: Extracting business data from the message queue data, obtaining a system identifier corresponding to the business data through data identification, and reading the database key-value pair; If the key of the database key-value pair does not correspond to the grayscale start state identifier or the key of the database key-value pair is empty, the old system processes the business data; If the key of the database key-value pair corresponds to the grayscale start state identifier, then according to the value of the database key-value pair, the message queue data address and the system identifier, obtain the first processing rule of the new system and the old system for the business data, The obtaining of the first processing rule of the new system and the old system for the business data according to the value of the database key-value pair, the message queue data address and the system identifier comprises: If the data address represented by the value of the database key-value pair is greater than the message queue data address corresponding to the business data, the old system processes the business data; If the data address represented by the value of the database key-value pair is smaller than the message queue data address corresponding to the business data, obtaining a second processing rule of the new system and the old system for the business data according to the system identifier; The obtaining, according to the system identifier, a second processing rule of the new system and the old system for the business data comprises: If the system identifier is an old system identifier, the old system processes the business data; If the system identifier is a new system identifier, the new system processes the service data.

4. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 2 are implemented.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.

6. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.

Citation Information

Patent Citations

  • Data synchronization method, device and system

    CN106385382A

  • Gray release method, application server and gray release system

    CN113014651A