Database Alternatives for Electricity Marketing

By sorting out the business of the electric power marketing business system and classifying database types, and selecting a suitable domestic database, the problem of poor performance of the electric power marketing business system in the traditional method was solved, and the smooth progress of localized replacement of the database and performance improvement were achieved.

CN118363947BActive Publication Date: 2024-09-17INFORMATION & COMM CO OF STATE GRID SHAANXI ELECTRIC POWER CO LTD +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202410799884.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-09-17
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

The traditional database localization alternative method fails to fully consider the actual needs and business characteristics of the power marketing business system. As a result, the business performance of the cloud power marketing business system cannot meet expectations, affecting the power consumption experience of power customers.

Method used

By sorting out the business of the power marketing business system, the business data flow is divided into transactional and analytical types, and appropriate domestic databases are selected respectively, and the target database is determined through scoring standards to achieve data migration and joint debugging to ensure system performance after replacement. and security.

Benefits of technology

It has realized the smooth localized replacement of the database of the electric power marketing business system, greatly improved data security and business performance, and improved the electricity purchasing experience of electric power customers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118363947B
    Figure CN118363947B
Patent Text Reader

Abstract

The embodiment of the present application relates to the technical field of domestic database replacement, and discloses a database replacement method for power marketing business, including: dividing the business data flow in the power marketing business system into transactional business data flow and analytical business data flow; dividing the domestic databases in the replacement candidate pool into transactional domestic databases and analytical domestic databases; scoring the transactional domestic databases and analytical domestic databases, and determining the target transactional domestic database and the target analytical domestic database based on the scores; migrating the transactional business data flow to the target transactional domestic database, and migrating the analytical business data flow to the target analytical domestic database; conducting business joint debugging and testing on the power marketing business system after database replacement, and releasing the power marketing business system after database replacement when business standards are met. This method smoothly realizes the domestic replacement of databases and greatly improves data security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of domestic database replacement technology, and in particular to a database replacement method for power marketing business. Background Art

[0002] With the rapid development and rapid iteration of information technology, the microservice transformation of information systems and cloud deployment has become a mainstream trend. As an important part of the information system, the database will also be upgraded and transformed along with the information system. The traditional database services that are directly deployed on the server through middleware such as tomcat, weblogic, nginx, and Oracle, Mysql, etc. can no longer meet the business needs after the information system is on the cloud, so it is necessary to carry out information system database transformation and upgrade. In recent years, domestic database technology has become increasingly mature, and its integration with cloud platforms has become increasingly close and perfect. Therefore, migrating data from traditional Oracle and other databases to the cloud and using domestic databases on the cloud platform instead of non-domestic databases such as Oracle are very advantageous in terms of business performance, economic benefits, and security.

[0003] The power marketing business system is an important production and trading system that serves the national economy and people's livelihood. It is related to the electricity demand of the majority of power customers. It is very necessary to move the power marketing business system to the cloud and use domestic databases to replace the non-domestic databases used in the original power marketing business system.

[0004] The patent with publication number CN117033167A discloses a database testing method. The method first obtains simulated traffic data of one or more business applications, and further, synchronously injects the simulated traffic data into multiple ChaosBlade (an open source chaos experiment injection tool) chaos contacts to test the performance of multiple databases under the same test environment, and finally obtains the performance indicators of multiple databases for comparative display, thereby realizing adaptation testing of multiple databases under a fair test environment. Through chaos experiments, multiple databases are tested by automatically simulating different production scenarios or failure scenarios and the usage requirements of business traffic in the scenarios. Multiple databases can be tested simultaneously while ensuring the fairness of the test, and finally the most suitable domestic database is selected to realize domestic database replacement, thereby improving the efficiency of database testing and replacement and greatly reducing the waste of human resources.

[0005] However, this method of domestic database replacement simply selects the most suitable domestic database for overall database replacement without considering the actual needs and business characteristics of the power marketing business system, and does not introduce the idea of ​​distributed database into the process of database domestic replacement. As a result, after the completion of the database domestic replacement, the business performance of the cloud power marketing business system does not meet expectations, which brings a bad service experience to power customers purchasing electricity and cannot meet the electricity needs of power customers. Summary of the invention

[0006] The purpose of the embodiments of the present application is to provide a database replacement method for power marketing business, which can smoothly realize the localization replacement of the database of the power marketing business system, greatly improve data security, ensure that the cloud-based power marketing business system has good business performance, and improve the user experience of power customers in purchasing electricity.

[0007] In order to solve the above technical problems, an embodiment of the present application provides a database replacement method for power marketing business, comprising the following steps: performing business combing on the power marketing business system, dividing the business data flow in the power marketing business system into transactional business data flow and analytical business data flow according to the business type; based on the business type of the business data flow in the power marketing business system, dividing several domestic databases in a preset replacement candidate pool into transactional domestic databases and analytical domestic databases; using a preset transactional scoring standard, combined with the performance indicators of each transactional domestic database, scoring each transactional domestic database, determining a target transactional domestic database based on the score of each transactional domestic database, and at the same time, using The preset analytical scoring criteria are combined with the performance indicators of each analytical domestic database to score each analytical domestic database, and the target analytical domestic database is determined based on the score of each analytical domestic database; by modifying the application configuration of the power marketing business system, the connection with the target transactional domestic database and the target analytical domestic database is achieved, the transactional business data flow is migrated to the target transactional domestic database, and the analytical business data flow is migrated to the target analytical domestic database; the power marketing business system after the database is replaced is carried out with business joint debugging and testing, and when the results of the business joint debugging and testing meet the preset business standards, the power marketing business system after the database is replaced is released.

[0008] The embodiment of the present application also provides a database replacement system for power marketing business, including: a business combing module, used to comb the power marketing business system, and divide the business data flow in the power marketing business system into transactional business data flow and analytical business data flow according to the business type; a database classification module, used to divide a number of domestic databases in a preset replacement candidate pool into transactional domestic databases and analytical domestic databases based on the business type of the business data flow in the power marketing business system; a database scoring module, used to score each transactional domestic database by using a preset transactional scoring standard and combining the performance indicators of each transactional domestic database, and determine the target transactional domestic database based on the score of each transactional domestic database, and at the same time, use A preset analytical scoring standard is used to score each analytical domestic database in combination with its performance indicators, and a target analytical domestic database is determined based on the score of each analytical domestic database; a replacement execution module is used to achieve connection with the target transactional domestic database and the target analytical domestic database by modifying the application configuration of the power marketing business system, migrate the transactional business data flow to the target transactional domestic database, and migrate the analytical business data flow to the target analytical domestic database; a testing module is used to carry out business joint debugging and testing on the power marketing business system after database replacement, and release the power marketing business system after database replacement when the results of the business joint debugging and testing meet the preset business standards.

[0009] An embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned database replacement method for power marketing business.

[0010] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned database replacement method for power marketing business.

[0011] The database replacement method for power marketing business provided in the embodiment of the present application first conducts business combing on the power marketing business system, divides the business data flow in the power marketing business system into transactional business data flow and analytical business data flow according to the business type, divides the domestic databases in the replacement candidate pool into transactional domestic databases and analytical domestic databases, and then scores each transactional domestic database and each analytical domestic database based on the performance indicators concerned by the transactional domestic database and the performance indicators concerned by the analytical domestic database, respectively, determines the target transactional domestic database and the target analytical domestic database, migrates the transactional business data flow to the target transactional domestic database, and migrates the analytical business data flow to the target analytical domestic database, and finally conducts business joint debugging and testing on the power marketing business system after database replacement, and releases the power marketing business system after database replacement when the results of the business joint debugging and testing meet the preset business standards, thereby smoothly realizing the domestic replacement of the database of the power marketing business system, while greatly improving data security, effectively ensuring that the cloud-based power marketing business system has good business performance, and greatly improving the user experience of power customers purchasing electricity.

[0012] In some optional embodiments, the transactional business data flow includes: system login service, archive storage service, remote fee control service, remote recharge service, terminal login service, terminal online rate query service and fee control recharge status query service; the analytical business data flow includes: historical business, historical business query service, collection success rate query service, substation line loss query service, metering abnormality monitoring service, collection completeness rate query service, distribution transformer load analysis service and external real-time publishing service; the transactional domestic databases include: GaussDB database, OceanBase database, DAMO database, KingBase database and TDSQL database; the analytical domestic databases include: DWS database, GBase database and TDSQL-A database.

[0013] In some optional embodiments, when the business data stream in the power marketing business system is divided into a transactional business data stream and an analytical business data stream according to the business type, the method further includes: dividing the batch low-latency transactional business data stream into an analytical business data stream. The batch low-latency transactional business data stream does not have very strict performance requirements on the database, so it can be divided into an analytical business data stream, which reduces the pressure on the transactional domestic database to a certain extent in the subsequent process.

[0014] In some optional embodiments, the target transactional domestic database is a GaussDB database, the target analytical domestic database is a DWS database, and the migrating of the transactional business data stream to the target transactional domestic database and the migrating of the analytical business data stream to the target analytical domestic database includes: migrating the business data streams of the system login business, the archive storage business, the remote fee control business, the remote recharge business, the terminal login business, the terminal online rate query business, and the fee control recharge status query business to the GaussDB database for storage; migrating the business data streams of the historical business to the DWS The business data streams of the historical business query service, the acquisition success rate query service, the substation line loss query service, the metering anomaly monitoring service, the acquisition completeness rate query service and the distribution transformer load analysis service are migrated to the data lake of the DWS database for storage; the batch low-latency transactional business data stream is migrated to the Flink component in the MRS cluster of the data center of the DWS database for storage; the business data stream of the external real-time publishing service is migrated to the Kafka component in the MRS cluster of the data center of the DWS database for storage. Different transactional business data streams and different analytical business data streams can be stored in different components of the target transactional domestic database and the target analytical domestic database. Such a design makes the storage of data streams more reasonable and avoids mutual influence and contamination between data streams.

[0015] In some optional embodiments, the performance indicators of the transactional domestic database include: response time indicator, throughput indicator, concurrency indicator, database I / O indicator, single transaction database read and write times indicator, reliability indicator, availability indicator, scalability indicator, data integrity indicator, security indicator, manageability indicator and construction and operation cost indicator;

[0016] The preset transactional scoring standard is used to score each transactional domestic database in combination with the performance indicators of each transactional domestic database, which is achieved through the following formula:

[0017]

[0018]

