CN113722297A - Order system reconstruction smooth migration method - Google Patents
Order system reconstruction smooth migration method Download PDFInfo
- Publication number
- CN113722297A CN113722297A CN202111075217.5A CN202111075217A CN113722297A CN 113722297 A CN113722297 A CN 113722297A CN 202111075217 A CN202111075217 A CN 202111075217A CN 113722297 A CN113722297 A CN 113722297A
- Authority
- CN
- China
- Prior art keywords
- order
- new
- order system
- original
- reconstructed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 14
- 230000005012 migration Effects 0.000 title claims abstract description 14
- 238000013508 migration Methods 0.000 title claims abstract description 14
- 230000002457 bidirectional effect Effects 0.000 claims abstract description 8
- 230000001360 synchronised effect Effects 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000001914 filtration Methods 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/214—Database migration support
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2433—Query languages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/06—Buying, selling or leasing transactions
- G06Q30/0601—Electronic shopping [e-shopping]
- G06Q30/0633—Lists, e.g. purchase orders, compilation or processing
- G06Q30/0635—Processing of requisition or of purchase orders
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Computational Linguistics (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Mathematical Physics (AREA)
- Computing Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a smooth migration method for order system reconstruction, which comprises the following steps: reconstructing an original order system in a network taxi appointment scene to obtain a reconstructed order system; and smoothly migrating the reconstructed order system to a new service system to obtain a new system. The data bidirectional synchronization ensures that the new database data and the original database data are completely the same, and the gray level scheme ensures that the request to a new service system and an original order system can be controlled at any time. And the request of the new service system is smoothly increased from small to large, and if any problem is found in the reconstructed new order system, the flow is switched back to the original order system at any time, so that the reconstruction risk is reduced.
Description
Technical Field
The invention relates to the field of network appointment, in particular to a method for reconstructing and smoothly transferring an order system.
Background
With the development of services, the data volume of the order system database is larger and larger, a performance bottleneck occurs, and a single database list cannot be expanded horizontally. The order system reconstruction comprises the steps of improving the interface service flow of the original order system and dividing databases into databases and tables while the stable operation of the original service is not influenced, so that the later-stage horizontal expansion is facilitated, and the smooth migration and transition to a new system are realized.
The original order system service needs to be independent as a premise, and the database authority needs to be recovered, so that only the service system is called and cannot be influenced by other systems.
Disclosure of Invention
In view of the above, the present invention has been developed to provide an order system reconfiguration smooth migration method that overcomes or at least partially solves the above-mentioned problems.
According to one aspect of the invention, an order system reconstruction smooth migration method is provided, and the smooth migration method comprises the following steps:
reconstructing an original order system in a network taxi appointment scene to obtain a reconstructed order system;
and smoothly migrating the reconstructed order system to a new service system to obtain a new system.
Optionally, the reconstructing the original order system in the network appointment scene, and the obtaining the reconstructed order system specifically includes:
the basic information of the original order system comprises: table structure and original order number rules;
the table structure includes: table name, library name, order table structure;
the original order number rule includes: second-level time + machine number + self-increment sequence;
the table structure of the reconstructed order is the same as that of the original order system;
the order number rule of the reconstructed order is the new order identification N + second-level time + machine number +
Self-increment sequence + table number; the table number is the user ID% of the number of sub-tables.
Optionally, the basic information of the restructured order further includes: and (5) analyzing a query scene.
Optionally, smoothly migrating the reconstructed order system to a new service system, and obtaining the new system specifically includes:
creating a new order;
updating, canceling and inquiring the order according to the order number;
inquiring an order list according to the user ID;
and establishing a data bidirectional synchronous project.
Optionally, the establishing a data bidirectional synchronization project specifically includes:
synchronizing the new order to the original order system;
the original order system is synchronized to the new order system.
The invention provides a smooth migration method for order system reconstruction, which comprises the following steps: reconstructing an original order system in a network taxi appointment scene to obtain a reconstructed order system; and smoothly migrating the reconstructed order system to a new service system to obtain a new system. The data bidirectional synchronization ensures that the new database data and the original database data are completely the same, and the gray level scheme ensures that the request to a new service system and an original order system can be controlled at any time. And the request of the new service system is smoothly increased from small to large, and if any problem is found in the reconstructed new order system, the flow is switched back to the original order system at any time, so that the reconstruction risk is reduced.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of an original order system according to an embodiment of the present invention;
FIG. 2 is a block diagram of a new ordering system according to an embodiment of the present invention;
fig. 3 is a schematic diagram of smooth migration from an original order system to a new order system according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The terms "comprises" and "comprising," and any variations thereof, in the present description and claims and drawings are intended to cover a non-exclusive inclusion, such as a list of steps or elements.
The technical solution of the present invention is further described in detail with reference to the accompanying drawings and embodiments.
The interface of the client side dispatching server side is unchanged, and the database of the new order system is used as a partitioned KEY sub-database and sub-table according to the user ID (user _ ID). The data is summarized to a search system.
The gray scale period is guaranteed to be switched back to the original state at any time. Therefore, the new database and the original database need to be synchronized in two directions, and the bottom data is ensured to be completely consistent.
The basic information of the original order system before reconstruction comprises the following steps: the table structure includes: the table name is order _ table; library name db.
Order table structure:
note that the table lists only a portion of the core fields
Order number | User ID | Time of using vehicle | Creation time |
order_no | user_id | booking_date | create_date |
The original order number rule is second-level time (14 bits) + machine number (3 bits) + self-increment sequence (4 bits). Such as 202108261100000010001. The original order system architecture diagram is shown in fig. 1.
The basic situation of the new order system after reconstruction is as follows: table structure: the new table structure is not changed
The quantity of the sub-meters is as follows: 256 of; the number of the sub-banks: 4;
the table name is: order _ table _000 to order _ table _ 255; the library names db _0 to db _ 3.
Order form structure note that the form lists only part of the core fields
Order number | User ID | Time of using vehicle | Creation time |
order_no | user_id | booking_date | create_date |
The order number rule is that the new order mark N (1 bit), the second time (14 bits), the machine number (3 bits), the self-increment sequence (4 bits) and the table number (3 bits). For example, N202108261100000010001255. And (4) calculating the table number, namely the table number is equal to the user ID% of the sub-table number.
The new order system architecture is shown in fig. 2.
And (3) query scene analysis: according to the order _ no query scene, querying the database, solving the table number by three-digit inversion after the order number, and directly routing to the corresponding database table by the order number query, for example, the order number N202108261100000010001255 is stored in the order _ table _255 table. According to the user _ id query, the database is queried and can be routed to the corresponding database table through the user _ id% 256.
And querying a search system by using non-order _ no and user _ id queries.
The method for smoothly transferring the original order system to the new order system is specifically shown in fig. 3, and specifically includes a gray module.
The gray level module is classified according to interface operation and is divided into the following scenes 1, order creation 2, order updating, canceling and order inquiring according to order numbers, and 3, order list inquiring according to user ID.
And (3) creating an order, inquiring a list according to the user ID, supporting a white list (facilitating the test of testers) according to the gray level of the flow, and gradually increasing the gray level flow from small to large according to multiple stages. In the following, a gradation ratio is set by taking the gradation base 1000 as an example, X is an arrangement gradation value, and Y is a random number (may be a self-increment count).
The judgment mode is that if the value of Y% 1000 is more than X is true, the new order system is hit, otherwise, the original order system is hit.
| Stage | 1 | Stage 2 | Stage 3 | Stage 4 | Stage 5 | Stage 6 |
Value of X | 0 | 1 | 10 | 100 | 500 | 1000 | |
Flow rate ratio | 0 | 1‰ | 10‰ | 100‰ | 500‰ | 1000‰ |
According to the order number updating, canceling and inquiring the order, the order number is analyzed to distinguish the new order from the original order.
And if the prefix of the order number is N, the order number is a new order system order, the new system is hit, the new order system interface is taken, and otherwise, the original order system order interface is taken.
Data bidirectional synchronization engineering, and the step of synchronizing a new order to an old order system: and intercepting the data writing SQL of the new order.
And (3) analysis: the SQL statement is parsed out of the operation (insert, update, delete), the order number (e.g., N202108261100000010001255), the table name (order _ table _ xxx), and the parameters.
And (3) filtering: old system orders, i.e., non-N-top orders, are filtered out to prevent data backflow.
Conversion: the table name order _ table _ XXX becomes the old system table order _ table.
Generating: and generating SQL corresponding to the old system order table, and finally writing the SQL into an old order system database.
The original order system synchronizes to the new order system: intercepting the old order data write SQL, and analyzing the SQL statement to obtain an operation (insert, update, delete), an order number (202108261100000010002 for example), a user ID (if the SQL statement does not exist, the order table is inquired to obtain), a table name (order _ table) and parameters.
And (3) filtering: and filtering new system orders, and N starting orders to prevent data backflow.
Conversion: according to the table name order _ table, the user ID is divided into the base and table routing strategies according to the new system, and the user ID% 256 is changed into the corresponding table order _ table _ XXX of the new system (XXX is the result after the user ID% 256 is subjected to modulus extraction, and the front of less than three bits is supplemented with 0).
And generating SQL corresponding to the new system order table, and finally writing the SQL into a new order system database.
Has the advantages that: reconstructing an order system to improve the system performance; the data bidirectional synchronization ensures that the data of the new database and the data of the old database are completely the same, the gray level scheme ensures that the request can be controlled at any time to the new order system and the old order system, the request of the new order system is smoothly increased from small to large, and if any problem is found in the reconstructed new order system in the period, the flow can be switched back to the old order system at any time, so that the reconstruction risk is reduced.
The above embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, it should be understood that the above embodiments are merely exemplary embodiments of the present invention and are not intended to limit the scope of the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (5)
1. An order system reconstruction smooth migration method is characterized by comprising the following steps:
reconstructing an original order system in a network taxi appointment scene to obtain a reconstructed order system;
and smoothly migrating the reconstructed order system to a new service system to obtain a new system.
2. The order system reconstruction smooth migration method according to claim 1, wherein the original order system reconstruction in the network appointment scene specifically includes:
the basic information of the original order system comprises: table structure and original order number rules;
the table structure includes: table name, library name, order table structure;
the original order number rule includes: second-level time + machine number + self-increment sequence;
the table structure of the reconstructed order is the same as that of the original order system;
the order number rule of the reconstructed order is a new order identification N + second-level time + machine number + self-increment sequence + table number; the table number is the user ID% of the number of sub-tables.
3. The order system reconstruction smooth migration method according to claim 2, wherein the reconstructing basic information of the order further comprises: and (5) analyzing a query scene.
4. The order system reconstruction smooth migration method according to claim 1, wherein smoothly migrating the reconstructed order system to a new service system, and obtaining the new system specifically comprises:
creating a new order;
updating, canceling and inquiring the order according to the order number;
inquiring an order list according to the user ID;
and establishing a data bidirectional synchronous project.
5. The order system reconstruction smooth migration method according to claim 4, wherein the establishing of the data bidirectional synchronization project specifically comprises:
synchronizing the new order to the original order system;
the original order system is synchronized to the new order system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111075217.5A CN113722297A (en) | 2021-09-14 | 2021-09-14 | Order system reconstruction smooth migration method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111075217.5A CN113722297A (en) | 2021-09-14 | 2021-09-14 | Order system reconstruction smooth migration method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113722297A true CN113722297A (en) | 2021-11-30 |
Family
ID=78683656
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111075217.5A Pending CN113722297A (en) | 2021-09-14 | 2021-09-14 | Order system reconstruction smooth migration method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113722297A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114445184A (en) * | 2022-01-27 | 2022-05-06 | 聚好看科技股份有限公司 | Order flow playback method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7492882B1 (en) * | 2004-03-01 | 2009-02-17 | Embarq Holdings Company, Llc | C2P provisioning late-breaking scenarios |
CN107391758A (en) * | 2017-08-24 | 2017-11-24 | 阿里巴巴集团控股有限公司 | Database switching method, device and equipment |
CN108073688A (en) * | 2017-11-20 | 2018-05-25 | 苏宁云商集团股份有限公司 | A kind of method and device of Data Migration |
CN112860670A (en) * | 2021-03-29 | 2021-05-28 | 中信银行股份有限公司 | Data migration method and device, electronic equipment and computer storage medium |
CN112925848A (en) * | 2021-02-23 | 2021-06-08 | 马上消费金融股份有限公司 | Data synchronization method, device, equipment and readable storage medium |
CN113240499A (en) * | 2021-06-08 | 2021-08-10 | 京东数科海益信息科技有限公司 | Order processing method and device based on system switching |
-
2021
- 2021-09-14 CN CN202111075217.5A patent/CN113722297A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7492882B1 (en) * | 2004-03-01 | 2009-02-17 | Embarq Holdings Company, Llc | C2P provisioning late-breaking scenarios |
CN107391758A (en) * | 2017-08-24 | 2017-11-24 | 阿里巴巴集团控股有限公司 | Database switching method, device and equipment |
CN108073688A (en) * | 2017-11-20 | 2018-05-25 | 苏宁云商集团股份有限公司 | A kind of method and device of Data Migration |
CN112925848A (en) * | 2021-02-23 | 2021-06-08 | 马上消费金融股份有限公司 | Data synchronization method, device, equipment and readable storage medium |
CN112860670A (en) * | 2021-03-29 | 2021-05-28 | 中信银行股份有限公司 | Data migration method and device, electronic equipment and computer storage medium |
CN113240499A (en) * | 2021-06-08 | 2021-08-10 | 京东数科海益信息科技有限公司 | Order processing method and device based on system switching |
Non-Patent Citations (2)
Title |
---|
LARRYHAI6: "架构设计参考项目系列主题:日订单量达到100万单后,我们做了订单中心重构", pages 1 - 8, Retrieved from the Internet <URL:https://blog.csdn.net/u011537073/article/details/117526180> * |
浅谈架构: "浅谈订单重构之MySQL分库分表实战篇", pages 1 - 8, Retrieved from the Internet <URL:https://blog.csdn.net/weixin_38130500/article/details/120148195> * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114445184A (en) * | 2022-01-27 | 2022-05-06 | 聚好看科技股份有限公司 | Order flow playback method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107818115B (en) | Method and device for processing data table | |
CN101313300B (en) | Local search | |
US11061924B2 (en) | Multi-region, multi-master replication of database tables | |
KR101069350B1 (en) | Architecture for partition computation and propagation of changes in data replication | |
CN100454311C (en) | Data synchronous method and device based on SQL | |
CN106033436A (en) | Merging method for database | |
CN106934048A (en) | Online data moving method, agent node | |
CN100579133C (en) | Method for generating ID symbol | |
CN109271394B (en) | Data batch insertion updating implementation method based on ID cache | |
US20080270352A1 (en) | Modifying entry names in directory server | |
CN108363791A (en) | A kind of method of data synchronization and device of database | |
CN111460240B (en) | Cross-region multi-activity micro-service architecture page turning data query method and device | |
CN113722297A (en) | Order system reconstruction smooth migration method | |
CN111666344A (en) | Heterogeneous data synchronization method and device | |
CN116756253B (en) | Data storage and query methods, devices, equipment and media of relational database | |
US6996577B1 (en) | Method and system for automatically grouping objects in a directory system based on their access patterns | |
CN103885950A (en) | Method and device for acquiring correspondence between abbreviations and POI | |
CN101431429B (en) | Information management method for physical entity in equipment, equipment and equipment management terminal | |
CN113760907A (en) | Data uniqueness identification method in database | |
CN105205122A (en) | Telecommunication service retrieval method based on data synchronization | |
CN112231285A (en) | Knowledge graph generation method and device based on data resources | |
CN115203227B (en) | Automatic element thematic map layer updating method based on Web GIS | |
CN114186371B (en) | Pipe network data dynamic service system capable of sharing and exchanging | |
JP4106601B2 (en) | Update information generation system and update information generation program for directory information | |
CN115729899A (en) | Streaming data real-time updating, inserting and merging processing method based on distributed file system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |