CN114579180A - Data migration method and device, electronic equipment and storage medium - Google Patents

Data migration method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114579180A
CN114579180A CN202210459645.6A CN202210459645A CN114579180A CN 114579180 A CN114579180 A CN 114579180A CN 202210459645 A CN202210459645 A CN 202210459645A CN 114579180 A CN114579180 A CN 114579180A
Authority
CN
China
Prior art keywords
version
target
interface
program
data
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.)
Granted
Application number
CN202210459645.6A
Other languages
Chinese (zh)
Other versions
CN114579180B (en
Inventor
侯战斌
吴忧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jutongda Technology Co ltd
Original Assignee
Beijing Jutongda Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Jutongda Technology Co ltd filed Critical Beijing Jutongda Technology Co ltd
Priority to CN202210459645.6A priority Critical patent/CN114579180B/en
Publication of CN114579180A publication Critical patent/CN114579180A/en
Application granted granted Critical
Publication of CN114579180B publication Critical patent/CN114579180B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/214Database migration support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure relates to a data migration method, a data migration device, electronic equipment and a storage medium, and relates to the field of software. Firstly, acquiring an auditing state of a target version of a target program; then, under the condition that the auditing state of the target version is passed, acquiring an interface changing state of a data interface of the target program; and under the condition that the interface change state represents that the data interface of the target program is changed from a first interface to a second interface, migrating the program data corresponding to the current version from the database corresponding to the current version to the database corresponding to the target version. By the scheme, under the condition that the interface change state of the data interface of the target program is changed, the program data of the current version can be migrated to the database corresponding to the target version, so that the integrity of the program data of the target program is guaranteed, and the user experience is improved.

Description

Data migration method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of software, and in particular, to a method and an apparatus for data migration, an electronic device, and a storage medium.
Background
With the development of internet technology, the iterative update speed of software versions is continuously accelerated, the problem of software compatibility of different versions caused by the iterative update of software versions is increasingly prominent, meanwhile, version iteration may also involve the change of a data interface, and under the condition that the data interface of a target version is changed, program data of a current version cannot be timely migrated to a database of the target version, so that the loss or inconvenient access of the program data of the current version may be caused, and the experience of a user is influenced.
For example, with the e-commerce software of the applet, when an operator of the e-commerce software issues a new applet template and a data interface of the new applet template is changed, the program data of the current version cannot be compatible with the new data interface, which may cause that order data of the current version cannot be timely migrated to a database of a new version, and may cause that the order data is lost or cannot be accessed, thereby affecting user experience.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a method, an apparatus, an electronic device, and a storage medium for data migration.
According to a first aspect of embodiments of the present disclosure, there is provided a method of data migration, the method including:
acquiring an auditing state of a target version of a target program; the target version is an updated version of a current version of the target program;
acquiring an interface change state of a data interface of the target program under the condition that the audit state of the target version is passed;
under the condition that the interface change state represents that the data interface of the target program is changed from a first interface to a second interface, program data corresponding to the current version is migrated from the database corresponding to the current version to the database corresponding to the target version; the first interface is a data interface between the target program and the database corresponding to the current version, and the second interface is a data interface between the target program and the database corresponding to the target version.
Optionally, the migrating the program data corresponding to the current version from the database corresponding to the current version to the database corresponding to the target version includes:
acquiring a data migration state of the program data corresponding to the current version, wherein the data migration state represents whether the program data is migrated from the database corresponding to the current version to the database corresponding to the target version;
and under the condition that the data migration state is not migrated, migrating the program data from the database corresponding to the current version to the database corresponding to the target version through an asynchronous data migration process.
Optionally, the migrating, by an asynchronous data migration process, the program data from the database corresponding to the current version to the database corresponding to the target version includes:
acquiring a preset data mapping relation between the first interface and the second interface of the target program;
and migrating the program data from the database corresponding to the current version to the database corresponding to the target version through an asynchronous data migration process according to the preset data mapping relation.
Optionally, the method further comprises:
and after the program data is migrated from the database corresponding to the current version to the database corresponding to the target version through an asynchronous data migration process, changing the data migration state of the program data corresponding to the current version into the migrated state.
Optionally, the method further comprises:
determining a service version according to the audit state of the target version of the target program;
and displaying an interface of the service version to a user, and providing the service for the user by using the service version.
Optionally, the determining a service version according to the audit state of the target version of the target program includes:
taking the current version of the target program as a service version when the audit state of the target version of the target program is in audit or fails; or,
and taking the target version of the target program as a service version under the condition that the audit state of the target version of the target program is passed.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for data migration, the apparatus comprising:
a first obtaining module configured to obtain an audit state of a target version of a target program; the target version is an updated version of a current version of the target program;
the second acquisition module is configured to acquire an interface change state of a data interface of the target program under the condition that the audit state of the target version is passed;
the data migration module is configured to migrate the program data corresponding to the current version from the database corresponding to the current version to the database corresponding to the target version under the condition that the interface change state represents that the data interface of the target program is changed from a first interface to a second interface; the first interface is a data interface between the target program and the database corresponding to the current version, and the second interface is a data interface between the target program and the database corresponding to the target version.
Optionally, the data migration module is further configured to:
acquiring a data migration state of the program data corresponding to the current version, wherein the data migration state represents whether the program data is migrated from the database corresponding to the current version to the database corresponding to the target version;
and under the condition that the data migration state is not migrated, migrating the program data from the database corresponding to the current version to the database corresponding to the target version through an asynchronous data migration process.
Optionally, the data migration module is further configured to:
acquiring a preset data mapping relation between the first interface and the second interface of the target program;
and migrating the program data from the database corresponding to the current version to the database corresponding to the target version through an asynchronous data migration process according to the preset data mapping relation.
Optionally, the data migration module is further configured to:
and after the program data is migrated from the database corresponding to the current version to the database corresponding to the target version through the asynchronous data migration process, changing the data migration state of the program data corresponding to the current version into the migrated state.
Optionally, the apparatus further comprises:
a service module configured to determine a service version according to the audit status of the target version of the target program; and displaying an interface of the service version to a user, and providing the service for the user by using the service version.
Optionally, the service module is further configured to:
taking the current version of the target program as a service version when the audit state of the target version of the target program is in audit or fails; or,
and taking the target version of the target program as a service version under the condition that the audit state of the target version of the target program is passed.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any of the embodiments of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the first aspect described above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the method comprises the steps of firstly, acquiring an audit state of a target version of a target program; then, under the condition that the auditing state of the target version is passed, acquiring an interface changing state of a data interface of the target program; and under the condition that the interface change state represents that the data interface of the target program is changed from a first interface to a second interface, migrating the program data corresponding to the current version from the database corresponding to the current version to the database corresponding to the target version. By the scheme, under the condition that the interface change state of the data interface of the target program is changed, the program data of the current version can be migrated to the database corresponding to the target version, so that the integrity of the program data of the target program is guaranteed, and the user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure, but are not to be construed as limiting the disclosure.
FIG. 1 is a flow chart illustrating a method of data migration in accordance with an exemplary embodiment.
FIG. 2 is a logic diagram illustrating the stakeholders of a target program in accordance with an exemplary embodiment.
FIG. 3 is a flow chart illustrating another method of data migration in accordance with an exemplary embodiment.
FIG. 4 is a flow chart illustrating yet another method of data migration in accordance with an exemplary embodiment.
FIG. 5 is a flow chart illustrating yet another method of data migration in accordance with an exemplary embodiment.
FIG. 6 is a flow chart illustrating yet another method of data migration in accordance with an exemplary embodiment.
FIG. 7 is a block diagram illustrating an apparatus for data migration in accordance with an example embodiment.
FIG. 8 is a block diagram illustrating another apparatus for data migration in accordance with an example embodiment.
FIG. 9 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims, and it should be understood that the specific embodiments described herein are merely illustrative and explanatory of the disclosure and are not restrictive of the disclosure.
It should be noted that all actions of acquiring signals, information or data in the present application are performed under the premise of complying with the corresponding data protection regulation policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.
First, an application scenario of the present disclosure is explained, with the development of internet technology, the iteration speed of a software version is increased, and as software compatibility problems caused by iterative update of the software version are increasingly prominent, the inventor finds that different users have different preferences for the software version, for example, in e-commerce applet software, an operator may issue a new applet template, for example, new functions such as support for killing seconds, group purchase, and the like. After the software version is switched, the data interface corresponding to the target version of the target program may be changed, for example, because new functions such as killing by seconds, group purchase and the like are added, a killing by seconds price field is added to the data interface of the order data. Under the condition that a data interface of a target program is changed, if program data corresponding to a current version cannot be timely migrated to a database corresponding to the target version, the program data of the current version may be lost or inconvenient to access, and user experience may be affected.
Therefore, the present disclosure provides a data migration method, apparatus, electronic device and storage medium. Under the condition that the interface of the data interface of the target program is changed, program data of the current version can be migrated to the database corresponding to the target version, the integrity of the program data of the target program is guaranteed, and the user experience is improved.
The present disclosure is described below with reference to specific examples.
FIG. 1 is a flow chart illustrating a method of data migration, which may include the steps, as shown in FIG. 1, of:
in step S101, the audit status of the target version of the target program is acquired.
The target version may be an updated version of the current version of the target program, and the audit status may include passed, failed, and in-audit.
In the internet application, the target version release of the target program generally needs to be checked by a platform party, which may be an application store platform party, or a basic service platform party, such as a chat applet platform, a payment applet platform, and the like, which is not limited by the present disclosure. Fig. 2 is a logic diagram of a party associated with a target program according to an exemplary embodiment, and as shown in fig. 2, an application party is a decider of a service version of the target program, and may submit the target version of the target program to a platform side for review according to own software requirements, and after the target version of the target program passes the platform side for review, may provide a service to an end user using the target version of the target program. The target version of the target program may be provided by an operator, or may be obtained and generated from other channels, which is not limited by the present disclosure. For example, in the e-commerce application, an application party serving as an e-commerce merchant may apply an applet template provided by an operator to generate a target version of the target program to be submitted to a platform party for auditing, or may apply a third-party applet template or secondary development to generate a target version of the target program to be submitted to a platform party for auditing.
In step S102, when the audit state of the target version is passed, the interface change state of the data interface of the target program is acquired.
In some possible implementation manners, the data interface change state of the target program may be obtained through a preset version description (Release notes) of the target version.
For example, in the e-commerce application, a killing-by-second module is added in the target version, and when the audit state of the target version submitted by a certain merchant as an application party is passed, and the terminal user opens the interface of the merchant, the interface of the target version is displayed, that is, a newly added killing-by-second function can be provided, and accordingly, a killing-by-second price field can be added in the data interface of the target program in the order data table to record the price information of the order in a killing-by-second mode. The data interface change state of the target program can be obtained through the preset version description of the target version.
In step S103, when the interface change state indicates that the data interface of the target program is changed from the first interface to the second interface, the program data corresponding to the current version is migrated from the database corresponding to the current version to the database corresponding to the target version.
The first interface is a data interface between the target program and the database corresponding to the current version, and the second interface is a data interface between the target program and the database corresponding to the target version.
Therefore, by the scheme, under the condition that the interface change state of the data interface of the target program is changed, the program data of the current version can be migrated to the database corresponding to the target version, the integrity of the program data of the target program is guaranteed, and the user experience is improved.
Fig. 3 is a flowchart of a step S103 shown in the embodiment of fig. 1, and as shown in fig. 3, in one embodiment, the step of S103 may include the following steps:
in step S1031, the data migration state of the program data corresponding to the current version is acquired.
And the data migration state represents whether the program data is migrated from the database corresponding to the current version to the database corresponding to the target version.
In a possible implementation manner, the data migration state of the program data corresponding to the current version may be obtained through a preset data migration state.
For example, in the e-commerce application, after submitting the target version of the target program to the audit, the e-commerce merchant serving as the application party changes the preset data migration state corresponding to the e-commerce merchant into non-migration state, which indicates that the e-commerce merchant submits the target version of the target program to the platform party for the audit, and program data of the target program is not migrated.
In step S1032, when the data migration status is not migrated, the program data is migrated from the database corresponding to the current version to the database corresponding to the target version through the asynchronous data migration process.
The asynchronous data migration represents that the normal use of the target program is not influenced in the data migration process.
Illustratively, in the e-commerce application, in the case that the audit state of the target version is passed, the presentation interface of the newly accessed end user is the interface of the target version. The accessed terminal user receives the prompt of the version change and responds to the operation of the user to switch the display interface of the accessed terminal user to the target version. And the program data generated by the terminal user through the interface of the target version is stored in the database corresponding to the target version through the second interface of the target version.
In some possible implementations, the program data may be migrated from the database corresponding to the current version to the database corresponding to the target version through an asynchronous data migration process as follows.
The method comprises the steps of firstly, obtaining a preset data mapping relation of a first interface and a second interface of a target program.
In some possible implementations, the preset data mapping relationship may be obtained from version descriptions (Release nodes) of the target version.
The preset data mapping relationship may reflect a field mapping relationship of the first interface and the second interface.
For example, in an e-commerce application, a second killing module is added to a target version of the target program, a second killing price is added to an order management table, and the data mapping relationship may include the field mapping relationship described in table 1.
First interface Order number Name of commodity Price of goods Number of Price of bargain Total price of transaction Payment mode
Second interface Order number Name of commodity Price of goods Second killing price Number of Price of bargain Total price of transaction Payment mode
TABLE 1
As shown in table 1, the killing-by-second price in the second interface is a newly added field, and the rest are all in a one-to-one correspondence relationship.
Further, the preset data mapping relationship may also reflect a corresponding relationship of value spaces in corresponding fields of the first interface and the second interface.
For example, in an e-commerce application, the value space of some fields of the second interface is changed compared with that of the first interface, and the data mapping relationship may include the value space mapping relationship described in table 2.
Field(s) First interface Second interface
Payment mode 0-Payment mode 1, 1-Payment mode 2, 2-Payment mode 3 100-Payment mode 1, 101-Payment mode 2,102-payment mode 3, 103-payment mode 4
TABLE 2
As shown in table 2, the value spaces of the payment method fields corresponding to the first interface and the second interface are changed, and the value space in the first interface is [0,1,2 ]. The second interface is [100,101,102,103], and a payment mode is added to the second interface.
It should be noted that table 1 and table 2 only give examples of data mapping relationships, and the disclosure does not limit this.
And secondly, migrating the program data from the database corresponding to the current version to the database corresponding to the target version through the asynchronous data migration process according to the preset data mapping relation.
After the preset data mapping relationship is obtained, the asynchronous data migration process may migrate the program data from the database corresponding to the current version to the database corresponding to the target version according to the preset data mapping relationship.
In some possible implementation manners, the asynchronous data migration process may be implemented by a hyper (high performance PHP micro service framework) and a Swoole (PHP asynchronous network communication engine), and a plurality of asynchronous data migration processes may be implemented by Rabbitmq (message-oriented middleware), which may be specifically described in related art and is not described herein again.
Fig. 4 is a flowchart of another step S103 shown in the embodiment shown in fig. 1, and as shown in fig. 4, in one implementation, the step S103 may further include the following steps:
in step S1033, after the program data is migrated from the database corresponding to the current version to the database corresponding to the target version by the asynchronous data migration process, the data migration status of the program data corresponding to the current version is changed to migrated.
For example, in an e-commerce application, after program data is migrated from a database corresponding to a current version to a database corresponding to a target version through an asynchronous data migration process, a preset data migration state corresponding to the e-commerce merchant is changed to migrated. The method avoids repeated data or data collision caused by the asynchronous data migration process repeatedly migrating the program data from the database corresponding to the current version to the database corresponding to the target version.
By the scheme, under the condition that the interface change state of the data interface of the target program is changed, the program data of the current version can be migrated to the database corresponding to the target version, so that the integrity of the program data of the target program is guaranteed, and the user experience is improved.
FIG. 5 is a flow chart illustrating a method of data migration, according to an example embodiment, which may further include the steps of, as shown in FIG. 5:
in step S104, the service version is determined according to the audit state of the target version of the target program.
For example, in an e-commerce application, a merchant is a decider of a service version of a target program, and can determine the service version of the target program based on software requirements, the number of categories is large, merchants with intense promotion are interested in adopting the target version to meet the needs of commercial marketing, and the categories are small, and merchants with little product requirement change consider that the current version meets the needs and do not like frequently updating the target version. The application side can submit the target version of the target program to the platform side for examination according to the software requirement of the application side. For merchants who do not wish to use the target version, the target version of the target program may not be submitted for review, so that the current version continues to be used as the service version.
In some possible implementations, the service version may be determined from the audit status of the target version of the target program in the following manner.
In the method 1, when the audit state of the target version of the target program is in the audit or fails, the current version of the target program is used as the service version.
For example, in the e-commerce application, in the case that the target version of the target program submitted by the merchant has not passed the audit or the result of the audit is failed, the current version of the target program is taken as the service version.
And in the mode 2, when the auditing state of the target version of the target program is passed, the target version of the target program is used as the service version.
For example, in the e-commerce application, in the case that the audit state of the target version of the target program submitted by the merchant is passed, the target version of the target program is taken as the service version.
In step S105, an interface of the service version is presented to the user, so as to provide the service for the user with the service version.
The user may be an end user shown in fig. 2, for example, a consumer in an e-commerce application, and submit an order through an interface of the service version to complete shopping, an application party shown in fig. 2, for example, a merchant in the e-commerce application, and complete daily operations through an interface of the service version, or an operator shown in fig. 2, for example, an e-commerce platform in the e-commerce application, and complete management of multiple merchants through an interface of the service version, or issue a target version template (for example, an applet template) of a new target program, for the application party to download the target version template to generate a target version.
By the scheme, the service version can be determined according to the auditing state of the target version of the target program, the version requirements of different users are met, the compatibility of the target program is improved, and the user experience is improved.
FIG. 6 is a flow chart illustrating yet another method of data migration, as shown in FIG. 6, which may include the steps of:
in step S601, the audit state of the target version of the target program is acquired.
The target version may be an updated version of the current version of the target program, and the audit status may be passed, failed, and in the audit.
In step S602, the interface change state of the data interface of the target program is acquired.
And acquiring the interface change state of the data interface of the target program under the condition that the audit state of the target version is passed.
In some possible implementations, the data interface change status of the target program may be obtained through a preset version specification (Release notes) of the target version. For a specific description, refer to the description of step S102, which is not repeated herein.
In step S603, the data migration status of the program data corresponding to the current version is acquired.
And the data migration state represents whether the program data is migrated from the database corresponding to the current version to the database corresponding to the target version.
And under the condition that the interface change state represents that the data interface of the target program is changed from the first interface to the second interface, acquiring the data migration state of the program data corresponding to the current version through a preset data migration state.
For example, in the e-commerce application, after submitting the target version of the target program to the audit, the e-commerce merchant serving as the application party changes the preset data migration state corresponding to the e-commerce merchant into non-migration state, which indicates that the e-commerce merchant submits the target version of the target program to the platform party for the audit, and program data of the target program is not migrated.
In step S604, a preset data mapping relationship between the first interface and the second interface of the target program is obtained.
The preset data mapping relation may reflect a field mapping relation between the first interface and the second interface. In some possible implementations, the preset data mapping relationship may be obtained from version descriptions (Release nodes) of the target version.
And under the condition that the data migration state is not migrated, acquiring a preset data mapping relation between a first interface and a second interface of the target program. The preset data mapping relationship may reflect a field mapping relationship of the first interface and the second interface. Further, the preset data mapping relationship may also reflect a corresponding relationship of value spaces in corresponding fields of the first interface and the second interface, which is not limited by the present disclosure.
In step S605, the program data is migrated from the database corresponding to the current version to the database corresponding to the target version according to the preset data mapping relationship through the asynchronous data migration process.
After the preset data mapping relationship is obtained, the asynchronous data migration process may migrate the program data from the database corresponding to the current version to the database corresponding to the target version according to the preset data mapping relationship.
In step S606, the data migration status of the program data corresponding to the current version is changed to migrated.
For example, in an e-commerce application, after program data is migrated from a database corresponding to a current version to a database corresponding to a target version through an asynchronous data migration process, a preset data migration state corresponding to the e-commerce merchant is changed to migrated. The method avoids repeated data or data collision caused by the asynchronous data migration process repeatedly migrating the program data from the database corresponding to the current version to the database corresponding to the target version.
In step S607, the target version of the target program is set as the service version.
And when the auditing state of the target version is passed, taking the target version of the target program as a service version.
In step S608, the current version of the target program is taken as the service version.
And under the condition that the auditing state of the target version is not passed or is in the auditing process, taking the current version of the target program as a service version.
In step S609, an interface of the service version is presented to the user for providing the service to the user with the service version.
The user may be an end user shown in fig. 2, for example, a consumer in an e-commerce application, and submit an order to complete shopping through the interface of the service version, or an application party shown in fig. 2, for example, a merchant in the e-commerce application, and complete daily operations through the interface of the service version, or an operator shown in fig. 2, for example, an e-commerce platform in the e-commerce application, and complete management of multiple merchants through the interface of the service version, or issue an object version template (for example, an applet template) of a new object program, which is used for the application party to download the object version template to generate an object version.
By the scheme, the service version can be determined according to the auditing state of the target version of the target program, the version requirements of different users are met, the compatibility of the target program is improved, and meanwhile, under the condition that the interface change state of the data interface of the target program is changed, the program data of the current version can be migrated to the database corresponding to the target version, so that the integrity of the program data of the target program is guaranteed, and the user experience is improved.
Fig. 7 is a block diagram illustrating an apparatus for data migration according to an example embodiment, and as shown in fig. 7, the apparatus for data migration 700 includes:
a first obtaining module 701 configured to obtain an audit state of a target version of a target program; the target version is an updated version of the current version of the target program;
a second obtaining module 702, configured to obtain an interface change state of the data interface of the target program when the audit state of the target version is passed;
the data migration module 703 is configured to migrate, when the interface change state indicates that the data interface of the target program is changed from the first interface to the second interface, the program data corresponding to the current version from the database corresponding to the current version to the database corresponding to the target version; the first interface is a data interface between the target program and the database corresponding to the current version, and the second interface is a data interface between the target program and the database corresponding to the target version.
Optionally, the data migration module 703 is further configured to:
acquiring a data migration state of program data corresponding to a current version, wherein the data migration state represents whether the program data are migrated from a database corresponding to the current version to a database corresponding to a target version;
and under the condition that the data migration state is not migrated, migrating the program data from the database corresponding to the current version to the database corresponding to the target version through an asynchronous data migration process.
Optionally, the data migration module 703 is further configured to:
acquiring a preset data mapping relation between a first interface and a second interface of a target program;
and migrating the program data from the database corresponding to the current version to the database corresponding to the target version through the asynchronous data migration process according to the preset data mapping relation.
Optionally, the data migration module 703 is further configured to:
and after the program data is migrated from the database corresponding to the current version to the database corresponding to the target version through the asynchronous data migration process, changing the data migration state of the program data corresponding to the current version into the migrated state.
Fig. 8 is a block diagram illustrating an apparatus for data migration according to an example embodiment, where the apparatus for data migration 700 further includes, as shown in fig. 8:
a service module 704 configured to determine a service version according to an audit state of a target version of a target program; and displaying an interface of the service version for the user, wherein the interface is used for providing the service for the user by the service version.
Optionally, the service module 704 is further configured to:
taking the current version of the target program as a service version under the condition that the auditing state of the target version of the target program is in auditing or fails; or,
and when the auditing state of the target version of the target program is passed, taking the target version of the target program as a service version.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
By the aid of the scheme, the service version can be determined according to the auditing state of the target version of the target program, version requirements of different users are met, compatibility of the target program is improved, and meanwhile program data of the current version can be migrated to the database corresponding to the target version under the condition that the interface change state of the data interface of the target program is changed, so that the integrity of the program data of the target program is guaranteed, and user experience is improved.
Fig. 9 is a block diagram illustrating an electronic device 900 in accordance with an example embodiment. As shown in fig. 9, the electronic device 900 may include: a processor 901, a memory 902. The electronic device 900 may also include one or more of a multimedia component 903, an input/output (I/O) interface 904, and a communications component 905.
The processor 901 is configured to control the overall operation of the electronic device 900, so as to complete all or part of the steps in the above-mentioned data migration method. The memory 902 is used to store various types of data to support operation of the electronic device 900, such as instructions for any application or method operating on the electronic device 900 and application-related data, such as contact data, transmitted and received messages, pictures, audio, video, and the like. The Memory 902 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia component 903 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 902 or transmitted through the communication component 905. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 904 provides an interface between the processor 901 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 905 is used for wired or wireless communication between the electronic device 900 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, which is not limited herein. The corresponding communication component 905 may thus include: Wi-Fi module, Bluetooth module, NFC module, etc.
In another exemplary embodiment, a non-transitory computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the method of data migration described above is also provided. For example, the computer readable storage medium may be the memory 902 described above comprising program instructions executable by the processor 901 of the electronic device 900 to perform the method of data migration described above.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method of data migration, the method comprising:
acquiring an auditing state of a target version of a target program; the target version is an updated version of the current version of the target program;
acquiring an interface change state of a data interface of the target program under the condition that the audit state of the target version is passed;
under the condition that the interface change state represents that the data interface of the target program is changed from a first interface to a second interface, program data corresponding to the current version is migrated from the database corresponding to the current version to the database corresponding to the target version; the first interface is a data interface between the target program and the database corresponding to the current version, and the second interface is a data interface between the target program and the database corresponding to the target version.
2. The method of claim 1, wherein migrating the program data corresponding to the current version from the database corresponding to the current version to the database corresponding to the target version comprises:
acquiring a data migration state of the program data corresponding to the current version, wherein the data migration state represents whether the program data is migrated from the database corresponding to the current version to the database corresponding to the target version;
and under the condition that the data migration state is not migrated, migrating the program data from the database corresponding to the current version to the database corresponding to the target version through an asynchronous data migration process.
3. The method of claim 2, wherein migrating the program data from the database corresponding to the current version to the database corresponding to the target version by an asynchronous data migration process comprises:
acquiring a preset data mapping relation between the first interface and the second interface of the target program;
and migrating the program data from the database corresponding to the current version to the database corresponding to the target version through an asynchronous data migration process according to the preset data mapping relation.
4. A method according to claim 2 or 3, characterized in that the method further comprises:
and after the program data is migrated from the database corresponding to the current version to the database corresponding to the target version through an asynchronous data migration process, changing the data migration state of the program data corresponding to the current version into the migrated state.
5. The method of claim 1, further comprising:
determining a service version according to the audit state of the target version of the target program;
and displaying an interface of the service version to a user, and providing the service for the user by using the service version.
6. The method of claim 5, wherein determining a service version based on the audit status of the target version of the target program comprises:
taking the current version of the target program as a service version when the audit state of the target version of the target program is in audit or fails; or,
and taking the target version of the target program as a service version under the condition that the audit state of the target version of the target program is passed.
7. An apparatus for data migration, the apparatus comprising:
a first obtaining module configured to obtain an audit state of a target version of a target program; the target version is an updated version of the current version of the target program;
the second acquisition module is configured to acquire an interface change state of a data interface of the target program under the condition that the audit state of the target version is passed;
the data migration module is configured to migrate the program data corresponding to the current version from the database corresponding to the current version to the database corresponding to the target version under the condition that the interface change state represents that the data interface of the target program is changed from a first interface to a second interface; the first interface is a data interface between the target program and the database corresponding to the current version, and the second interface is a data interface between the target program and the database corresponding to the target version.
8. The apparatus of claim 7, further comprising:
a service module configured to determine a service version according to the audit status of the target version of the target program; and displaying an interface of the service version to a user, and providing the service for the user by using the service version.
9. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1 to 6.
10. A non-transitory computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the steps of the method of any of claims 1-6.
CN202210459645.6A 2022-04-28 2022-04-28 Data migration method and device, electronic equipment and storage medium Active CN114579180B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210459645.6A CN114579180B (en) 2022-04-28 2022-04-28 Data migration method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210459645.6A CN114579180B (en) 2022-04-28 2022-04-28 Data migration method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114579180A true CN114579180A (en) 2022-06-03
CN114579180B CN114579180B (en) 2022-08-09

Family

ID=81784474

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210459645.6A Active CN114579180B (en) 2022-04-28 2022-04-28 Data migration method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114579180B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106909429A (en) * 2017-04-05 2017-06-30 微鲸科技有限公司 A kind of synchronous upgrade method and device
CN107291750A (en) * 2016-03-31 2017-10-24 阿里巴巴集团控股有限公司 A kind of data migration method and device
CN109067823A (en) * 2018-06-11 2018-12-21 中国平安人寿保险股份有限公司 A kind of data migration method, device, computer equipment and storage medium
CN111914194A (en) * 2020-07-02 2020-11-10 网联清算有限公司 Business system changing method and device, electronic equipment and storage medium
CN112114865A (en) * 2020-08-27 2020-12-22 微民保险代理有限公司 Version data processing method and device, storage medium and electronic device
US20210109922A1 (en) * 2019-10-11 2021-04-15 International Business Machines Corporation Database migration technique
CN113656100A (en) * 2021-08-17 2021-11-16 城云科技(中国)有限公司 Interface switching method and device, electronic device and computer program product
CN114356891A (en) * 2022-01-04 2022-04-15 金卡智能集团股份有限公司 Data migration method, device, storage medium and program product

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291750A (en) * 2016-03-31 2017-10-24 阿里巴巴集团控股有限公司 A kind of data migration method and device
CN106909429A (en) * 2017-04-05 2017-06-30 微鲸科技有限公司 A kind of synchronous upgrade method and device
CN109067823A (en) * 2018-06-11 2018-12-21 中国平安人寿保险股份有限公司 A kind of data migration method, device, computer equipment and storage medium
US20210109922A1 (en) * 2019-10-11 2021-04-15 International Business Machines Corporation Database migration technique
CN111914194A (en) * 2020-07-02 2020-11-10 网联清算有限公司 Business system changing method and device, electronic equipment and storage medium
CN112114865A (en) * 2020-08-27 2020-12-22 微民保险代理有限公司 Version data processing method and device, storage medium and electronic device
CN113656100A (en) * 2021-08-17 2021-11-16 城云科技(中国)有限公司 Interface switching method and device, electronic device and computer program product
CN114356891A (en) * 2022-01-04 2022-04-15 金卡智能集团股份有限公司 Data migration method, device, storage medium and program product

Also Published As

Publication number Publication date
CN114579180B (en) 2022-08-09

Similar Documents

Publication Publication Date Title
CN107391114B (en) Page visual rendering method and device
CN108334387B (en) Dynamic interface rendering method and device
CN111061956B (en) Method and apparatus for generating information
CN103069413A (en) Customizing content displayed for a user based on user preferences of another user
CN111258998A (en) Data verification method, device, medium and electronic equipment
US10152469B2 (en) Analytics report segments and controls
CN107977316A (en) A kind of method, client and system for simulating remote procedure call
CN106998314B (en) Account interaction method and device
CN115795211A (en) Page display method, device, system, equipment and storage medium
CN114707472A (en) Method and device for field merging and electronic equipment
WO2020119173A1 (en) Information pushing method and apparatus
CN114579180B (en) Data migration method and device, electronic equipment and storage medium
CN116226499B (en) Information query method and device and electronic equipment
CN116450920A (en) Data query method and device and electronic equipment
CN116166514A (en) Multi-channel data linkage processing method, device, computer equipment and storage medium
CN113590253B (en) Server-side-based communication interaction method, device and storage medium
CN114546370A (en) Data docking method and related device
CN112835962A (en) Information display method and device, electronic equipment and storage medium
CN113051477A (en) Content recommendation method and device, electronic equipment and medium
CN114428823B (en) Data linkage method, device, equipment and medium based on multidimensional variable expression
CN113704418A (en) Customer service robot system, related method, device and equipment
CN115904380B (en) Page field creation and assembly method, electronic device and computer readable storage medium
CN115238660B (en) Form dynamic generation method, device, equipment and storage medium
CN108845953A (en) The method and device of interface testing
CN116739612B (en) Method for displaying rights and interests information and electronic equipment

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
GR01 Patent grant
GR01 Patent grant