[0019] in, Indicates the first The scores of transactional domestic databases, Indicates the weight corresponding to the response time indicator, represents the weight corresponding to the throughput indicator, Indicates the weight corresponding to the concurrency capability indicator, Indicates the weight corresponding to the database I / O indicator, Indicates the weight corresponding to the database read and write times indicator of the single transaction, represents the weight corresponding to the reliability index, represents the weight corresponding to the availability indicator, represents the weight corresponding to the scalability index, represents the weight corresponding to the data integrity indicator, represents the weight corresponding to the security indicator, represents the weight corresponding to the manageability indicator, Indicates the weight corresponding to the construction and operation cost indicator, Indicates the The scores of transactional domestic databases for the response time indicators are: Indicates the The scores of transactional domestic databases for the throughput indicators are: Indicates the The scores of transactional domestic databases for the concurrency capability indicators are: Indicates the The scores of transactional domestic databases for the database I / O indicators, Indicates the The score of the transactional domestic database for the database read and write times of the single transaction, Indicates the The scores of transactional domestic databases for the reliability indicators mentioned above, Indicates the The scores of transactional domestic databases for the availability indicators mentioned above, Indicates the The scores of transactional domestic databases for the above scalability indicators, Indicates the The scores of transactional domestic databases for the data integrity indicators, Indicates the The scores of transactional domestic databases for the above security indicators, Indicates the The scores of transactional domestic databases for the manageability indicators mentioned above, Indicates the The scores of transactional domestic databases for the above-mentioned construction and operation cost indicators.

[0020] In some optional embodiments, the performance indicators of the analytical domestic database include: response time indicator, data compression ratio indicator, throughput indicator, concurrency capability indicator, database I / O indicator, cache management indicator, reliability indicator, availability indicator, scalability indicator, data integrity indicator, security indicator, manageability indicator and construction and operation cost indicator;

[0021] The preset analytical scoring criteria are used to score each analytical domestic database in combination with the performance indicators of each analytical domestic database, and the score is achieved through the following formula:

[0022]

[0023]

[0024] in, Indicates the first The scores of analytical domestic databases, Indicates the weight corresponding to the response time indicator, represents the weight corresponding to the data compression ratio indicator, represents the weight corresponding to the throughput indicator, Indicates the weight corresponding to the concurrency capability indicator, Indicates the weight corresponding to the database I / O indicator, Indicates the weight corresponding to the cache management indicator, represents the weight corresponding to the reliability index, represents the weight corresponding to the availability indicator, represents the weight corresponding to the scalability index, represents the weight corresponding to the data integrity indicator, represents the weight corresponding to the security indicator, represents the weight corresponding to the manageability indicator, Indicates the weight corresponding to the construction and operation cost indicator, Indicates the The scores of analytical domestic databases for the response time indicators are: Indicates the The scores of the analytical domestic databases for the data compression ratio index are: Indicates the The scores of analytical domestic databases for the throughput indicators are: Indicates the The scores of analytical domestic databases for the concurrency capability indicators are: Indicates the The scores of analytical domestic databases for the database I / O indicators, Indicates the The scores of analytical domestic databases for the cache management indicators are: Indicates the The weight of the reliability index for the analytical domestic database, Indicates the The scores of analytical domestic databases for the above usability indicators, Indicates the The scores of analytical domestic databases for the above scalability indicators, Indicates the The scores of analytical domestic databases for the data integrity indicators are: Indicates the The scores of analytical domestic databases for the safety indicators mentioned above are: Indicates the The scores of analytical domestic databases for the manageability indicators mentioned above, Indicates the The scores of analytical domestic databases for the above-mentioned construction and operation cost indicators.

[0025] In some optional embodiments, the power marketing business system after the database is replaced is subjected to business joint debugging and testing, and the power marketing business system after the database is replaced is released when the result of the business joint debugging and testing meets the preset business standard, including: traversing various businesses in the power marketing business system after the database is replaced, and performing R simulation tests on the current business, if the R simulation tests fail G times in a row, it is determined that the current business has not passed the test, otherwise, it is determined that the current business has passed the test; wherein R is an integer greater than G, and G is an integer greater than 1; when all the businesses pass the test, the power marketing business system after the database is replaced is released. If all the businesses of the power marketing business system after the database is replaced can be carried out normally, it means that the database is replaced successfully, the data stream can be stored in the specified database, and can also be read out from the specified database normally. At this time, the power marketing business system after the database is replaced can be released to meet the power purchasing needs of power customers. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.

[0027] Figure 1 It is a flowchart of a database replacement method for power marketing business provided by an embodiment of the present application;

[0028] Figure 2 is a schematic diagram of a specific structure of a database replacement system for power marketing business provided by another embodiment of the present application;

[0029] Figure 3 It is a schematic diagram of the structure of an electronic device provided by another embodiment of the present application. DETAILED DESCRIPTION

[0030] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be construed as any limitation, and the various embodiments can be combined and referenced with each other under the premise of no contradiction.

[0031] An embodiment of the present application proposes a database replacement method for power marketing business, which can be applied to electronic devices, wherein the electronic device can be a terminal or a server. In this embodiment and the following embodiments, the electronic device is described by taking the server as an example. The implementation details of the database replacement method for power marketing business proposed in this embodiment are specifically described below. The following content is only the implementation details provided for easy understanding and is not necessary for implementing this solution.

[0032] The specific process of the database replacement method for power marketing business proposed in this embodiment can be as follows: Figure 1 As shown, specifically including:

[0033] Step 101 , combing the power marketing business system, and dividing the business data flows in the power marketing business system into transactional business data flows and analytical business data flows according to business types.

[0034] In the specific implementation, when the server replaces the domestic database of the power marketing business system, it is first necessary to sort out the business of the power marketing business system, clearly divide the business types in the power marketing business system into transactional and analytical types, and then divide the business data flow in the power marketing business system into transactional business data flow and analytical business data flow according to the business type.

[0035] In one example, the transactional business data flow in the power marketing business system includes at least: system login business, file storage business, remote fee control business, remote recharge business, terminal login business, terminal online rate query business and fee control recharge status query business, etc.

