CN114579180A - Data migration method and device, electronic equipment and storage medium - Google Patents
Data migration method and device, electronic equipment and storage medium Download PDFInfo
- 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
- program
- interface
- 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
Links
- 230000005012 migration Effects 0.000 title claims abstract description 96
- 238000013508 migration Methods 0.000 title claims abstract description 96
- 238000000034 method Methods 0.000 title claims abstract description 82
- 238000012550 audit Methods 0.000 claims abstract description 38
- 230000008859 change Effects 0.000 claims abstract description 32
- 230000008569 process Effects 0.000 claims description 29
- 238000013506 data mapping Methods 0.000 claims description 27
- 238000012552 review Methods 0.000 claims description 26
- 238000004590 computer program Methods 0.000 claims description 6
- 238000004891 communication Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 8
- 238000013507 mapping Methods 0.000 description 5
- 230000005236 sound signal Effects 0.000 description 4
- 238000011161 development Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/214—Database migration support
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/219—Managing data history or versioning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/76—Adapting 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)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本公开涉及一种数据迁移的方法、装置、电子设备及存储介质,涉及软件领域。首先获取目标程序的目标版本的审核状态;然后在所述目标版本的审核状态为已通过的情况下,获取所述目标程序的数据接口的接口变更状态;在所述接口变更状态表征所述目标程序的数据接口由第一接口变更为第二接口的情况下,将所述当前版本对应的程序数据由所述当前版本对应的数据库迁移至所述目标版本对应的数据库。通过上述方案,能够在该目标程序的数据接口的接口变更状态发生变更的情况下,将当前版本的程序数据迁移到目标版本对应的数据库,保障目标程序的程序数据的完整性,提升用户的体验。
The present disclosure relates to a method, apparatus, electronic device and storage medium for data migration, and relates to the field of software. First, the audit status of the target version of the target program is obtained; then, if the audit status of the target version is passed, the interface change status of the data interface of the target program is obtained; the interface change status represents the target When the data interface of the 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. Through the above solution, when the interface change state of the data interface of the target program changes, the program data of the current version can be migrated to the database corresponding to the target version, so as to ensure the integrity of the program data of the target program and improve the user experience. .
Description
技术领域technical field
本公开涉及软件领域,尤其涉及一种数据迁移的方法、装置、电子设备及存储介质。The present disclosure relates to the field of software, and in particular, to a data migration method, apparatus, electronic device, and storage medium.
背景技术Background technique
随着互联网技术的发展,软件版本的迭代更新速度不断加快,由于软件版本迭代更新导致的不同版本的软件兼容性问题日渐突出,同时由于版本迭代可能还会涉及到数据接口的变更,在目标版本的数据接口发生变更的情况下,当前版本的程序数据无法及时迁移到目标版本的数据库中,可能会导致当前版本的程序数据丢失或者访问不方便,影响用户的体验。With the development of Internet technology, the iterative update speed of software versions has been accelerated, and the software compatibility problems of different versions caused by the iterative update of software versions have become increasingly prominent. If the data interface of the current version is changed, the program data of the current version cannot be migrated to the database of the target version in time, which may cause the program data of the current version to be lost or inconvenient to access, affecting the user experience.
例如,采用小程序的电商软件,在电商软件的运营者发布了新的小程序模板且新的小程序模板的数据接口发生变更的情况下,当前版本的程序数据无法与新的数据接口兼容,可能导致当前版本的订单数据无法及时迁移到新版本的数据库中,可能会导致订单数据丢失或者无法访问,影响用户的体验。For example, in the case of e-commerce software using mini-programs, when the operator of the e-commerce software releases a new mini-program template and the data interface of the new mini-program template is changed, the program data of the current version cannot interface with the new data Compatible, it may cause the order data of the current version to be unable to be migrated to the database of the new version in time, which may result in the loss or inaccessibility of the order data, affecting the user experience.
发明内容SUMMARY OF THE INVENTION
为克服相关技术中存在的问题,本公开提供一种数据迁移的方法、装置、电子设备及存储介质。In order to overcome the problems existing in the related art, the present disclosure provides a data migration method, apparatus, electronic device and storage medium.
根据本公开实施例的第一方面,提供一种数据迁移的方法,所述方法包括:According to a first aspect of the embodiments of the present disclosure, there is provided a method for data migration, the method comprising:
获取目标程序的目标版本的审核状态;所述目标版本为所述目标程序的当前版本的更新版本;Obtain the audit status of the target version of the target program; the target version is an updated version of the current version of the target program;
在所述目标版本的审核状态为已通过的情况下,获取所述目标程序的数据接口的接口变更状态;Obtain the interface change state of the data interface of the target program when the audit status of the target version is passed;
在所述接口变更状态表征所述目标程序的数据接口由第一接口变更为第二接口的情况下,将所述当前版本对应的程序数据由所述当前版本对应的数据库迁移至所述目标版本对应的数据库;所述第一接口为所述目标程序,与所述当前版本对应的数据库之间的数据接口,所述第二接口为所述目标程序,与所述目标版本对应的数据库之间的数据接口。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 target version The corresponding database; the first interface is the target program, the data interface between the database corresponding to the current version, the second interface is the target program, and the database corresponding to the target version. data interface.
可选地,所述将所述当前版本对应的程序数据由所述当前版本对应的数据库迁移至所述目标版本对应的数据库包括:Optionally, 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 the data migration state of the program data corresponding to the current version, where the data migration state represents whether the program data has been migrated from the database corresponding to the current version to the database corresponding to the target version;
在所述数据迁移状态为未迁移的情况下,通过异步数据迁移进程将所述程序数据由所述当前版本对应的数据库迁移至所述目标版本对应的数据库。When the data migration state 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 an asynchronous data migration process.
可选地,所述通过异步数据迁移进程将所述程序数据由所述当前版本对应的数据库迁移至所述目标版本对应的数据库包括:Optionally, the process of 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 includes:
获取所述目标程序的所述第一接口和所述第二接口的预设数据映射关系;Obtain the preset data mapping relationship between the first interface and the second interface of the target program;
通过异步数据迁移进程根据所述预设数据映射关系将所述程序数据由所述当前版本对应的数据库迁移至所述目标版本对应的数据库。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 according to the preset data mapping relationship.
可选地,所述方法还包括:Optionally, the method further includes:
在通过异步数据迁移进程将所述程序数据由所述当前版本对应的数据库迁移至所述目标版本对应的数据库之后,将所述当前版本对应的所述程序数据的数据迁移状态变更为已迁移。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, the data migration state of the program data corresponding to the current version is changed to migrated.
可选地,所述方法还包括:Optionally, the method further includes:
根据所述目标程序的所述目标版本的所述审核状态确定服务版本;Determine a service version according to the audit status of the target version of the target program;
向用户展示所述服务版本的界面,用于以所述服务版本为所述用户提供服务。The interface of the service version is displayed to the user, so as to provide the user with the service with the service version.
可选地,所述根据所述目标程序的所述目标版本的所述审核状态确定服务版本包括:Optionally, the determining a service version according to the audit status of the target version of the target program includes:
在所述目标程序的所述目标版本的所述审核状态为审核中或者未通过的情况下,将所述目标程序的所述当前版本作为服务版本;或者,In the case that the review status of the target version of the target program is under review or failed, the current version of the target program is used as a service version; or,
在所述目标程序的所述目标版本的所述审核状态为已通过的情况下,将所述目标程序的所述目标版本作为服务版本。When the audit status of the target version of the target program is passed, the target version of the target program is used as a service version.
根据本公开实施例的第二方面,提供一种数据迁移的装置,所述装置包括:According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for data migration, the apparatus comprising:
第一获取模块,被配置为获取目标程序的目标版本的审核状态;所述目标版本为所述目标程序的当前版本的更新版本;The first acquisition module is configured to acquire the audit status of the target version of the target program; the target version is an updated version of the current version of the target program;
第二获取模块,被配置为在所述目标版本的审核状态为已通过的情况下,获取所述目标程序的数据接口的接口变更状态;a second acquisition module, configured to acquire the interface change status of the data interface of the target program when the audit status of the target version is passed;
数据迁移模块,被配置为在所述接口变更状态表征所述目标程序的数据接口由第一接口变更为第二接口的情况下,将所述当前版本对应的程序数据由所述当前版本对应的数据库迁移至所述目标版本对应的数据库;所述第一接口为所述目标程序,与所述当前版本对应的数据库之间的数据接口,所述第二接口为所述目标程序,与所述目标版本对应的数据库之间的数据接口。The data migration module is configured to change the program data corresponding to the current version from the program data corresponding to the current version to the data interface corresponding to the current version 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 database is migrated to the database corresponding to the target version; the first interface is the target program, a data interface between the database corresponding to the current version, and the second interface is the target program, which is the same as the target program. The data interface between the databases corresponding to the target version.
可选地,所述数据迁移模块,还被配置为:Optionally, the data migration module is further configured to:
获取所述当前版本对应的所述程序数据的数据迁移状态,所述数据迁移状态表征是否已经将所述程序数据由所述当前版本对应的数据库迁移至所述目标版本对应的数据库;acquiring the data migration state of the program data corresponding to the current version, where the data migration state represents whether the program data has been migrated from the database corresponding to the current version to the database corresponding to the target version;
在所述数据迁移状态为未迁移的情况下,通过异步数据迁移进程将所述程序数据由所述当前版本对应的数据库迁移至所述目标版本对应的数据库。When the data migration state 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 an asynchronous data migration process.
可选地,所述数据迁移模块,还被配置为:Optionally, the data migration module is further configured to:
获取所述目标程序的所述第一接口和所述第二接口的预设数据映射关系;Obtain the preset data mapping relationship between the first interface and the second interface of the target program;
通过异步数据迁移进程根据所述预设数据映射关系将所述程序数据由所述当前版本对应的数据库迁移至所述目标版本对应的数据库。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 according to the preset data mapping relationship.
可选地,所述数据迁移模块,还被配置为:Optionally, the data migration module is further configured to:
在通过异步数据迁移进程将所述程序数据由所述当前版本对应的数据库迁移至所述目标版本对应的数据库之后,将所述当前版本对应的所述程序数据的数据迁移状态变更为已迁移。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, the data migration state of the program data corresponding to the current version is changed to migrated.
可选地,所述装置还包括:Optionally, the device further includes:
服务模块,被配置为根据所述目标程序的所述目标版本的所述审核状态确定服务版本;向用户展示所述服务版本的界面,用于以所述服务版本为所述用户提供服务。The service module is configured to determine a service version according to the audit status of the target version of the target program; and display an interface of the service version to a user, so as to provide a service for the user with the service version.
可选的,所述服务模块,还被配置为:Optionally, the service module is further configured to:
在所述目标程序的所述目标版本的所述审核状态为审核中或者未通过的情况下,将所述目标程序的所述当前版本作为服务版本;或者,In the case that the review status of the target version of the target program is under review or failed, the current version of the target program is used as a service version; or,
在所述目标程序的所述目标版本的所述审核状态为已通过的情况下,将所述目标程序的所述目标版本作为服务版本。When the audit status of the target version of the target program is passed, the target version of the target program is used as a service version.
根据本公开实施例的第三方面,提供一种电子设备,所述电子设备包括:According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, the electronic device comprising:
存储器,其上存储有计算机程序;a memory on which a computer program is stored;
处理器,用于执行所述存储器中的所述计算机程序,以实现上述第一方面中的任一实施方式所述方法的步骤。A processor, configured to execute the computer program in the memory, to implement the steps of the method in any one of the above-mentioned first aspect.
根据本公开实施例的第四方面,提供一种非临时性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述第一方面所述方法的步骤。According to a fourth aspect of the embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, implements the steps of the method described in the first aspect.
本公开的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
本公开首先获取目标程序的目标版本的审核状态;然后在所述目标版本的审核状态为已通过的情况下,获取所述目标程序的数据接口的接口变更状态;在所述接口变更状态表征所述目标程序的数据接口由第一接口变更为第二接口的情况下,将所述当前版本对应的程序数据由所述当前版本对应的数据库迁移至所述目标版本对应的数据库。通过上述方案,能够在该目标程序的数据接口的接口变更状态发生变更的情况下,将当前版本的程序数据迁移到目标版本对应的数据库,保障目标程序的程序数据的完整性,提升用户的体验。The present disclosure first obtains the audit status of the target version of the target program; then, when the audit status of the target version is passed, obtains the interface change status of the data interface of the target program; When 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. Through the above solution, when the interface change state of the data interface of the target program changes, the program data of the current version can be migrated to the database corresponding to the target version, so as to ensure the integrity of the program data of the target program and improve the user experience. .
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。Other features and advantages of the present disclosure will be described in detail in the detailed description that follows.
附图说明Description of 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 not to limit the disclosure.
图1是根据一示例性实施例示出的一种数据迁移的方法的流程图。Fig. 1 is a flow chart of a data migration method according to an exemplary embodiment.
图2是根据一示例性实施例示出的一种目标程序的相关方的逻辑图。Fig. 2 is a logic diagram of related parties of a target program according to an exemplary embodiment.
图3是根据一示例性实施例示出的另一种数据迁移的方法的流程图。Fig. 3 is a flow chart of another data migration method according to an exemplary embodiment.
图4是根据一示例性实施例示出的又一种数据迁移的方法的流程图。Fig. 4 is a flow chart of yet another data migration method according to an exemplary embodiment.
图5是根据一示例性实施例示出的又一种数据迁移的方法的流程图。Fig. 5 is a flow chart of yet another data migration method according to an exemplary embodiment.
图6是根据一示例性实施例示出的又一种数据迁移的方法的流程图。Fig. 6 is a flow chart of yet another data migration method according to an exemplary embodiment.
图7是根据一示例性实施例示出的一种数据迁移的装置的框图。Fig. 7 is a block diagram of an apparatus for data migration according to an exemplary embodiment.
图8是根据一示例性实施例示出的另一种数据迁移的装置的框图。Fig. 8 is a block diagram of another apparatus for data migration according to an exemplary embodiment.
图9是根据一示例性实施例示出的一种电子设备的框图。Fig. 9 is a block diagram of an electronic device according to an exemplary embodiment.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子,应当理解的是,此处所描述的具体实施方式仅用于说明和解释本公开,并不用于限制本公开。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. When the following description refers to the drawings, the same numerals in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure, as recited in the appended claims, it being understood that the specific embodiments described herein are for illustration and explanation only The present disclosure is not intended to limit the present disclosure.
需要说明的是,本申请中所有获取信号、信息或数据的动作都是在遵照所在地国家相应的数据保护法规政策的前提下,并获得由相应装置所有者给予授权的情况下进行的。It should be noted that all the actions of obtaining signals, information or data in this application are carried out under the premise of complying with the corresponding data protection regulations and policies of the local country and with the authorization of the corresponding device owner.
首先,对本公开的应用场景进行说明,随着互联网技术的发展,软件版本的迭代速度加快,由于软件版本迭代更新导致的软件兼容性问题日渐突出,发明人发现,不同用户对于软件版本的偏好不同,例如,电商小程序软件中,运营方可以发布新的小程序模板,例如支持秒杀,团购等新功能。在软件版本切换后,目标程序的目标版本对应的数据接口可能会发生变更,例如由于增加了秒杀,团购等新功能,从而使订单数据的数据接口增加了秒杀价格字段。在目标程序的数据接口发生变更的情况下,如果当前版本对应的程序数据无法及时迁移到目标版本对应的数据库,可能会导致当前版本的程序数据丢失或者访问不方便,影响用户的体验。First, the application scenarios of the present disclosure are explained. With the development of Internet technology, the iteration speed of software versions is accelerated, and the software compatibility problem caused by the iterative update of software versions has become increasingly prominent. The inventor found that different users have different preferences for software versions. , For example, in e-commerce applet software, the operator can release new applet templates, such as supporting new functions such as seckill and group purchase. After the software version is switched, the data interface corresponding to the target version of the target program may change. For example, due to the addition of new functions such as seckill and group purchase, the data interface of the order data adds a seckill price field. When the data interface of the target program changes, if the program data corresponding to the current version cannot be migrated to the database corresponding to the target version in time, the program data of the current version may be lost or inconvenient to access, affecting the user experience.
为此,本公开提供一种数据迁移的方法、装置、电子设备及存储介质。能够在该目标程序的数据接口的接口发生变更的情况下,将当前版本的程序数据迁移到目标版本对应的数据库,保障目标程序的程序数据的完整性,提升用户的体验。To this end, the present disclosure provides a data migration method, apparatus, electronic device, and storage medium. When the interface 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 as to ensure the integrity of the program data of the target program and improve the user experience.
下面结合具体实施例对本公开进行说明。The present disclosure will be described below with reference to specific embodiments.
图1是根据一示例性实施例示出的一种数据迁移的方法的流程图,如图1所示,该方法可以包括以下步骤:FIG. 1 is a flowchart of a method for data migration according to an exemplary embodiment. As shown in FIG. 1 , the method may include the following steps:
在步骤S101中,获取目标程序的目标版本的审核状态。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 review status may include passed, failed, and under review.
在互联网应用程序中,目标程序的目标版本发布通常需要经过平台方的审核,该平台方可以是应用商店平台方,也可以是基础业务平台方,例如聊天小程序平台、支付小程序平台等,本公开对此不做限制。图2是根据一示例性实施例示出的一种目标程序的相关方的逻辑图,如图2所示,应用方是目标程序的服务版本的决定者,可以根据自己的软件需求将目标程序的目标版本提交给平台方审核,在通过平台方的审核以后,可以采用目标程序的目标版本向终端用户提供服务。上述目标程序的目标版本可以由运营方提供,也可以从其他渠道获取生成,本公开对此不做限制。例如,电商应用中,作为电商商户的应用方可以应用运营方提供的小程序模板,生成该目标程序的目标版本提交平台方审核,也可以应用第三方小程序模板或者二次开发生成该目标程序的目标版本提交平台方审核,本公开对此不做限制,可选地,该目标程序的相关方还可以包括运营方,例如电商应用中的电商平台,可以管理电商平台中的多个电商商户,也可以向电商商户发布目标程序的目标版本模板(例如小程序模板),提升电商商户的盈利能力。In Internet applications, the release of the target version of the target program usually needs to be reviewed by the platform side, which can be the application store platform side or the basic business platform side, such as chat applet platform, payment applet platform, etc. This disclosure does not limit this. Fig. 2 is a logic diagram of related parties of a target program according to an exemplary embodiment. As shown in Fig. 2, the application party is the decider of the service version of the target program, and can change the target program's service version according to its own software requirements. The target version is submitted to the platform for review. After passing the platform's review, the target version of the target program can be used to provide services to end users. The target version of the above target program may be provided by the operator, or may be obtained and generated from other channels, which is not limited in the present disclosure. For example, in an e-commerce application, the application side as an e-commerce merchant can apply the applet template provided by the operator to generate the target version of the target program and submit it to the platform side for review, or use a third-party applet template or secondary development to generate the target program. The target version of the target program is submitted to the platform party for review, which is not limited in this disclosure. Optionally, the relevant parties of the target program may also include operators, such as the e-commerce platform in the e-commerce application, which can manage the e-commerce platform. You can also publish target version templates of target programs (such as mini-program templates) to e-commerce merchants to improve the profitability of e-commerce merchants.
在步骤S102中,在目标版本的审核状态为已通过的情况下,获取目标程序的数据接口的接口变更状态。In step S102, if the audit status of the target version is passed, the interface change status of the data interface of the target program is acquired.
在目标版本的审核状态为已通过的情况下,可以使用该目标版本为用户提供服务,在一些可能的实现方式中,可以通过预设的该目标版本的版本说明(Release notes),获取该目标程序的数据接口变更状态。When the audit status of the target version is passed, the target version can be used to provide services to users. In some possible implementations, the target version can be obtained through the preset Release notes of the target version. The program's data interface changes state.
示例地,在电商应用中,在目标版本中新增了秒杀模块,在作为应用方的某一商户提交的目标版本的审核状态为已通过的情况下,终端用户打开该商户的界面时,将会展示该目标版本的界面,即能够提供新增的秒杀功能,相应地,在目标程序的数据接口中可以在订单数据表中增加秒杀价格字段,用以记录订单中通过秒杀方式成交的价格信息。可以通过预设的该目标版本的版本说明获取该目标程序的数据接口变更状态。For example, in an e-commerce application, a seckill module is added to the target version. When the approval status of the target version submitted by a merchant serving as the application party is passed, when the end user opens the merchant's interface, The interface of the target version will be displayed, that is, it can provide the newly added seckill function. Correspondingly, in the data interface of the target program, a seckill price field can be added to the order data table to record the price of transactions through seckill in the order. information. The data interface change status of the target program can be obtained through the preset version description of the target version.
在步骤S103中,在接口变更状态表征目标程序的数据接口由第一接口变更为第二接口的情况下,将当前版本对应的程序数据由当前版本对应的数据库迁移至目标版本对应的数据库。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.
其中,该第一接口为目标程序,与当前版本对应的数据库之间的数据接口,该第二接口为目标程序,与目标版本对应的数据库之间的数据接口。Wherein, the first interface is the data interface between the target program and the database corresponding to the current version, and the second interface is the data interface between the target program and the database corresponding to the target version.
这样,通过上述方案,能够在该目标程序的数据接口的接口变更状态发生变更的情况下,将当前版本的程序数据迁移到目标版本对应的数据库,保障目标程序的程序数据的完整性,提升用户的体验。In this way, through the above solution, when the interface change state of the data interface of the target program changes, the program data of the current version can be migrated to the database corresponding to the target version, so as to ensure the integrity of the program data of the target program and improve the user experience. experience.
图3是根据图1所示实施例示出的一种步骤S103的流程图,如图3所示,在一种实施方式中,该步骤S103的步骤可以包括以下步骤:FIG. 3 is a flowchart of step S103 according to the embodiment shown in FIG. 1 . As shown in FIG. 3 , in an embodiment, the steps of step S103 may include the following steps:
在步骤S1031中,获取当前版本对应的程序数据的数据迁移状态。In step S1031, the data migration state of the program data corresponding to the current version is acquired.
其中,数据迁移状态表征是否已经将程序数据由当前版本对应的数据库迁移至目标版本对应的数据库。The data migration state represents whether the program data has been 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 an e-commerce application, after the e-commerce merchant as the application party submits the target version of the target program for review, the preset data migration status corresponding to the e-commerce merchant is changed to not migrated, indicating that the e-commerce merchant is sending the data to The platform side submitted the target version of the target program for review, and the program data of the target program has not been migrated.
在步骤S1032中,在数据迁移状态为未迁移的情况下,通过异步数据迁移进程将程序数据由当前版本对应的数据库迁移至目标版本对应的数据库。In step S1032, when the data migration state 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 an asynchronous data migration process.
该异步数据迁移表征数据迁移过程中,不影响该目标程序的正常使用。The asynchronous data migration indicates that the normal use of the target program is not affected during the data migration process.
示例地,在电商应用中,在目标版本的审核状态为已通过的情况下,新接入的终端用户的展示界面为该目标版本的界面。已经接入的终端用户会接收到版本变更的提示,响应于用户的操作,将已经接入的终端用户的展示界面切换为该目标版本。终端用户通过该目标版本的界面生成的程序数据通过该目标版本的第二接口存储于该目标版本对应的数据库中。For example, in an e-commerce application, when the approval status of the target version is passed, the display interface of the newly accessed terminal user is the interface of the target version. The terminal user who has accessed will receive a prompt of version change, and in response to the user's operation, the display interface of the terminal user who has accessed will be switched to the target version. The program data generated by the end 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 can be migrated from the database corresponding to the current version to the database corresponding to the target version through the asynchronous data migration process through the following steps.
步骤一、获取目标程序的第一接口和第二接口的预设数据映射关系。Step 1: Obtain the preset data mapping relationship between the first interface and the second interface of the target program.
在一些可能的实现方式中,该预设数据映射关系可以从该目标版本的版本说明(Release notes)中获取。In some possible implementation manners, the preset data mapping relationship may be obtained from the release notes (Release notes) of the target version.
该预设数据映射关系可以反映第一接口和第二接口的字段映射关系。The preset data mapping relationship may reflect the field mapping relationship between the first interface and the second interface.
示例地,在电商应用中,该目标程序的目标版本增加了秒杀模块,在订单管理表中增加了秒杀价格,该数据映射关系可以包含表1所述的字段映射关系。For example, in an e-commerce application, the target version of the target program adds a seckill module, and adds a seckill price in the order management table, and the data mapping relationship may include the field mapping relationship described in Table 1.
表1Table 1
如表1所示,第二接口中的秒杀价格为新增字段,其余均是一一对应的关系。As shown in Table 1, the seckill price in the second interface is a newly added field, and the rest are in a one-to-one correspondence.
进一步地,该预设数据映射关系也可以反映第一接口和第二接口对应字段中取值空间的对应关系。Further, the preset data mapping relationship may also reflect the corresponding relationship between the value spaces in the corresponding fields of the first interface and the second interface.
示例地,在电商应用中,第二接口相比第一接口某些字段的取值空间发生了变化,则该数据映射关系可以包含表2所述的取值空间映射关系。For example, in an e-commerce application, the value space of some fields of the second interface has changed compared with that of the first interface, and the data mapping relationship may include the value space mapping relationship described in Table 2.
表2Table 2
如表2所示,第一接口和第二接口对应的支付方式字段的取值空间发生了变化,第一接口中为[0,1,2]。第二接口中为[100,101,102,103],该第二接口还新增了一种支付方式。As shown in Table 2, the value space of the payment method fields corresponding to the first interface and the second interface has changed, and the first interface is [0,1,2]. The second interface is [100, 101, 102, 103], and a new payment method is added to the second interface.
需要说明的是,表1和表2只是给出了数据映射关系示例,本公开对此不做限制。It should be noted that Table 1 and Table 2 only provide examples of data mapping relationships, which are not limited in the present disclosure.
步骤二、通过异步数据迁移进程根据预设数据映射关系将程序数据由当前版本对应的数据库迁移至目标版本对应的数据库。Step 2: Migrate 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 relationship.
在获取到该预设数据映射关系之后,该异步数据迁移进程可以根据该预设数据映射关系,将程序数据由当前版本对应的数据库迁移至目标版本对应的数据库。After acquiring the preset data mapping relationship, the asynchronous data migration process can migrate 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.
在一些可能的实现方式中,该异步数据迁移进程可以通过hyperf(高性能PHP微服务框架)和Swoole(PHP 异步网络通信引擎)实现,多个异步数据迁移进程可以通过Rabbitmq(面向消息的中间件),具体可以参见相关技术中描述,此处不再赘述。In some possible implementations, the asynchronous data migration process can be implemented through hyperf (a high-performance PHP microservice framework) and Swoole (PHP asynchronous network communication engine), and multiple asynchronous data migration processes can be implemented through Rabbitmq (message-oriented middleware). ), for details, please refer to the description in the related art, which will not be repeated here.
图4是根据图1所示实施例示出的另一种步骤S103的流程图,如图4所示,在一种实施方式中,该步骤S103的步骤还可以包括以下步骤:FIG. 4 is a flowchart of another step S103 according to the embodiment shown in FIG. 1. As shown in FIG. 4, in an embodiment, the steps of step S103 may further include the following steps:
在步骤S1033中,在通过异步数据迁移进程将程序数据由当前版本对应的数据库迁移至目标版本对应的数据库之后,将当前版本对应的程序数据的数据迁移状态变更为已迁移。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 through 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 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 preset data migration state corresponding to the e-commerce merchant is changed to migrated. . It is avoided that the asynchronous data migration process repeatedly migrates program data from the database corresponding to the current version to the database corresponding to the target version, thereby causing duplicate data or data conflicts.
通过上述的方案,能够在该目标程序的数据接口的接口变更状态发生变更的情况下,将当前版本的程序数据迁移到目标版本对应的数据库,保障目标程序的程序数据的完整性,提升用户的体验。Through the above solution, when 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 as to ensure the integrity of the program data of the target program and improve the user experience. experience.
图5是根据一示例性实施例示出的一种数据迁移的方法的流程图,如图5所示,该方法还可以包括以下步骤:FIG. 5 is a flowchart of a method for data migration according to an exemplary embodiment. As shown in FIG. 5 , the method may further include the following steps:
在步骤S104中,根据目标程序的目标版本的审核状态确定服务版本。In step S104, the service version is determined according to the audit status of the target version of the target program.
示例地,在电商应用中,商户是目标程序的服务版本的决定者,可以基于软件需求确定目标程序的服务版本,品类多,促销力度激进的商户热衷于采用目标版本以满足商业营销的需要,而品类少,产品需求变化不大的商户认为当前版本满足需求,不愿意频繁的更新目标版本。应用方可以根据自己的软件需求将目标程序的目标版本提交给平台方审核。对于没有意愿使用目标版本的商户,则可以不将目标程序的目标版本提交审核,从而继续使用当前版本作为服务版本。For example, in an e-commerce application, the merchant is the decider of the service version of the target program, and can determine the service version of the target program based on software requirements. Merchants with many categories and aggressive promotions are keen to adopt the target version to meet the needs of business marketing. , and merchants with few categories and little change in product demand think that the current version meets the demand, and are unwilling to frequently update the target version. The application side can submit the target version of the target program to the platform side for review according to its own software requirements. For merchants who are not willing to use the target version, they can continue to use the current version as the service version without submitting the target version of the target program for review.
在一些可能的实现方式中,可以通过如下的方式根据目标程序的目标版本的审核状态确定服务版本。In some possible implementations, the service version can be determined according to the audit status of the target version of the target program in the following manner.
方式1、在目标程序的目标版本的审核状态为审核中或者未通过的情况下,将目标程序的当前版本作为服务版本。Mode 1: In the case that the audit status of the target version of the target program is under review or failed, the current version of the target program is used as the service version.
示例地,在电商应用中,在商户提交的该目标程序的目标版本尚未通过审核或者审核结果为未通过的情况下,将目标程序的当前版本作为服务版本。For example, in an e-commerce application, when the target version of the target program submitted by the merchant has not passed the review or the review result is that the target version has failed, the current version of the target program is used as the service version.
方式2、在目标程序的目标版本的审核状态为已通过的情况下,将目标程序的目标版本作为服务版本。Mode 2: When the audit status 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 an e-commerce application, if the approval status of the target version of the target program submitted by the merchant is passed, the target version of the target program is used as the service version.
在步骤S105中,向用户展示服务版本的界面,用于以服务版本为所述用户提供服务。In step S105, the interface of the service version is displayed to the user, so as to provide the user with a service with the service version.
该用户可以是图2所示的终端用户,例如电商应用中的消费者,通过该服务版本的界面提交订单完成购物,也可以是图2所示的应用方,例如电商应用中的商户,通过服务版本的界面完成日常经营,还可以是图2所示的运营方,例如电商应用中的电商平台,通过服务版本的界面完成多个商户的管理,或者发布新的目标程序的目标版本模板(例如小程序模板),用于应用方下载该目标版本模板,生成目标版本。The user can be the end user shown in FIG. 2 , such as a consumer in an e-commerce application, who submits an order through the interface of the service version to complete shopping, or can be an application party shown in FIG. 2 , such as a merchant in an e-commerce application , through the interface of the service version to complete the daily operation, or the operator shown in Figure 2, such as the e-commerce platform in the e-commerce application, through the interface of the service version to complete the management of multiple merchants, or to release new target programs. The target version template (for example, the applet template), which is used by the application party to download the target version template and generate the target version.
通过上述的方案,能够根据目标程序的目标版本的审核状态确定服务版本,满足不同用户的版本需求,提升了目标程序的兼容性,提升用户的体验。Through the above solution, the service version can be determined according to the audit status of the target version of the target program, so as to meet the version requirements of different users, improve the compatibility of the target program, and improve the user experience.
图6是根据一示例性实施例示出的又一种数据迁移的方法的流程图,如图6所示,该方法可以包括以下步骤:Fig. 6 is a flow chart of yet another data migration method according to an exemplary embodiment. As shown in Fig. 6 , the method may include the following steps:
在步骤S601中,获取目标程序的目标版本的审核状态。In step S601, 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 review status may be passed, failed, and under review.
在步骤S602中,获取目标程序的数据接口的接口变更状态。In step S602, the interface change status of the data interface of the target program is acquired.
在目标版本的审核状态为已通过的情况下,获取目标程序的数据接口的接口变更状态。When the audit status of the target version is passed, obtain the interface change status of the data interface of the target program.
在一些可能的实现方式中,可以通过预设的该目标版本的版本说明(Releasenotes),获取该目标程序的数据接口变更状态。具体描述可以参见步骤S102的描述,此处不再赘述。In some possible implementation manners, the change status of the data interface of the target program may be obtained through the preset release notes (Releasenotes) of the target version. For a specific description, refer to the description of step S102, which will not be repeated here.
在步骤S603中,获取当前版本对应的程序数据的数据迁移状态。In step S603, the data migration state of the program data corresponding to the current version is acquired.
其中,数据迁移状态表征是否已经将程序数据由当前版本对应的数据库迁移至目标版本对应的数据库。The data migration state represents whether the program data has been migrated from the database corresponding to the current version to the database corresponding to the target version.
在接口变更状态表征目标程序的数据接口由第一接口变更为第二接口的情况下,可以通过预设的数据迁移状态获取当前版本对应的程序数据的数据迁移状态。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 data migration state of the program data corresponding to the current version can be obtained through the preset data migration state.
例如,在电商应用中,作为应用方的电商商户在将目标程序的目标版本提交审核之后,将该电商商户对应的预设的数据迁移状态变更为未迁移,表征该电商商户向平台方提交了目标程序的目标版本待审核,目标程序的程序数据未进行迁移。For example, in an e-commerce application, after the e-commerce merchant as the application party submits the target version of the target program for review, the preset data migration status corresponding to the e-commerce merchant is changed to not migrated, indicating that the e-commerce merchant is sending the data to The platform side submitted the target version of the target program for review, and the program data of the target program has not been migrated.
在步骤S604中,获取目标程序的第一接口和第二接口的预设数据映射关系。In step S604, a preset data mapping relationship between the first interface and the second interface of the target program is acquired.
其中,该预设数据映射关系可以反映第一接口和第二接口的字段映射关系。在在一些可能的实现方式中,该预设数据映射关系可以从该目标版本的版本说明(Releasenotes)中获取。The preset data mapping relationship may reflect the field mapping relationship between the first interface and the second interface. In some possible implementations, the preset data mapping relationship may be obtained from the release notes (Releasenotes) of the target version.
在数据迁移状态为未迁移的情况下,获取目标程序的第一接口和第二接口的预设数据映射关系。该预设数据映射关系可以反映第一接口和第二接口的字段映射关系。进一步地,该预设数据映射关系也可以反映第一接口和第二接口对应字段中取值空间的对应关系,本公开对此不做限制。When the data migration state is not migrated, the preset data mapping relationship between the first interface and the second interface of the target program is acquired. The preset data mapping relationship may reflect the field mapping relationship between the first interface and the second interface. Further, the preset data mapping relationship may also reflect the corresponding relationship between the value spaces in the corresponding fields of the first interface and the second interface, which is not limited in the present disclosure.
在步骤S605中,通过异步数据迁移进程根据预设数据映射关系将程序数据由当前版本对应的数据库迁移至目标版本对应的数据库。In step S605, 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 according to the preset data mapping relationship.
在获取到该预设数据映射关系之后,该异步数据迁移进程可以根据该预设数据映射关系,将程序数据由当前版本对应的数据库迁移至目标版本对应的数据库。After acquiring the preset data mapping relationship, the asynchronous data migration process can migrate 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.
在步骤S606中,将当前版本对应的程序数据的数据迁移状态变更为已迁移。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 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 preset data migration state corresponding to the e-commerce merchant is changed to migrated. . It is avoided that the asynchronous data migration process repeatedly migrates program data from the database corresponding to the current version to the database corresponding to the target version, thereby causing duplicate data or data conflicts.
在步骤S607中,将目标程序的目标版本作为服务版本。In step S607, the target version of the target program is taken as the service version.
在目标版本的审核状态为已通过的情况下,将目标程序的目标版本作为服务版本。If the audit status of the target version is passed, the target version of the target program is regarded as the service version.
在步骤S608中,将目标程序的当前版本作为服务版本。In step S608, the current version of the target program is taken as the service version.
在目标版本的审核状态为未通过或者审核中的情况下,将目标程序的当前版本作为服务版本。In the case that the review status of the target version is failed or under review, the current version of the target program is regarded as the service version.
在步骤S609中,向用户展示服务版本的界面,用于以服务版本为用户提供服务。In step S609, the interface of the service version is displayed to the user, so as to provide services for the user with the service version.
该用户可以是图2所示的终端用户,例如电商应用中的消费者,通过该服务版本的界面提交订单完成购物,也可以是图2所示的应用方,例如电商应用中的商户,通过服务版本的界面完成日常经营,还可以是图2所示的运营方,例如电商应用中的电商平台,通过服务版本的界面完成多个商户的管理,或者发布新的目标程序的目标版本模板(例如小程序模板),用于应用方下载该目标版本模板,生成目标版本。The user can be the end user shown in FIG. 2 , such as a consumer in an e-commerce application, who submits an order through the interface of the service version to complete shopping, or can be an application party shown in FIG. 2 , such as a merchant in an e-commerce application , through the interface of the service version to complete the daily operation, or the operator shown in Figure 2, such as the e-commerce platform in the e-commerce application, through the interface of the service version to complete the management of multiple merchants, or to release new target programs. The target version template (for example, the applet template), which is used by the application party to download the target version template and generate the target version.
通过上述的方案,能够根据目标程序的目标版本的审核状态确定服务版本,满足不同用户的版本需求,提升了目标程序的兼容性,同时能够在该目标程序的数据接口的接口变更状态发生变更的情况下,将当前版本的程序数据迁移到目标版本对应的数据库,保障目标程序的程序数据的完整性,提升用户的体验。Through the above solution, the service version can be determined according to the audit status of the target version of the target program, the version requirements of different users can be met, the compatibility of the target program can be improved, and the interface change status of the data interface of the target program can be changed. In this case, the program data of the current version is migrated to the database corresponding to the target version, so as to ensure the integrity of the program data of the target program and improve the user experience.
图7是根据一示例性实施例示出的一种数据迁移的装置的框图,如图7所示,该数据迁移的装置700包括:FIG. 7 is a block diagram of a data migration apparatus according to an exemplary embodiment. As shown in FIG. 7 , the
第一获取模块701,被配置为获取目标程序的目标版本的审核状态;目标版本为目标程序的当前版本的更新版本;The first obtaining
第二获取模块702,被配置为在目标版本的审核状态为已通过的情况下,获取目标程序的数据接口的接口变更状态;The
数据迁移模块703,被配置为在接口变更状态表征目标程序的数据接口由第一接口变更为第二接口的情况下,将当前版本对应的程序数据由当前版本对应的数据库迁移至目标版本对应的数据库;第一接口为目标程序,与当前版本对应的数据库之间的数据接口,第二接口为目标程序,与目标版本对应的数据库之间的数据接口。The
可选地,数据迁移模块703,还被配置为:Optionally, the
获取当前版本对应的程序数据的数据迁移状态,数据迁移状态表征是否已经将程序数据由当前版本对应的数据库迁移至目标版本对应的数据库;Obtain the data migration status of the program data corresponding to the current version, and the data migration status represents whether the program data has been migrated from the database corresponding to the current version to the database corresponding to the target version;
在数据迁移状态为未迁移的情况下,通过异步数据迁移进程将程序数据由当前版本对应的数据库迁移至目标版本对应的数据库。When the data migration state 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.
可选地,数据迁移模块703,还被配置为:Optionally, the
获取目标程序的第一接口和第二接口的预设数据映射关系;Obtain the preset data mapping relationship between the first interface and the second interface of the target program;
通过异步数据迁移进程根据预设数据映射关系将程序数据由当前版本对应的数据库迁移至目标版本对应的数据库。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 according to the preset data mapping relationship.
可选地,数据迁移模块703,还被配置为:Optionally, the
在通过异步数据迁移进程将程序数据由当前版本对应的数据库迁移至目标版本对应的数据库之后,将当前版本对应的程序数据的数据迁移状态变更为已迁移。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, the data migration state of the program data corresponding to the current version is changed to migrated.
图8是根据一示例性实施例示出的一种数据迁移的装置的框图,如图8所示,该数据迁移的装置700还包括:FIG. 8 is a block diagram of a data migration apparatus according to an exemplary embodiment. As shown in FIG. 8 , the
服务模块704,被配置为根据目标程序的目标版本的审核状态确定服务版本;向用户展示服务版本的界面,用于以服务版本为用户提供服务。The
可选的,服务模块704,还被配置为:Optionally, the
在目标程序的目标版本的审核状态为审核中或者未通过的情况下,将目标程序的当前版本作为服务版本;或者,If the audit status of the target version of the target program is under review or failed, the current version of the target program is used as the service version; or,
在目标程序的目标版本的审核状态为已通过的情况下,将目标程序的目标版本作为服务版本。When the approval status of the target version of the target program is passed, the target version of the target program is regarded as the service version.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the above-mentioned embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be described in detail here.
通过上述的方案,能够根据目标程序的目标版本的审核状态确定服务版本,满足不同用户的版本需求,提升了目标程序的兼容性,同时能够在该目标程序的数据接口的接口变更状态发生变更的情况下,将当前版本的程序数据迁移到目标版本对应的数据库,保障目标程序的程序数据的完整性,提升用户的体验。Through the above solution, the service version can be determined according to the audit status of the target version of the target program, the version requirements of different users can be met, the compatibility of the target program can be improved, and the interface change status of the data interface of the target program can be changed. In this case, the program data of the current version is migrated to the database corresponding to the target version, so as to ensure the integrity of the program data of the target program and improve the user experience.
图9是根据一示例性实施例示出的一种电子设备900的框图。如图9所示,该电子设备900可以包括:处理器901,存储器902。该电子设备900还可以包括多媒体组件903,输入/输出(I/O)接口904,以及通信组件905中的一者或多者。FIG. 9 is a block diagram of an
其中,处理器901用于控制该电子设备900的整体操作,以完成上述的数据迁移的方法中的全部或部分步骤。存储器902用于存储各种类型的数据以支持在该电子设备900的操作,这些数据例如可以包括用于在该电子设备900上操作的任何应用程序或方法的指令,以及应用程序相关的数据,例如联系人数据、收发的消息、图片、音频、视频等等。该存储器902可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,例如静态随机存取存储器(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),磁存储器,快闪存储器,磁盘或光盘。多媒体组件903可以包括屏幕和音频组件。其中屏幕例如可以是触摸屏,音频组件用于输出和/或输入音频信号。例如,音频组件可以包括一个麦克风,麦克风用于接收外部音频信号。所接收的音频信号可以被进一步存储在存储器902或通过通信组件905发送。音频组件还包括至少一个扬声器,用于输出音频信号。I/O接口904为处理器901和其他接口模块之间提供接口,上述其他接口模块可以是键盘,鼠标,按钮等。这些按钮可以是虚拟按钮或者实体按钮。通信组件905用于该电子设备900与其他设备之间进行有线或无线通信。无线通信,例如Wi-Fi,蓝牙,近场通信(Near FieldCommunication,简称NFC),2G、3G、4G、NB-IOT、eMTC、或其他5G等等,或它们中的一种或几种的组合,在此不做限定。因此相应的该通信组件905可以包括:Wi-Fi模块,蓝牙模块,NFC模块等等。The
在另一示例性实施例中,还提供了一种包括程序指令的非临时性计算机可读存储介质,该程序指令被处理器执行时实现上述的数据迁移的方法的步骤。例如,该计算机可读存储介质可以为上述包括程序指令的存储器902,上述程序指令可由电子设备900的处理器901执行以完成上述的数据迁移的方法。In another exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including program instructions, the program instructions implementing the steps of the above-mentioned data migration method when executed by a processor. For example, the computer-readable storage medium can be the above-mentioned
本领域技术人员在考虑说明书及实践本公开后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or techniques in the technical field not disclosed by the present disclosure . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying 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)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210459645.6A CN114579180B (en) | 2022-04-28 | 2022-04-28 | Method, device, electronic device and storage medium for data migration |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210459645.6A CN114579180B (en) | 2022-04-28 | 2022-04-28 | Method, device, electronic device and storage medium for data migration |
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 | Method, device, electronic device and storage medium for data migration |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114579180B (en) |
Citations (8)
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 |
-
2022
- 2022-04-28 CN CN202210459645.6A patent/CN114579180B/en active Active
Patent Citations (8)
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 |
---|---|---|
CN108737325A (en) | A kind of multi-tenant data partition method, apparatus and system | |
CN111400061A (en) | A data processing method and system | |
CN105335409A (en) | Target user determination method and device and network server | |
CN110472934A (en) | Business audit method, apparatus, readable storage medium storing program for executing and electronic equipment | |
CN111949508A (en) | Method, device, equipment and computer readable medium for testing interface | |
CN111062682B (en) | Work order processing method and device | |
WO2019223136A1 (en) | Data acquisition method and apparatus, and computer device and storage medium | |
CN111159037A (en) | API (application program interface) mock and agent testing method | |
WO2021036583A1 (en) | Blockchain-based clearing method, apparatus and device, and computer storage medium | |
CN113254825B (en) | Page generation method, device, electronic device and storage medium | |
CN108898468A (en) | Information asynchronous processing method, device, computer equipment and storage medium | |
WO2020119173A1 (en) | Information pushing method and apparatus | |
CN113472687B (en) | Data processing method and device | |
CN112036576B (en) | A data processing method, device and electronic device based on data form | |
CN114579180B (en) | Method, device, electronic device and storage medium for data migration | |
US7844978B2 (en) | Artifact management for an extensible runtime environment | |
WO2025036016A1 (en) | Benefit information display method and electronic device | |
US11573808B2 (en) | Methods of providing an integrated interface that includes a virtual mobile device | |
WO2023240840A1 (en) | Micro-service-based multi-channel information isolation method and apparatus, and computer device | |
JP2023184399A (en) | Dynamic computing resource set generation and access control | |
CN116185806A (en) | A testing method and device for a digital currency system | |
CN115022266A (en) | Group member adding method, device, equipment and medium | |
CN115412435A (en) | Customer service quality inspection processing method, device, computer equipment and storage medium | |
CN112306516B (en) | Method and apparatus for updating code | |
CN120045345A (en) | Message processing system, method, device and storage medium |
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 | ||
PP01 | Preservation of patent right | ||
PP01 | Preservation of patent right |
Effective date of registration: 20250313 Granted publication date: 20220809 |
|
PD01 | Discharge of preservation of patent | ||
PD01 | Discharge of preservation of patent |
Date of cancellation: 20250407 Granted publication date: 20220809 |