Feature automatic migration method and device
By establishing a mapping relationship between old features and new features during feature migration, and using feature air-running mechanism to achieve automatic migration, the problems of logical inconsistency, high error rate and low efficiency in traditional feature migration solutions are solved, and efficient and reliable feature migration is achieved.
Patent Information
- Application Number
- CN202510287096.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-04-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional feature migration solutions have problems such as logical inconsistency, high error rate, high verification difficulty and low efficiency, which are difficult to meet the needs of rapid business iteration.
By obtaining the mapping relationship between the old feature and the new feature, perform feature empty runs to obtain the new feature value, and automatically migrate the feature logic through consistency judgment to ensure that the new feature platform and the old feature platform logic are consistent.
It improves the degree of automation and efficiency of feature migration, reduces the error rate, ensures the reliability and accuracy of the migration process, and significantly shortens the migration cycle.
Smart Images

Figure CN119782288A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, relates to large models, and particularly to feature migration, and specifically is a method and device for automatic feature migration. Background Art
[0002] In recent years, with the rapid development of big model technology, the demand for diversified features in modern big models has been growing. To meet these needs, feature platforms continue to introduce new technologies and continuously optimize the data acquisition methods of features to build a more efficient and flexible new generation feature platform. However, there are many challenges in migrating existing features from the old feature platform to the new feature platform. During the migration process, it is necessary to ensure that the feature functions of the old feature platform are not affected, achieve a smooth transition, and avoid interference with the normal operation of the business.
[0003] Traditional feature migration solutions usually use manual configuration to manually migrate the feature logic of the old feature platform to the new feature platform. However, this method has obvious disadvantages: 1. Logical inconsistency: Manual migration can easily lead to deviations in the understanding and implementation of feature logic. Especially when facing complex features, the logic of the new feature platform may not be completely consistent with the old feature platform, which in turn affects business stability.
[0004] 2. High error rate: Manual operations are inevitably accompanied by human errors, such as configuration omissions, parameter input errors, etc. These problems may cause the feature to fail to extract data normally or the extraction results to be abnormal.
[0005] 3. Difficulty in verification: There is a lack of systematic verification methods for the correctness of feature logic after migration, and it relies on manual comparison or sampling inspection, which is not only inefficient but also difficult to fully discover potential problems, especially in scenarios with large data scale and complex features.
[0006] 4. Low efficiency: Manual migration is time-consuming and labor-intensive. Especially when a large number of features are involved, the migration process may take weeks or even months, which makes it difficult to meet the needs of rapid business iteration.
[0007] Therefore, traditional manual migration solutions have significant limitations in reliability and efficiency. Summary of the invention
[0008] The purpose of this application is to provide a method and device for automatic feature migration to solve the problems pointed out in the above background technology.
[0009] In a first aspect, the present application provides a method for automatic feature migration, the method comprising: obtaining a mapping relationship between an old feature on an old feature platform and a new feature on a new feature platform; obtaining an old feature parameter and an old feature value corresponding to the old feature; performing a feature dry run on the old feature based on the mapping relationship and the old feature parameter to obtain a new feature value; after the feature dry run is completed, determining whether the old feature value is consistent with the new feature value; when the determination result is yes, migrating the old feature logic corresponding to the old feature; when the determination result is no, forcing the migration of the old feature logic corresponding to the old feature, or adjusting the new feature logic corresponding to the new feature, and restarting the feature dry run on the old feature until the determination result is yes.
[0010] In this application, first, the mapping relationship between the old features and the new features is obtained to ensure that the new feature platform can accurately reproduce the old feature logic of the old feature platform; then, the new feature value is obtained through a feature dry run, and it is determined whether the old feature value is consistent with the new feature value; finally, the old feature logic is smoothly migrated according to the judgment result, thereby improving the automation and efficiency of the migration; at the same time, during the feature migration process, the reliability and accuracy of the migration plan are effectively verified, ensuring that the feature migration is completed smoothly and safely.
[0011] In an implementation of the first aspect, obtaining old feature parameters and old feature values corresponding to the old feature includes: calling an old feature data acquisition method of the old feature platform to obtain the old feature parameters and the old feature value; the old feature data acquisition method corresponds to the old feature.
[0012] In an implementation manner of the first aspect, the old feature parameter and the old feature value are transmitted through Kafka.
[0013] In an implementation of the first aspect, performing a feature dry run on the old feature based on the mapping relationship and the old feature parameters to obtain a new feature value includes: obtaining a new feature corresponding to the old feature based on the mapping relationship; and executing the new feature logic using the old feature parameters to obtain the new feature value.
[0014] In an implementation of the first aspect, before the step of acquiring a new feature corresponding to the old feature based on the mapping relationship, performing a feature run on the old feature based on the mapping relationship and the old feature parameters also includes: judging whether the old feature is in a state of feature run in progress or in a state of feature run ending; if it is judged that the old feature is in a state of feature run in progress, acquiring a new feature corresponding to the old feature based on the mapping relationship; if it is judged that the old feature is in a state of feature run ending, acquiring the new feature value.
[0015] In an implementation of the first aspect, during the execution of the feature idle run, when the feature idle run reaches a preset condition, the feature idle run is ended.
[0016] In an implementation of the first aspect, after the feature run is completed, the method further includes: generating a run report; and / or after the step of migrating the old feature, the method further includes: adding the old feature to a feature migration list; wherein the features in the feature migration list are all migrated.
[0017] In an implementation of the first aspect, after the step of determining whether the old feature value is consistent with the new feature value, the method further includes: counting the consistency rate between the old feature value and the new feature value, and storing the consistency rate in a database; when the consistency rate is 100%, the corresponding judgment result is yes; and / or the method further includes: comparing the old feature and the new feature to obtain a comparison result, and storing the comparison result in a database; wherein the comparison result includes at least: old feature parameters, old feature values, new feature values and new feature parameters corresponding to the new features.
[0018] In a second aspect, the present application provides a feature automation migration device, the device comprising: an old feature platform, a new feature platform, a feature SDK and a feature empty run module; wherein, the old feature platform stores old features, and old feature parameters and old feature values corresponding to the old features; the new feature platform stores new features, and new feature logic corresponding to the new features; the feature empty run module is arranged on the new feature platform; the feature SDK is respectively connected to the old feature platform, the new feature platform and the feature empty run module, and the feature SDK is used to obtain the mapping relationship between the old features and the new features, and to obtain the old feature parameters and the new feature values. The mapping relationship, the old feature parameters and the old feature value are sent to the feature dry run module; the feature dry run module is used to perform a feature dry run on the old feature based on the mapping relationship and the old feature parameters to obtain a new feature value, and to determine whether the old feature value is consistent with the new feature value after the feature dry run is completed; when the judgment result is yes, the old feature logic corresponding to the old feature is migrated; when the judgment result is no, the old feature logic corresponding to the old feature is forced to be migrated, or the new feature logic corresponding to the new feature is adjusted, and the feature dry run is restarted for the old feature until the judgment result is yes.
[0019] In an implementation method of the second aspect, the feature SDK calls the old feature data acquisition method of the old feature platform to obtain the old feature parameters and the old feature value; the old feature data acquisition method corresponds to the old feature; when the feature SDK calls the old feature data acquisition method, if it is found that the old feature is in the feature migration list, the feature SDK calls the new feature data acquisition method of the new feature platform.
[0020] As described above, the method and device for automatic feature migration described in this application have the following beneficial effects: (1) Compared with the prior art, the present application establishes a mapping relationship between old features and new features during the feature migration process, and uses unified feature parameters (and old feature parameters) and processes to execute feature logic (including old feature logic and new feature logic; wherein, when on the old feature platform, the old feature value can be obtained by executing the old feature logic using the old feature parameters), thereby ensuring that the new feature logic of the new feature platform is completely consistent with the old feature logic of the old feature platform, thereby fundamentally avoiding misunderstanding deviations and implementation errors in manual migration and ensuring logical consistency.
[0021] (2) This application uses an automated feature empty run mechanism to accurately simulate the feature execution process of the old feature platform and compare the new and old feature values of the new and old features in real time. Once a difference is found, the problem can be quickly located and corrected, effectively reducing errors that may be caused by manual operations and greatly reducing the error rate.
[0022] (3) This application introduces consistency statistics and result storage functions. By automatically recording the consistency rate of new and old feature values and the comparison results of new and old features in the database, it provides quantitative evaluation and comprehensive monitoring for the migration process, greatly improving the verification efficiency and accuracy.
[0023] (4) This application can realize batch processing of feature migration through an automated process and automatically complete the migration of features that have passed verification, significantly shortening the migration cycle and meeting the needs of rapid business iteration. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 Shown is a flow chart of the feature automatic migration method described in an embodiment of the present application.
[0025] Figure 2 Shown is a flowchart of performing feature dry run on the old feature based on the mapping relationship and the old feature parameters to obtain new feature values as described in an embodiment of the present application.
[0026] Figure 3 Shown is a schematic diagram of the structure of the feature automatic migration device described in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0028] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0029] Feature migration is to replace the old feature platform with a new feature platform. It is a technology update and iteration. The new feature platform is implemented with new technology, which is better in terms of data acquisition efficiency and cost. However, the new feature platform needs to migrate all the features currently in use in the old feature platform, so that the upper-level feature users do not make any changes. The switching logic is shielded within the feature to smoothly switch to the new feature platform.
[0030] In response to the problems pointed out in the above background technology, such as logical inconsistency, high error rate, difficulty in verification and low efficiency in manually configured feature migration, the purpose of this application is to solve this problem by designing an automated and systematic feature automation migration method. The core is to use dynamic logic switching, automated verification mechanism and data-driven migration strategy; specifically, by introducing specific technical means such as Kafka messaging, TiDB consistent result storage, and feature SDK automated management, it not only leads the traditional methods in function implementation, but also provides innovative and systematic solutions at the specific technical level, effectively improving the reliability, efficiency and automation level of feature migration.
[0031] See also Figures 1 to 3. The following embodiments of the present application provide a method and device for automatic feature migration. Compared with the prior art, the present application establishes a mapping relationship between old features and new features during the feature migration process, and uses unified feature parameters (and old feature parameters) and processes to execute feature logic (including old feature logic and new feature logic; wherein, when on the old feature platform, the old feature value can be obtained by executing the old feature logic using the old feature parameters), ensuring that the new feature logic of the new feature platform is completely consistent with the old feature logic of the old feature platform, thereby fundamentally avoiding comprehension deviations and implementation errors in manual migration and ensuring logical consistency; the present application uses an automated feature empty run mechanism, It can accurately simulate the feature execution process of the old feature platform and compare the old and new feature values of the new and old features in real time. Once a difference is found, the problem can be quickly located and corrected, effectively reducing errors that may be caused by manual operations and greatly reducing the error rate; this application introduces consistency statistics and result storage functions, which automatically records the consistency rate of the old and new feature values and the comparison results of the new and old features in the database, providing quantitative evaluation and comprehensive monitoring for the migration process, greatly improving the verification efficiency and accuracy; this application can realize batch processing of feature migration through an automated process, and automatically complete the migration of features that have passed verification, significantly shortening the migration cycle and meeting the needs of rapid business iteration.
[0032] The technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the embodiments of the present application.
[0033] like Figure 1 As shown, this embodiment provides a method for automatic feature migration, the method comprising: Step S1: Obtain a mapping relationship between old features on an old feature platform and new features on a new feature platform.
[0034] In one embodiment, the mapping relationship is established manually and requires manual maintenance.
[0035] Specifically, a feature is artificially developed on the new feature platform with the same logic as the old feature platform, namely the new feature.
[0036] In one embodiment, the mapping relationship exists in a MySQL physical table (ie, a subsequent feature migration list).
[0037] MySQL is a relational database management system developed by Swedish MySQL AB and is a product of Oracle. MySQL is one of the most popular relational database management systems.
[0038] It should be noted that, on the old feature platform, an old feature corresponds to a unique old feature key; similarly, on the new feature platform, a new feature also corresponds to a unique new feature key.
[0039] In one embodiment, the mapping relationship is established through the old feature key and the new feature key.
[0040] Specifically, the mapping relationship includes at least an old feature key and a new feature key, and the old feature key and the new feature key correspond to each other.
[0041] It should be noted that by obtaining the mapping relationship between the old features and the new features, it is ensured that the new feature platform can accurately reproduce the old feature logic of the old feature platform.
[0042] In one embodiment, the mapping relationship is obtained through a feature SDK.
[0043] Specifically, after the mapping relationship is established through manual operation, the mapping relationship is manually transferred to the feature SDK.
[0044] It should be noted that SDK, the full name in English: Software Development Kit, is translated into Chinese as: Software Development Kit; Feature SDK means that a series of operations related to feature acquisition are encapsulated in this software development kit; it is very simple and friendly to users, and there is no need to worry about the internal implementation of the SDK. It adopts conventional technical means in the field, so its working principle will not be described in detail here.
[0045] Step S2: Obtain old feature parameters and old feature values corresponding to the old features.
[0046] In one embodiment, obtaining old feature parameters and old feature values corresponding to the old feature includes: calling an old feature data acquisition method of the old feature platform to obtain the old feature parameters and the old feature value; the old feature data acquisition method corresponds to the old feature.
[0047] In one embodiment, the old feature data acquisition method of the old feature platform is called by the feature SDK to obtain the old feature parameters and the old feature values.
[0048] Specifically, the feature SDK is connected to the old feature platform, and the old feature parameters and old feature values can be obtained by directly calling the old feature data acquisition method through the feature SDK.
[0049] In one embodiment, the old feature parameters and the old feature values are transmitted via Kafka.
[0050] In one embodiment, after the feature SDK obtains the old feature parameters and the old feature values, the old feature parameters and the old feature values are sent to the feature empty run module through Kafka (the feature empty run module is used to execute the feature empty run in the subsequent step S3).
[0051] It should be noted that Kakfa is an open source stream processing platform developed by the Apache Software Foundation and written in Scala and Java. Kafka is a high-throughput distributed publish-subscribe messaging system that can handle all action stream data of consumers on the website.
[0052] In one embodiment, the feature SDK is also connected to the new feature platform, and the new feature data acquisition method of the new feature platform can be called through the feature SDK.
[0053] In one embodiment, the feature migration list is automatically pulled by the SDK to determine whether the old features have been migrated according to the feature migration list.
[0054] It should be noted that all the features in the feature migration list have been migrated.
[0055] Specifically, if the old feature already exists in the feature migration list, it means that the old feature has been migrated.
[0056] In one embodiment, for migrated features, when the feature SDK calls the old feature data acquisition method, the feature SDK will forward the request to the new feature platform (i.e., call the new feature data acquisition method), and will no longer request the old feature platform, thereby achieving seamless migration and switching, avoiding errors caused by manual changes to the calling logic, and making the entire subsequent feature migration process transparent to the business, without the need to adjust the business logic, and without the need for business downtime or manual access, thereby ensuring the continuity and stability of the feature migration process.
[0057] It should be noted that the feature SDK maintains the feature correspondence between the new and old feature platforms by automatically pulling the feature migration list at a regular interval.
[0058] The working principle of the feature SDK is further explained below through specific examples.
[0059] In one embodiment, a user system needs to extract the following features: user age, user registration days, and user credit status.
[0060] Among them, user age and user registration days: the system stores the user's birth date (2000-1-1) and registration date (2024-1-1). It is necessary to write the calculation logic of the features, using current date - business date = days or age.
[0061] Specifically, the user system introduces the feature SDK, calls the feature data acquisition method (including the old feature data acquisition method or the new feature data acquisition method), passes in the feature key and feature parameters, and the feature SDK will obtain the corresponding configuration and metadata of the feature key based on the feature key, and then execute the corresponding feature logic, obtain the corresponding feature value, and return it to the user system.
[0062] Step S3: performing feature dry run on the old feature based on the mapping relationship and the old feature parameters to obtain a new feature value.
[0063] like Figure 2 As shown, in one embodiment, performing feature empty run on the old feature based on the mapping relationship and the old feature parameter to obtain a new feature value includes: Step S31: acquiring new features corresponding to the old features based on the mapping relationship.
[0064] Step S32: Use the old feature parameters to execute the new feature logic to obtain the new feature value.
[0065] In one embodiment, feature dry run is performed on old features by a feature dry run module.
[0066] It should be noted that the new features on the new feature platform correspond to the new feature logic; similarly, the old features on the old feature platform also correspond to the old feature logic. By using the old feature parameters to execute the old feature logic, the old feature values can be obtained.
[0067] In one embodiment, before the step of acquiring a new feature corresponding to the old feature based on the mapping relationship, performing feature dry run on the old feature based on the mapping relationship and the old feature parameter further includes: Determine whether the old feature is in a state of feature empty running or in a state of feature empty running ending; If it is determined that the old feature is in a feature-free state, obtaining a new feature corresponding to the old feature based on the mapping relationship; If it is determined that the old feature is in a state where the feature is running empty, the new feature value is obtained.
[0068] Specifically, when the old feature starts to run a dry run, a Redis cache will be stored. The cache key of the Redis cache is the old feature key of the old feature, and the cache value is the relevant configuration of the new feature. When the old feature key production call execution message is received, Redis will be checked first to see if there is a cache. If there is a cache, it means that a dry run of the feature needs to be executed, that is, the feature dry run will be executed (the number of dry runs will increase by one for each dry run); when the feature dry run ends, the Redis cache will be cleared; when a new Kafka message is received later, no value will be found in the cache, and the feature dry run will not be performed.
[0069] In one embodiment, during the process of executing the feature empty run, when the feature empty run reaches a preset condition, the feature empty run is ended.
[0070] In one embodiment, the preset condition is that the number of transactions with empty features reaches a transaction number threshold; or the number of days with empty features reaches a day number threshold.
[0071] It should be noted that the specific settings of the number of transactions threshold and the number of days threshold are not used as conditions to limit the present application. In actual applications, they can be set according to specific application scenarios. For example, in one embodiment, the number of transactions threshold is set to 20,000 transactions, and the number of days threshold is set to 5 days.
[0072] Step S4: after the feature dry run is completed, determine whether the old feature value is consistent with the new feature value.
[0073] When the judgment result is yes, execute step S5.
[0074] Step S5: Migrate the old feature logic corresponding to the old feature.
[0075] It should be noted that when it is determined that the old feature value is consistent with the new feature value, the consistency verification is considered to have passed. For the old features that have passed the consistency verification, the migration from the old features to the new features is automatically realized, which significantly reduces the complexity and error rate of manual operations.
[0076] When the judgment result is no, execute step S6.
[0077] Step S6: force the migration of the old feature logic corresponding to the old feature, or adjust the new feature logic corresponding to the new feature, and restart the feature empty run for the old feature until the judgment result is yes.
[0078] It should be noted that through the above judgment on the consistency of old feature values and new feature values, the old feature logic of the old feature platform can be reproduced on the new feature platform, the consistency of the new and old features is automatically verified, and the incompleteness of manual sampling verification is avoided; the verification scale is controlled by configuration to ensure that the verification process is flexible and efficient.
[0079] In one embodiment, after the step of determining whether the old feature value is consistent with the new feature value, the method further includes: calculating a consistency rate between the old feature value and the new feature value, and storing the consistency rate in a database.
[0080] Specifically, by executing the above-mentioned feature empty run multiple times (corresponding to the number of records threshold or the number of days threshold), a new feature value can be obtained each time; and the consistency rate is obtained by judging the consistency between the new feature value obtained each time and the old feature value.
[0081] The consistency rate is equal to the ratio of the number of times the new eigenvalue is consistent with the old eigenvalue to the total number of executions.
[0082] It should be noted that, in this embodiment, when the consistency rate is 100%, the corresponding judgment result is yes.
[0083] In one embodiment, the method further includes: comparing the old feature and the new feature to obtain a comparison result, and storing the comparison result in a database to provide a digitized verification basis, thereby achieving data traceability, facilitating analysis, providing a reliable basis for feature migration decisions, and providing a systematic verification capability that is difficult to achieve with traditional manual verification methods; wherein the comparison result includes at least but is not limited to: old feature parameters, old feature values, new feature values, and new feature parameters corresponding to the new features.
[0084] In one embodiment, the database uses TiDB.
[0085] It should be noted that TiDB, as an open source distributed relational database, has the advantage of being compatible with the MySQL protocol, supports online horizontal expansion, and has excellent high availability. This makes TiDB an ideal choice for processing offline features, and can effectively cope with the challenges of large-scale data and complex data structures, ensuring efficient management and reliable storage of data.
[0086] In one embodiment, after the characteristic empty run is completed, the method further includes: generating an empty run report.
[0087] In one embodiment, when the consistency rate is 100%, the empty run report is generated.
[0088] In this embodiment, the empty run report includes at least but is not limited to any one or a combination of two or more of the following: total number of calls, consistency rate, inconsistency rate, new feature failure rate, excluding mode inconsistency rate, parameter weight removal, maximum time consumption, minimum time consumption, average time consumption, 90-line time consumption, 99-line time consumption, the top ten distributions of feature values, and a detailed list of inconsistencies.
[0089] Among them, the total number of calls is the number threshold; the inconsistency rate is equal to the ratio of the number of times the new feature value is inconsistent with the old feature value to the total number of executions; the new feature failure rate is the ratio of the number of failures to execute the new feature to the total number of executions; the excluding mode inconsistency rate is the consistency rate of the remaining new and old feature values after excluding the value that appears most frequently in the new feature value; the parameter weight reduction is the total number of feature parameters counted after retaining only one of the same feature parameters; the maximum time consumption is the longest time consumption when requesting a new feature; the minimum time consumption is the shortest time consumption when requesting a new feature; the average time consumption is the average time consumption when requesting all new features; the 90-line time consumption is the ranking time consumption of the 90th percentile after all the corresponding time consumption is sorted when requesting all new features; the 99-line time consumption is the ranking time consumption of the 99th percentile after all the corresponding time consumption is sorted when requesting all new features; the top ten feature values are the ten feature values with the largest number of occurrences; the inconsistency detail list is a list of inconsistent new and old feature values of feature empty runs.
[0090] In one embodiment, after the step of migrating the old features, the method further includes: adding the old features to a feature migration list to update the feature migration list.
[0091] In one embodiment, while adding the old feature to the feature migration list, the mapping relationship between the old feature and the corresponding new feature is also stored in the feature migration list.
[0092] The present application proposes an innovative feature migration solution. First, by associating old features with new features, it is ensured that the new feature platform can accurately reproduce the feature data acquisition logic of the old feature platform; then, by starting the feature dry run - receiving the old feature parameters of the old feature platform, the new feature logic of the new feature platform is executed using the old feature parameters; finally, by comparing the new and old feature values, the consistency rate is calculated, and the comparison results of the new and old features are written into the database to support real-time analysis and monitoring; in addition, for the features that are verified to be consistent during the dry run, the migration will be automatically completed, further improving the automation and efficiency of the migration. This process can effectively verify the reliability and accuracy of the migration solution, ensure the smooth and safe completion of the feature migration, and the whole process does not require human intervention, which significantly reduces the complexity and error rate of the migration operation. The data-driven migration strategy ensures that the feature migration is accurate and reliable.
[0093] The protection scope of the feature automation migration method described in the embodiment of the present application is not limited to the execution order of the steps listed in the present embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present application are included in the protection scope of the present application.
[0094] An embodiment of the present application also provides a feature automation migration device, which can implement the feature automation migration method described in the present application. However, the implementation device of the feature automation migration method described in the present application includes but is not limited to the structure of the feature automation migration device listed in this embodiment. All structural deformations and replacements of the prior art made according to the principles of the present application are included in the protection scope of the present application.
[0095] like Figure 3 As shown, in one embodiment, the present application provides a feature automatic migration device, which includes: an old feature platform 31, a new feature platform 32, a feature SDK 33 and a feature empty run module 34.
[0096] Specifically, the old feature platform 31 stores old features, and old feature parameters and old feature values corresponding to the old features; the new feature platform 32 stores new features, and new feature logic corresponding to the new features; the feature empty run module 34 is arranged on the new feature platform 32; the feature SDK 33 is connected to the old feature platform 31, the new feature platform 32 and the feature empty run module 34 respectively, and the feature SDK 33 is used to obtain the mapping relationship between the old features and the new features, and to obtain the old feature parameters and the old feature values, and to convert the mapping relationship, the old features into new features. The parameters and the old feature value are sent to the feature empty run module 34; the feature empty run module 34 is used to perform a feature empty run on the old feature based on the mapping relationship and the old feature parameters to obtain a new feature value, and to determine whether the old feature value is consistent with the new feature value after the feature empty run is completed; when the judgment result is yes, the old feature logic corresponding to the old feature is migrated; when the judgment result is no, the old feature logic corresponding to the old feature is forced to be migrated, or the new feature logic corresponding to the new feature is adjusted, and the feature empty run is restarted for the old feature until the judgment result is yes.
[0097] In one embodiment, the feature SDK33 calls the old feature data acquisition method of the old feature platform 31 to obtain the old feature parameters and the old feature value; the old feature data acquisition method corresponds to the old feature; when the feature SDK33 calls the old feature data acquisition method, if it is found that the old feature is in the feature migration list, the feature SDK33 calls the new feature data acquisition method of the new feature platform 32.
[0098] The feature automatic migration device provided in this application realizes the automation and efficiency of the feature migration process through the combination of feature SDK and feature empty run module; among them, feature SDK is responsible for real-time forwarding and status management, and feature empty run module provides comprehensive verification and automatic migration capabilities, thereby ensuring that the feature migration process is safe, reliable and efficient.
[0099] It should be noted that the working principle of the feature automatic migration device is the same as the working principle of the above-mentioned feature automatic migration method, so it will not be repeated here.
[0100] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.
[0101] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A method for automatic feature migration, characterized in that: The method comprises: Obtaining a mapping relationship between old features on an old feature platform and new features on a new feature platform; Obtaining old feature parameters and old feature values corresponding to the old features; Perform feature dry run on the old feature based on the mapping relationship and the old feature parameter to obtain a new feature value; After the feature dry run is completed, determining whether the old feature value is consistent with the new feature value; When the judgment result is yes, the old feature logic corresponding to the old feature is migrated; When the judgment result is no, the old feature logic corresponding to the old feature is forced to be migrated, or the new feature logic corresponding to the new feature is adjusted, and the feature dry run is restarted for the old feature until the judgment result is yes.
2. The feature automatic migration method according to claim 1, characterized in that: Acquiring old feature parameters and old feature values corresponding to the old feature includes: calling an old feature data acquisition method of the old feature platform to acquire the old feature parameters and the old feature value; the old feature data acquisition method corresponds to the old feature.
3. The feature automatic migration method according to claim 1 or 2, characterized in that: The old feature parameters and the old feature values are transmitted through Kafka.
4. The feature automatic migration method according to claim 1, characterized in that: Performing feature empty run on the old feature based on the mapping relationship and the old feature parameter to obtain a new feature value includes: Acquire a new feature corresponding to the old feature based on the mapping relationship; The new feature logic is executed using the old feature parameters to obtain the new feature value.
5. The feature automatic migration method according to claim 4, characterized in that: Before the step of acquiring the new feature corresponding to the old feature based on the mapping relationship, performing feature dry run on the old feature based on the mapping relationship and the old feature parameter further includes: Determine whether the old feature is in a state of feature empty running or in a state of feature empty running ending; If it is determined that the old feature is in a feature-free state, obtaining a new feature corresponding to the old feature based on the mapping relationship; If it is determined that the old feature is in a state where the feature is running empty, the new feature value is obtained.
6. The feature automatic migration method according to claim 1, characterized in that: During the process of executing the feature empty run, when the feature empty run reaches a preset condition, the feature empty run is ended.
7. The feature automatic migration method according to claim 1, characterized in that: After the characteristic empty run is completed, the method further includes: generating an empty run report; and / or After the step of migrating the old features, the method further includes: adding the old features to a feature migration list; wherein the features in the feature migration list are all migrated.
8. The feature automatic migration method according to claim 1, characterized in that: After the step of determining whether the old eigenvalue is consistent with the new eigenvalue, the method further includes: calculating the consistency rate between the old eigenvalue and the new eigenvalue, and storing the consistency rate in a database; when the consistency rate is 100%, the corresponding judgment result is yes; and / or The method further includes: comparing the old feature with the new feature to obtain a comparison result, and storing the comparison result in a database; wherein the comparison result includes at least: old feature parameters, old feature values, new feature values, and new feature parameters corresponding to the new feature.
9. A feature automatic migration device, characterized in that: The device includes: an old feature platform, a new feature platform, a feature SDK and a feature empty run module; wherein, The old feature platform stores old features, and old feature parameters and old feature values corresponding to the old features; The new feature platform stores new features and new feature logic corresponding to the new features; The feature empty run module is provided on the new feature platform; The feature SDK is connected to the old feature platform, the new feature platform and the feature empty run module respectively, and the feature SDK is used to obtain the mapping relationship between the old feature and the new feature, and to obtain the old feature parameters and the old feature values, and send the mapping relationship, the old feature parameters and the old feature values to the feature empty run module; The feature dry run module is used to perform a feature dry run on the old feature based on the mapping relationship and the old feature parameters to obtain a new feature value, and to determine whether the old feature value is consistent with the new feature value after the feature dry run is completed; when the judgment result is yes, the old feature logic corresponding to the old feature is migrated; when the judgment result is no, the old feature logic corresponding to the old feature is forced to be migrated, or the new feature logic corresponding to the new feature is adjusted, and the feature dry run is restarted for the old feature until the judgment result is yes.
10. The feature automatic migration device according to claim 9, characterized in that: Calling the old feature data acquisition method of the old feature platform through the feature SDK to obtain the old feature parameters and the old feature value; the old feature data acquisition method corresponds to the old feature; When the feature SDK calls the old feature data acquisition method, if it is found that the old feature is in the feature migration list, the feature SDK calls the new feature data acquisition method of the new feature platform.
Citation Information
Patent Citations
Configuration migration method and device, computer equipment and storage medium
CN117459389A
Version updating method and device, computer equipment and storage medium
CN118151969A
Database migration verification method and device, equipment and storage medium
CN119396797A