[0036] In one example, the analytical business data flow in the power marketing business system includes at least: historical business, historical business query business, collection success rate query business, substation line loss query business, metering anomaly monitoring business, collection completeness rate query business, distribution transformer load analysis business and external real-time publishing business.

[0037] In one example, when the server divides the business data flow in the power marketing business system into transactional business data flow and analytical business data flow according to business type, it also needs to divide the batch low-latency transactional business data flow into analytical business data flow. The batch low-latency transactional business data flow does not have strict requirements on the performance of the database, so it can be divided into analytical business data flow. Such division reduces the pressure on the transactional domestic database to a certain extent in the subsequent process.

[0038] Step 102 , based on the business type of the business data flow in the power marketing business system, divide several domestic databases in the preset replacement candidate pool into transaction-type domestic databases and analytical-type domestic databases.

[0039] In a specific implementation, the server sets up a replacement candidate pool in advance based on factors such as procurement budget, and several domestic databases are set up in the replacement candidate pool. The server can divide the several domestic databases in the replacement candidate pool into transactional domestic databases and analytical domestic databases based on the business type of the business data flow in the power marketing business system.

[0040] In one example, the transactional domestic databases in the replacement candidate pool include at least: GaussDB database, OceanBase database, DAMO database, KingBase database and TDSQL database, etc.

[0041] In one example, the analytical domestic databases in the replacement candidate pool include at least: DWS database, GBase database, TDSQL-A database, etc.

[0042] Step 103, using the preset transactional scoring standard and combining the performance indicators of each transactional domestic database, score each transactional domestic database, and determine the target transactional domestic database based on the score of each transactional domestic database. At the same time, using the preset analytical scoring standard and combining the performance indicators of each analytical domestic database, score each analytical domestic database, and determine the target analytical domestic database based on the score of each analytical domestic database.

[0043] In the specific implementation, after the server divides several domestic databases in the replacement candidate pool into transaction-type domestic databases and analytical domestic databases, it can use the preset transaction-type scoring criteria and combine the performance indicators of each transaction-type domestic database to score each transaction-type domestic database, and determine the target transaction-type domestic database based on the score of each transaction-type domestic database. At the same time, the server can also use the preset analytical scoring criteria and combine the performance indicators of each analytical-type domestic database to score each analytical-type domestic database, and determine the target analytical-type domestic database based on the score of each analytical-type domestic database.

[0044] In one example, the performance indicators that transactional domestic databases focus on include at least: response time indicator, throughput indicator, concurrency capability indicator, database I / O indicator, single transaction database read and write times indicator, reliability indicator, availability indicator, scalability indicator, data integrity indicator, security indicator, manageability indicator and installation and operation cost indicator.

[0045] In one example, the server uses the preset transactional scoring criteria and combines the performance indicators of each transactional domestic database to score each transactional domestic database, which can be achieved through the following formula:

[0046]

[0047]

[0048] in, represents the calculated replacement candidate pool. The scores of transactional domestic databases, Indicates the weight corresponding to the response time indicator, Indicates the weight corresponding to the throughput indicator, Indicates the weight corresponding to the concurrent capability indicator, Indicates the weight corresponding to the database I / O indicator. Indicates the weight corresponding to the database read and write times of a single transaction. represents the weight corresponding to the reliability index, Indicates the weight corresponding to the availability index, Indicates the weight corresponding to the scalability index, Indicates the weight corresponding to the data integrity indicator, represents the weight corresponding to the security index, represents the weight corresponding to the manageability index, Indicates the weight corresponding to the construction and operation cost indicator. Indicates The scores of transactional domestic databases for response time indicators, Indicates The scores of transactional domestic databases for throughput indicators, Indicates The scores of transactional domestic databases for concurrency indicators, Indicates The scores of transactional domestic databases for database I / O indicators, Indicates The scores of the transactional domestic database for the database read and write times of a single transaction, Indicates The scores of the reliability index of the transactional domestic databases, Indicates The scores of transactional domestic databases for availability indicators, Indicates The scores of transactional domestic databases for scalability indicators, Indicates The scores of transactional domestic databases for data integrity indicators, Indicates The scores of transactional domestic databases for security indicators, Indicates The scores of the transactional domestic databases for manageability indicators, Indicates The scores of transactional domestic databases for the construction and operation cost indicators.

[0049] In one example, when determining a target transaction-type domestic database based on the scores of each transaction-type domestic database, the server sorts the transaction-type domestic databases from high to low according to the scores, and determines one or more transaction-type domestic databases with the highest scores as the target transaction-type domestic databases.

[0050] In one example, the performance indicators that analytical domestic databases focus on include at least: response time indicator, data compression ratio indicator, throughput indicator, concurrency capability indicator, database I / O indicator, cache management indicator, reliability indicator, availability indicator, scalability indicator, data integrity indicator, security indicator, manageability indicator and installation and operation cost indicator.

[0051] In one example, the server uses the preset analytical scoring criteria and combines the performance indicators of each analytical domestic database to score each analytical domestic database, which can be achieved through the following formula:

[0052]

[0053]

[0054] in, represents the calculated replacement candidate pool. The scores of analytical domestic databases, Indicates the weight corresponding to the response time indicator, Indicates the weight corresponding to the data compression ratio indicator, Indicates the weight corresponding to the throughput indicator, Indicates the weight corresponding to the concurrent capability indicator, Indicates the weight corresponding to the database I / O indicator. Indicates the weight corresponding to the cache management indicator, represents the weight corresponding to the reliability index, Indicates the weight corresponding to the availability index, Indicates the weight corresponding to the scalability index, Indicates the weight corresponding to the data integrity indicator, represents the weight corresponding to the security index, represents the weight corresponding to the manageability index, Indicates the weight corresponding to the construction and operation cost indicator. Indicates The scores of the analytical domestic databases for the response time indicator, Indicates The scores of analytical domestic databases for data compression ratio indicators, Indicates The scores of analytical domestic databases for throughput indicators, Indicates The scores of analytical domestic databases for concurrency indicators, Indicates The scores of analytical domestic databases for database I / O indicators, Indicates The scores of analytical domestic databases for cache management indicators, Indicates The weight of reliability index for analytical domestic databases, Indicates The scores of analytical domestic databases for availability indicators, Indicates The scores of analytical domestic databases for scalability indicators, Indicates The scores of analytical domestic databases for data integrity indicators, Indicates The scores of analytical domestic databases for security indicators, Indicates The scores of the domestic analytical databases for manageability indicators, Indicates The scores of analytical domestic databases for the construction and operation cost indicators.

[0055] In one example, when determining a target analytical domestic database based on the scores of each analytical domestic database, the server sorts each analytical domestic database from high to low according to the score, and determines one or more analytical domestic databases with the highest score as the target analytical domestic database.

[0056] Step 104, by modifying the application configuration of the power marketing business system, the connection with the target transactional domestic database and the target analytical domestic database is achieved, the transactional business data flow is migrated to the target transactional domestic database, and the analytical business data flow is migrated to the target analytical domestic database.

[0057] In the specific implementation, after the server determines the target transactional domestic database and the target analytical domestic database, it can realize the connection between the power marketing business system and the target transactional domestic database and the target analytical domestic database by modifying the application configuration of the power marketing business system. After the connection is established, the transactional business data flow can be migrated to the target transactional domestic database, and the analytical business data flow can be migrated to the target analytical domestic database.

[0058] In one example, the target transactional domestic database determined by the server is the GaussDB database, and the target analytical domestic database determined is the DWS database. When the server migrates the transactional business data stream to the target transactional domestic database, and migrates the analytical business data stream to the target analytical domestic database, the business data streams of the system login business, archive storage business, remote fee control business, remote recharge business, terminal login business, terminal online rate query business, and fee control recharge status query business can be migrated to the GaussDB database for storage; the business data stream of the historical business is migrated to the HBASE component in the MRS cluster of the data center of the DWS database for storage; the business data streams of the historical business query business, the acquisition success rate query business, the line loss query business of the substation area, the metering abnormality monitoring business, the acquisition completeness rate query business, and the distribution transformer load analysis business are migrated to the data lake of the DWS database for storage; the batch low-latency transactional business data stream is migrated to the Flink component in the MRS cluster of the data center of the DWS database for storage; the business data stream of the external real-time publishing business is migrated to the Kafka component in the MRS cluster of the data center of the DWS database for storage.

[0059] Different transactional business data flows and different analytical business data flows can be stored in different target transactional domestic databases and different target analytical domestic databases, or they can be stored in different components of the target transactional domestic database and the target analytical domestic database. This design makes the storage of data flows more reasonable and avoids mutual influence and contamination between data flows.

[0060] Step 105 , conduct business joint debugging and testing on the power marketing business system after the database is replaced, and release the power marketing business system after the database is replaced when the results of the business joint debugging and testing meet the preset business standards.

[0061] In the specific implementation, after the server completes the domestic replacement of the database of the power marketing business system, it can carry out business joint debugging and testing on the power marketing business system after the database replacement, and release the power marketing business system after the database replacement when the results of the business joint debugging and testing meet the preset business standards.

[0062] In one example, the server can traverse various businesses in the power marketing business system after the database is replaced, and perform R simulation tests on the current business. If the R simulation tests fail G times in a row (R is an integer greater than G, and G is an integer greater than 1), it is determined that the current business has not passed the test. Otherwise, it is determined that the current business has passed the test. If all businesses pass the test, the server releases the power marketing business system after the database is replaced. If at least one business fails the test, the server will modify the application configuration of the power marketing business system, or re-determine the target transaction-type domestic database and the target analytical domestic database until all businesses pass the test.

[0063] It is understandable that if all operations of the power marketing business system can proceed normally after the database is replaced, it means that the database replacement is successful, the data flow can be stored in the specified database, and can also be read from the specified database normally. At this time, the power marketing business system after the database replacement can be released to meet the electricity purchasing needs of power customers.

[0064] In this embodiment, the business of the power marketing business system is first sorted out, and the business data flows in the power marketing business system are divided into transactional business data flows and analytical business data flows according to business types, and the domestic databases in the replacement candidate pool are divided into transactional domestic databases and analytical domestic databases. Then, based on the performance indicators of the transactional domestic databases and the performance indicators of the analytical domestic databases, each transactional domestic database and each analytical domestic database are scored, and the target transactional domestic database and the target analytical domestic database are determined. The transactional business data flow is migrated to the target transactional domestic database, and the analytical business data flow is migrated to the target analytical domestic database. Finally, the power marketing business system after the database is replaced is carried out with business joint debugging and joint testing. When the results of the business joint debugging and joint testing meet the preset business standards, the power marketing business system after the database is replaced is released, thereby smoothly realizing the domestic replacement of the database of the power marketing business system. While greatly improving data security, it effectively ensures that the cloud-based power marketing business system has good business performance, and greatly improves the user experience of power customers purchasing electricity.

[0065] The step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this application; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this application.

[0066] Another embodiment of the present application proposes a database replacement system for power marketing business. The implementation details of the database replacement system for power marketing business proposed in this embodiment are specifically described below. The following content is only for the convenience of understanding the implementation details provided, and is not necessary for the implementation of this solution. The schematic diagram of the database replacement system for power marketing business proposed in this embodiment can be as follows: Figure 2 As shown, it includes: a business combing module 201, a database classification module 202, a database scoring module 203, an alternative execution module 204 and a testing module 205.

[0067] The business combing module 201 is used to comb the business of the power marketing business system, and divide the business data flow in the power marketing business system into transactional business data flow and analytical business data flow according to business type.

[0068] The database classification module 202 is used to classify several domestic databases in a preset replacement candidate pool into transaction-type domestic databases and analytical-type domestic databases based on the business type of the business data flow in the power marketing business system.

[0069] The database scoring module 203 is used to score each transaction-type domestic database using a preset transaction-type scoring standard combined with the performance indicators of each transaction-type domestic database, and determine a target transaction-type domestic database based on the score of each transaction-type domestic database. At the same time, it is used to score each analytical domestic database using a preset analytical scoring standard combined with the performance indicators of each analytical domestic database, and determine a target analytical domestic database based on the score of each analytical domestic database.

[0070] The alternative execution module 204 is used to achieve connection with the target transactional domestic database and the target analytical domestic database by modifying the application configuration of the power marketing business system, migrate the transactional business data flow to the target transactional domestic database, and migrate the analytical business data flow to the target analytical domestic database.

[0071] The testing module 205 is used to carry out business joint debugging and testing on the power marketing business system after the database is replaced, and release the power marketing business system after the database is replaced when the results of the business joint debugging and testing meet the preset business standards.

[0072] It is not difficult to find that this embodiment is a system embodiment corresponding to the above method embodiment, and this embodiment can be implemented in conjunction with the above method embodiment. The relevant technical details and technical effects mentioned in the above embodiments are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the above embodiments.

[0073] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.

[0074] Another embodiment of the present application relates to an electronic device, such as Figure 3 As shown, it includes: at least one processor 301; and a memory 302 that is communicatively connected to the at least one processor 301; wherein the memory 302 stores instructions that can be executed by the at least one processor 301, and the instructions are executed by the at least one processor 301 so that the at least one processor 301 can execute the database replacement method for power marketing business described in the above-mentioned method embodiments.

[0075] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripheral devices, voltage regulators and power management circuits together, which are all well known in the art, so this article will not describe them further. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium through an antenna, and further, the antenna also receives data and transmits the data to the processor.

[0076] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.

[0077] Another embodiment of the present application relates to a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the database replacement method for power marketing business described in the above method embodiments.

[0078] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as: ROM), random access memory (Random Access Memory, referred to as: RAM), disk or optical disk and other media that can store program codes.

[0079] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.

Claims

1. A database replacement method for power marketing business, characterized in that: include: Sorting out the business of the power marketing business system, and dividing the business data flow in the power marketing business system into transactional business data flow and analytical business data flow according to business type; Based on the business type of the business data flow in the power marketing business system, several domestic databases in the preset replacement candidate pool are divided into transaction-type domestic databases and analytical-type domestic databases; Using the preset transactional scoring standard and combining the performance indicators of each transactional domestic database, score each transactional domestic database, and determine the target transactional domestic database based on the score of each transactional domestic database. At the same time, using the preset analytical scoring standard and combining the performance indicators of each analytical domestic database, score each analytical domestic database, and determine the target analytical domestic database based on the score of each analytical domestic database. By modifying the application configuration of the power marketing business system, the connection with the target transactional domestic database and the target analytical domestic database is realized, the transactional business data flow is migrated to the target transactional domestic database, and the analytical business data flow is migrated to the target analytical domestic database; Conducting joint debugging and testing of the power marketing business system after the database is replaced, and releasing the power marketing business system after the database is replaced if the results of the joint debugging and testing meet the preset business standards; The performance indicators of the transactional domestic database include: response time indicator, throughput indicator, concurrency indicator, database I / O indicator, single transaction database read and write times indicator, reliability indicator, availability indicator, scalability indicator, data integrity indicator, security indicator, manageability indicator and construction and operation cost indicator; The preset transactional scoring standard is used to score each transactional domestic database in combination with the performance indicators of each transactional domestic database, which is achieved through the following formula: in, Indicates the first The scores of transactional domestic databases, Indicates the weight corresponding to the response time indicator, represents the weight corresponding to the throughput indicator, Indicates the weight corresponding to the concurrency capability indicator, Indicates the weight corresponding to the database I / O indicator, Indicates the weight corresponding to the database read and write times indicator of the single transaction, represents the weight corresponding to the reliability index, represents the weight corresponding to the availability indicator, represents the weight corresponding to the scalability index, represents the weight corresponding to the data integrity indicator, represents the weight corresponding to the security indicator, represents the weight corresponding to the manageability indicator, Indicates the weight corresponding to the construction and operation cost indicator, Indicates the The scores of transactional domestic databases for the response time indicators are: Indicates the The scores of transactional domestic databases for the throughput indicators are: Indicates the The scores of transactional domestic databases for the concurrency capability indicators are: Indicates the The scores of transactional domestic databases for the database I / O indicators, Indicates the The score of the transactional domestic database for the database read and write times of the single transaction, Indicates the The scores of transactional domestic databases for the reliability indicators mentioned above, Indicates the The scores of transactional domestic databases for the availability indicators mentioned above, Indicates the The scores of transactional domestic databases for the above scalability indicators, Indicates the The scores of transactional domestic databases for the data integrity indicators, Indicates the The scores of transactional domestic databases for the above security indicators, Indicates the The scores of transactional domestic databases for the manageability indicators mentioned above, Indicates the The scores of transactional domestic databases for the above construction and operation cost indicators; The performance indicators of the analytical domestic database include: response time indicator, data compression ratio indicator, throughput indicator, concurrency capability indicator, database I / O indicator, cache management indicator, reliability indicator, availability indicator, scalability indicator, data integrity indicator, security indicator, manageability indicator and construction and operation cost indicator; The preset analytical scoring criteria are used to score each analytical domestic database in combination with the performance indicators of each analytical domestic database, and the score is achieved through the following formula: in, Indicates the first The scores of analytical domestic databases, Indicates the weight corresponding to the response time indicator, represents the weight corresponding to the data compression ratio indicator, represents the weight corresponding to the throughput indicator, Indicates the weight corresponding to the concurrency capability indicator, Indicates the weight corresponding to the database I / O indicator, Indicates the weight corresponding to the cache management indicator, represents the weight corresponding to the reliability index, represents the weight corresponding to the availability indicator, represents the weight corresponding to the scalability index, represents the weight corresponding to the data integrity indicator, represents the weight corresponding to the security indicator, represents the weight corresponding to the manageability indicator, Indicates the weight corresponding to the construction and operation cost indicator, Indicates the The scores of analytical domestic databases for the response time indicators are: Indicates the The scores of the analytical domestic databases for the data compression ratio index are: Indicates the The scores of analytical domestic databases for the throughput indicators are: Indicates the The scores of analytical domestic databases for the concurrency capability indicators are: Indicates the The scores of analytical domestic databases for the database I / O indicators, Indicates the The scores of analytical domestic databases for the cache management indicators are: Indicates the The weight of the reliability index for the analytical domestic database, Indicates the The scores of analytical domestic databases for the above usability indicators, Indicates the The scores of analytical domestic databases for the above scalability indicators, Indicates the The scores of analytical domestic databases for the data integrity indicators are: Indicates the The scores of analytical domestic databases for the safety indicators mentioned above are: Indicates the The scores of analytical domestic databases for the manageability indicators mentioned above, Indicates the The scores of analytical domestic databases for the above construction and operation cost indicators; The carrying out of business joint debugging and joint testing on the power marketing business system after the database is replaced, and releasing the power marketing business system after the database is replaced when the result of the business joint debugging and joint testing meets the preset business standard, includes: Traversing various businesses in the power marketing business system after the database is replaced, performing R simulation tests on the current business, and if the current business fails G times in a row in the R simulation tests, determining that the current business has failed the test, otherwise, determining that the current business has passed the test; wherein R is an integer greater than G, and G is an integer greater than 1; When all the businesses have passed the test, the power marketing business system after the database is replaced will be released.

2. The database replacement method for power marketing business according to claim 1 is characterized in that: The transactional service data flow includes: system login service, file storage service, remote fee control service, remote recharge service, terminal login service, terminal online rate query service and fee control recharge status query service; The analytical service data stream includes: historical service, historical service query service, acquisition success rate query service, area line loss query service, measurement abnormality monitoring service, acquisition completeness rate query service, distribution transformer load analysis service and external real-time publishing service; The transactional domestic databases include: GaussDB database, OceanBase database, DAMO database, KingBase database and TDSQL database; The analytical domestic databases include: DWS database, GBase database and TDSQL-A database.

3. The database replacement method for power marketing business according to claim 2 is characterized in that: When the business data flow in the power marketing business system is divided into a transactional business data flow and an analytical business data flow according to the business type, the method further includes: Divide the batch processing low-latency transactional business data stream into analytical business data stream.

4. The database replacement method for power marketing business according to claim 3 is characterized in that: The target transactional domestic database is a GaussDB database, the target analytical domestic database is a DWS database, and the migrating of the transactional business data flow to the target transactional domestic database and the migrating of the analytical business data flow to the target analytical domestic database includes: Migrate the service data streams of the system login service, the file storage service, the remote fee control service, the remote recharge service, the terminal login service, the terminal online rate query service and the fee control recharge status query service to the GaussDB database for storage; Migrate the business data flow of the historical business to the HBASE component in the MRS cluster of the data center of the DWS database for storage; Migrate the business data streams of the historical business query service, the acquisition success rate query service, the substation line loss query service, the metering abnormality monitoring service, the acquisition completeness rate query service, and the distribution transformer load analysis service to the data lake of the DWS database for storage; Migrate the batch processing low-latency transactional business data stream to the Flink component in the MRS cluster of the data center of the DWS database for storage; The business data flow of the external real-time publishing business is migrated to the Kafka component in the MRS cluster of the data center of the DWS database for storage.

5. A database replacement system for power marketing business, characterized in that: include: A business combing module, used to comb the business of the power marketing business system, and divide the business data flow in the power marketing business system into transactional business data flow and analytical business data flow according to business type; A database classification module, for classifying a plurality of domestic databases in a preset replacement candidate pool into transactional domestic databases and analytical domestic databases based on the business type of the business data flow in the power marketing business system; A database scoring module is used to score each transaction-type domestic database using a preset transaction-type scoring standard and combining the performance indicators of each transaction-type domestic database, and determine a target transaction-type domestic database based on the score of each transaction-type domestic database. At the same time, a preset analytical scoring standard is used and combining the performance indicators of each analytical-type domestic database to score each analytical-type domestic database, and determine a target analytical-type domestic database based on the score of each analytical-type domestic database. A replacement execution module, used to achieve connection with the target transactional domestic database and the target analytical domestic database by modifying the application configuration of the power marketing business system, migrate the transactional business data flow to the target transactional domestic database, and migrate the analytical business data flow to the target analytical domestic database; A testing module, used to carry out joint debugging and testing of the power marketing business system after the database is replaced, and release the power marketing business system after the database is replaced if the result of the joint debugging and testing meets the preset business standard; The performance indicators of the transactional domestic database include: response time indicator, throughput indicator, concurrency indicator, database I / O indicator, single transaction database read and write times indicator, reliability indicator, availability indicator, scalability indicator, data integrity indicator, security indicator, manageability indicator and construction and operation cost indicator; The preset transactional scoring standard is used to score each transactional domestic database in combination with the performance indicators of each transactional domestic database, which is achieved through the following formula: in, Indicates the first The scores of transactional domestic databases, Indicates the weight corresponding to the response time indicator, represents the weight corresponding to the throughput indicator, Indicates the weight corresponding to the concurrency capability indicator, Indicates the weight corresponding to the database I / O indicator, Indicates the weight corresponding to the database read and write times indicator of the single transaction, represents the weight corresponding to the reliability index, represents the weight corresponding to the availability indicator, represents the weight corresponding to the scalability index, represents the weight corresponding to the data integrity indicator, represents the weight corresponding to the security indicator, represents the weight corresponding to the manageability indicator, Indicates the weight corresponding to the construction and operation cost indicator, Indicates the The scores of transactional domestic databases for the response time indicators are: Indicates the The scores of transactional domestic databases for the throughput indicators are: Indicates the The scores of transactional domestic databases for the concurrency capability indicators are: Indicates the The scores of transactional domestic databases for the database I / O indicators, Indicates the The score of the transactional domestic database for the database read and write times of the single transaction, Indicates the The scores of transactional domestic databases for the reliability indicators mentioned above, Indicates the The scores of transactional domestic databases for the availability indicators mentioned above, Indicates the The scores of transactional domestic databases for the above scalability indicators, Indicates the The scores of transactional domestic databases for the data integrity indicators, Indicates the The scores of transactional domestic databases for the above security indicators, Indicates the The scores of transactional domestic databases for the manageability indicators mentioned above, Indicates the The scores of transactional domestic databases for the above construction and operation cost indicators; The performance indicators of the analytical domestic database include: response time indicator, data compression ratio indicator, throughput indicator, concurrency capability indicator, database I / O indicator, cache management indicator, reliability indicator, availability indicator, scalability indicator, data integrity indicator, security indicator, manageability indicator and construction and operation cost indicator; The preset analytical scoring criteria are used to score each analytical domestic database in combination with the performance indicators of each analytical domestic database, and the score is achieved through the following formula: in, Indicates the first The scores of analytical domestic databases, Indicates the weight corresponding to the response time indicator, represents the weight corresponding to the data compression ratio indicator, represents the weight corresponding to the throughput indicator, Indicates the weight corresponding to the concurrency capability indicator, Indicates the weight corresponding to the database I / O indicator, Indicates the weight corresponding to the cache management indicator, represents the weight corresponding to the reliability index, represents the weight corresponding to the availability indicator, represents the weight corresponding to the scalability index, represents the weight corresponding to the data integrity indicator, represents the weight corresponding to the security indicator, represents the weight corresponding to the manageability indicator, Indicates the weight corresponding to the construction and operation cost indicator, Indicates the The scores of analytical domestic databases for the response time indicators are: Indicates the The scores of the analytical domestic databases for the data compression ratio index are: Indicates the The scores of analytical domestic databases for the throughput indicators are: Indicates the The scores of analytical domestic databases for the concurrency capability indicators are: Indicates the The scores of analytical domestic databases for the database I / O indicators, Indicates the The scores of analytical domestic databases for the cache management indicators are: Indicates the The weight of the reliability index for the analytical domestic database, Indicates the The scores of analytical domestic databases for the above usability indicators, Indicates the The scores of analytical domestic databases for the above scalability indicators, Indicates the The scores of analytical domestic databases for the data integrity indicators are: Indicates the The scores of analytical domestic databases for the safety indicators mentioned above are: Indicates the The scores of analytical domestic databases for the manageability indicators mentioned above, Indicates the The scores of analytical domestic databases for the above construction and operation cost indicators; The carrying out of business joint debugging and joint testing on the power marketing business system after the database is replaced, and releasing the power marketing business system after the database is replaced when the result of the business joint debugging and joint testing meets the preset business standard, includes: Traversing various businesses in the power marketing business system after the database is replaced, performing R simulation tests on the current business, and if the current business fails G times in a row in the R simulation tests, determining that the current business has failed the test, otherwise, determining that the current business has passed the test; wherein R is an integer greater than G, and G is an integer greater than 1; When all the businesses have passed the test, the power marketing business system after the database is replaced will be released.

6. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the database replacement method for power marketing business according to any one of claims 1 to 4.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the database replacement method for power marketing business according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Database testing method and device, equipment and storage medium

    CN117033167A

  • Database migration assessment system and method

    CN106934045A

  • Domestic substitution migration method for foreign technology application system

    CN113127445A

  • Application system domestic platform migration adaptation method

    CN114047949A

  • Database transaction processing method and device

    CN114721786A