CN116661899A - Data change method, device, equipment and storage medium - Google Patents

Data change method, device, equipment and storage medium Download PDF

Info

Publication number
CN116661899A
CN116661899A CN202310658536.1A CN202310658536A CN116661899A CN 116661899 A CN116661899 A CN 116661899A CN 202310658536 A CN202310658536 A CN 202310658536A CN 116661899 A CN116661899 A CN 116661899A
Authority
CN
China
Prior art keywords
script
target
preset
group
pipeline
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310658536.1A
Other languages
Chinese (zh)
Inventor
宋智军
张晓宇
李通
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Henan Zhongyuan Consumption Finance Co ltd
Original Assignee
Henan Zhongyuan Consumption Finance Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Henan Zhongyuan Consumption Finance Co ltd filed Critical Henan Zhongyuan Consumption Finance Co ltd
Priority to CN202310658536.1A priority Critical patent/CN116661899A/en
Publication of CN116661899A publication Critical patent/CN116661899A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The application discloses a data changing method, a device, equipment and a storage medium, which relate to the technical field of databases and comprise the following steps: determining a current application running environment, and determining a corresponding target pipeline based on a first mapping relation between the pre-established application running environment and the pipeline; searching a corresponding target script group from a preset script storage server based on a second mapping relation between a pre-created pipeline and the script group; and distributing each script file in the target script group to a plurality of script execution machines which are created in advance through a preset distributor, and loading the script file into a memory space through the script execution machines so that the database server executes the script file to complete data change operation in the corresponding database. Therefore, the application can realize the data change operation of the related environment through the assembly line and the corresponding script group, avoids the completion of the corresponding data change operation by manually executing the script by a database manager, and improves the script execution efficiency.

Description

Data change method, device, equipment and storage medium
Technical Field
The present application relates to the field of database technologies, and in particular, to a method, an apparatus, a device, and a storage medium for changing data.
Background
With the change of the age, the combination of internet technology and business excites continuous innovation of business modes, various technical delivery practice methods (agility, lean and DevOps) are derived to rapidly respond to business, business delivery efficiency is improved, and DevOps (combination words of Development and Operations) is a set of processes, methods and systems for promoting communication, collaboration and integration among Development (application/software engineering), technical operation and Quality Assurance (QA) departments, focusing on integration of Dev and Ops and high automation capability, so that software construction, test and release can be faster, more frequent and more reliable. Data change management mainly refers to changes of database structures and data in the processes of upgrading and rollback of application programs.
In the service delivery flow, a developer can produce a data change script for realizing the requirement, and when the application is upgraded, a professional DBA (database manager Database Administrator, abbreviated as DBA) is connected with a database in each environment through database terminal software, and the script is manually executed to complete the change of the database structure and the data, so that the upgrade of the application is finally completed. The prior art may exist that the DBA needs to connect to a database middleware server of a plurality of environments through database terminal software, and then manually execute a data change script into each environment a plurality of times. Such manual operations are prone to missing or repeated execution, which can lead to data inconsistencies between environments.
It can be seen that how to avoid manually executing scripts to complete data changes, and how to improve consistency of environmental data, is a problem to be solved in the art.
Disclosure of Invention
Accordingly, the present application is directed to a method, apparatus, device, and storage medium for changing data, which can avoid a database manager from manually executing a script to complete a process of changing data, and can utilize a preset pipeline to trigger related data changing operation, thereby improving script execution efficiency. The specific scheme is as follows:
in a first aspect, the present application provides a data modification method, which is characterized by comprising:
determining a current application running environment, and determining a target pipeline corresponding to the current application running environment based on a first mapping relation between the pre-created application running environment and the pipeline;
searching a target script group corresponding to the target pipeline from a preset script storage server based on a second mapping relation between a pre-created pipeline and the script group;
distributing each script file in the target script group to a plurality of script execution machines which are created in advance through a preset distributor, and loading the received script files into corresponding memory spaces through the script execution machines so that database servers corresponding to the script execution machines execute the script files in the memory spaces to complete data change operation in corresponding databases.
Optionally, before determining the current application running environment, the method further includes:
creating a plurality of corresponding pipelines according to a plurality of preset application running environments, and building mapping relations between the preset application running environments and the pipelines to obtain the first mapping relation;
generating a plurality of corresponding script groups according to the plurality of preset application running environments, and establishing a mapping relation between the plurality of pipelines and the plurality of script groups based on the first mapping relation to obtain the second mapping relation.
Optionally, the generating a plurality of corresponding script groups according to the plurality of preset application running environments includes:
generating a plurality of script files based on the plurality of preset application running environments;
and classifying the script files according to the categories of the preset application running environments to obtain a plurality of script groups, and uploading the script groups to the preset script storage server.
Optionally, the searching the target script group corresponding to the target pipeline from a preset script storage server based on a second mapping relation between the pre-created pipeline and the script group includes:
determining ID information of the target script group based on a second mapping relation between a pre-created pipeline and the script group;
searching a main key ID corresponding to the target script group in the preset script storage server based on the ID information of the target script group;
and searching the target script group from the preset script storage server by using the primary key ID.
Optionally, the loading, by the script execution machine, the received script file into a corresponding memory space, so that a database server corresponding to the script execution machine executes the script file in the memory space, to complete a data change operation in a corresponding database, including:
determining a target database corresponding to the script file;
and loading the received script file into the memory space corresponding to the target database through the script execution machine so that the database server corresponding to the script execution machine executes the script file in the memory space to complete the data change operation in the target database.
Optionally, after the database server corresponding to the script execution machine executes the script file in the memory space, the method further includes:
and recording the script file which is successfully executed into a preset executed script record table.
Optionally, after the database server corresponding to the script execution machine executes the script file in the memory space, the method further includes:
determining whether all script files in the target script set are successfully executed or not based on the record information in the preset executed script record table;
if not, rejecting the executed script file corresponding to the recorded information in the target script group to obtain a current script file to be executed;
and distributing the current script file to be executed to a plurality of corresponding script executors through the preset distributor so as to trigger execution operation for the current script file to be executed.
In a second aspect, the present application provides a data changing apparatus, comprising:
the pipeline determining module is used for determining a current application running environment and determining a target pipeline corresponding to the current application running environment based on a first mapping relation between the pre-established application running environment and the pipeline;
the script group searching module is used for searching a target script group corresponding to the target pipeline from a preset script storage server based on a second mapping relation between the pre-created pipeline and the script group;
and the script execution module is used for distributing each script file in the target script group to a plurality of script execution machines which are created in advance through a preset distributor, and loading the received script files into corresponding memory spaces through the script execution machines so that a database server corresponding to the script execution machines executes the script files in the memory spaces to complete data change operation in corresponding databases.
In a third aspect, the present application provides an electronic device, comprising:
a memory for storing a computer program;
and a processor for executing the computer program to implement the data changing method as described above.
In a fourth aspect, the present application provides a computer readable storage medium storing a computer program which when executed by a processor implements a data modification method as described above.
Therefore, the method and the device can determine the current application running environment and determine the target pipeline corresponding to the current application running environment based on the first mapping relation between the pre-established application running environment and the pipeline; then searching a target script group corresponding to the target pipeline from a preset script storage server based on a second mapping relation between the pre-created pipeline and the script group; and distributing each script file in the target script group to a plurality of script execution machines which are created in advance through a preset distributor, and loading the received script files into corresponding memory spaces through the script execution machines so that a database server corresponding to the script execution machines executes the script files in the memory spaces to complete data change operation in corresponding databases. Thus, the application can pre-create the pipeline and the corresponding script file, and then trigger the corresponding pipeline according to the current application running environment so as to realize the data change operation in the target database by using the corresponding script file; therefore, the process that the script is manually executed by the database manager to complete the data change can be avoided, the condition that the manual operation is easy to miss or repeatedly execute is avoided, and the realization efficiency of the data change operation is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for changing data according to the present application;
FIG. 2 is a diagram of the association relationship of data change association objects disclosed by the application;
FIG. 3 is a flow chart of data change management according to the present disclosure;
FIG. 4 is a flowchart of a specific data modification method disclosed in the present application;
FIG. 5 is a flow chart of a data change script transmission disclosed in the present application;
FIG. 6 is a schematic diagram of a data modification apparatus according to the present disclosure;
fig. 7 is a block diagram of an electronic device according to the present disclosure.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The application divides the data change management association objects into database configuration, script group, script, online window, application running environment, flow scene, executor, distributor, pipeline and other objects, and the management method of integral collaboration ensures the consistency of environment data. Pipeline refers to a group of events or jobs that are connected together in sequence. The application can be applied to the best engineering practice of sustained integration and sustained deployment of the DevOps, pays attention to the concepts of efficient coordination and automation capability in the delivery process, can ensure the consistency of all environmental data, can improve the environmental stability and improves the overall research and development delivery efficiency.
Referring to fig. 1, an embodiment of the present application discloses a data changing method, which includes:
step S11, determining a current application running environment, and determining a target pipeline corresponding to the current application running environment based on a first mapping relation between the pre-created application running environment and the pipeline.
In the method, firstly, the current application running environment is determined, and a target pipeline corresponding to the current application environment is determined; it can be appreciated that the first mapping relationship between the application runtime environment and the pipeline needs to be created in advance; before determining the current application running environment in the specific embodiment, the method may further include: creating a plurality of corresponding pipelines according to a plurality of preset application running environments, and building mapping relations between the preset application running environments and the pipelines to obtain the first mapping relation; generating a plurality of corresponding script groups according to the plurality of preset application running environments, and establishing a mapping relation between the plurality of pipelines and the plurality of script groups based on the first mapping relation to obtain the second mapping relation. Specifically, a plurality of corresponding pipelines are firstly established according to a preset application running environment, and a first mapping relation between the preset application running environment and the pipelines is established; correspondingly, a corresponding script set can be generated according to a preset application running environment, and it can be understood that a developer can generate a plurality of data change scripts, and the corresponding script set can be obtained according to a certain rule. In a specific embodiment, the generating a plurality of script groups according to the plurality of preset application running environments may include: generating a plurality of script files based on the plurality of preset application running environments; and classifying the script files according to the categories of the preset application running environments to obtain a plurality of script groups, and uploading the script groups to the preset script storage server. Specifically, a developer may generate a plurality of corresponding script files based on a plurality of preset application operating environments, and then may group the script files according to the types of the preset application operating environments, so as to obtain a script group corresponding to the preset application operating environments. In a specific embodiment, the rule for grouping script files may be based on a requirement number, a definition rule is a library name_operation type_yyyyymmdd_requirement number, sql, where yyyyMMdd is an online window (an uploaded interface), the operation types are ddl and dml, and the script refers to a script management version number corresponding to the lower side of the script group according to the library name: 20230423, all development scripts related to the online are submitted to 20230423 version.
And step S12, searching a target script group corresponding to the target pipeline from a preset script storage server based on a second mapping relation between the pre-created pipeline and the script group.
In this embodiment, after determining the target pipeline corresponding to the current application running environment, the target script group corresponding to the target pipeline may be determined based on the second mapping relationship. In a specific embodiment, the searching, from a preset script storage server, the target script group corresponding to the target pipeline based on the second mapping relationship between the pre-created pipeline and the script group may include: determining ID information of the target script group based on a second mapping relation between a pre-created pipeline and the script group; searching a main key ID corresponding to the target script group in the preset script storage server based on the ID information of the target script group; and searching the target script group from the preset script storage server by using the primary key ID. Specifically, the ID information of the target script group corresponding to the target pipeline may be determined according to the second mapping relationship between the pipeline and the script; and then, a corresponding primary key ID of the target script group in the preset script storage server can be searched according to the ID information, and then the target script group containing a plurality of script files is searched from the preset script storage server by utilizing the primary key ID.
Step S13, distributing each script file in the target script set to a plurality of script execution machines which are created in advance through a preset distributor, and loading the received script files into corresponding memory spaces through the script execution machines so that database servers corresponding to the script execution machines execute the script files in the memory spaces to complete data change operation in corresponding databases.
After obtaining a target script set corresponding to a current application running environment, the method can utilize a preset distributor to distribute each script file in the target script set to a script execution machine which is created in advance; the script execution machine can load the received script file into the corresponding memory space, so that the database server corresponding to the script execution machine can conveniently execute the script file in the memory space to complete the data change operation in the corresponding database. It should be noted that, as shown in fig. 2, the present application may establish an association relationship between a flow scenario including a plurality of application running environments and a script set by defining a naming rule of the script set, for example: the sequence of the store name, scene identification and execution, scene identification: the dit type (not in the last online window range, the requirement of longer period), the release type (in the last online window range, the current iterative online requirement relates to the upgrade change of the application program), the hotfix type (the triggering of production defects). Different script groups correspond to a plurality of application running environments, and different environments correspond to pipelines; when service requirements exist, namely, the application program is updated and data is changed, a corresponding pipeline can be triggered to complete data changing operation in a corresponding application running environment. It should be noted that each flow scenario may share a set of scripts regardless of how many sets of environments are involved. Further, the application running environment and the pipelines are in one-to-one correspondence, the script group and the script are associated through the naming rule of the file name, and as long as a certain script group is executed in a certain pipeline, the script group is associated with all pipelines related to the pipeline, and then the related pipelines recognize the script group. For example, the dit flow scene comprises two sets of environments A and B, wherein a pipeline corresponding to the environment A is configured with a dit type script set, the environment B is also configured with a dit type script set, if the environment A needs to carry out the operation of changing and executing the upgrade data of the application program, the environment A is caused to change the data, and when the environment B also needs to be upgraded, the script is automatically executed.
In a particular embodiment, as shown in FIG. 3, a developer may submit a script; correspondingly, the basic configurator can configure a corresponding script group according to the database, and the script group corresponds to the configured pipeline. The script file may then be divided into different script groups that are associated with script groups of the base configurator. And establishing an association relation between the script group and the target database through the associated online window, and storing the association relation into a preset script database. Thus, when the corresponding pipeline execution is triggered based on the current environment, the script file corresponding to the pipeline can be distributed to the corresponding environment for execution through the preset distributor. For example, the script file is distributed to the target database a in the environment a for execution, so as to complete the corresponding data change operation.
Therefore, the application can create a corresponding pipeline and a corresponding script group according to the preset application running environment, and can trigger the pipeline under the corresponding environment to realize the data change operation of the corresponding database when the data change requirement exists; the method and the system can further divide different application running environments into three flow scenes, and then synchronously change the data of a plurality of environments based on the flow scenes, so that the consistency of the data of each environment can be ensured, and the stability of the environment is improved.
The following embodiments specifically describe related steps for completing a data change operation, and referring to fig. 4, an embodiment of the present application discloses a data change method, which includes:
step S21, determining a current application running environment, and determining a target pipeline corresponding to the current application running environment based on a first mapping relation between the pre-created application running environment and the pipeline.
And S22, searching a target script group corresponding to the target pipeline from a preset script storage server based on a second mapping relation between the pre-created pipeline and the script group.
Step S23, determining a target database corresponding to the script file in the target script group, and loading the received script file into the memory space corresponding to the target database through the script execution machine so that the database server corresponding to the script execution machine executes the script file in the memory space to complete the data change operation in the target database.
In the embodiment of the application, the target database corresponding to the script file in the target script group is firstly determined, then the received script file is loaded into the memory space corresponding to the target database through the script execution machine, and further, the database server can execute the script file in the memory space, and the data change operation in the target database is completed by utilizing the script file. In a specific embodiment, as shown in fig. 5, the script file may be stored by the SAAS application service, and when the corresponding pipeline is triggered subsequently, the script file is distributed to different database servers by the preset distributor, so as to complete the corresponding data change operation, and complete the synchronization process of the database structure and the data between the environments.
In a specific embodiment, after the database server corresponding to the script execution machine executes the script file in the memory space, the method may further include: and recording the script file which is successfully executed into a preset executed script record table. Specifically, whether the script file is executed successfully can be judged, and then the script file which is executed successfully is recorded into a preset executed script record. Further, after the database server corresponding to the script execution machine executes the script file in the memory space, the method may further include: determining whether all script files in the target script set are successfully executed or not based on the record information in the preset executed script record table; if not, rejecting the executed script file corresponding to the recorded information in the target script group to obtain a current script file to be executed; and distributing the current script file to be executed to a plurality of corresponding script executors through the preset distributor so as to trigger execution operation for the current script file to be executed. Specifically, when the data change operation is performed subsequently, whether the script file in the target script group is successfully executed or not can be judged according to the preset executed script record table; if some of the script files in the target script set are successfully executed, the successfully executed script files can be removed from the target script set, the remaining current script to be executed can be obtained, and then the execution operation for the current script to be executed is triggered. For example, scripts executed in the environment a and the environment B record corresponding execution information in a database, and the corresponding execution information relates to an ID of a pipeline, a database ID of a pipeline configuration, a script group ID, a script ID, and the like, and whether the scripts are successfully executed in the corresponding environments is automatically identified according to the information. The successful execution records script environment execution information in a database, relating to the ID of the pipeline, the database ID of the pipeline configuration, script group ID, script ID, etc. If the execution fails or is not executed, the record is not recorded, and the script re-execution or compensation execution which is not successfully executed can be searched in the next re-execution process. Furthermore, when the environment B needs to be upgraded, the script executed by the environment A can be automatically and synchronously executed under the condition that the script is not executed (the environment B), so that the synchronous change of the data in each environment is completed, and the consistency of the data in each environment is ensured.
For more specific processing procedures in the steps S21 and S22, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no detailed description is given here.
Therefore, after the script file is executed, the script file which is successfully executed can be recorded into a preset executed script record table; in the subsequent data changing process, whether the executed script file exists in the target script group can be judged, and the subsequent missing execution condition caused by repeated execution or execution failure can be avoided.
As shown in fig. 6, the present application discloses a data changing device, comprising:
a pipeline determining module 11, configured to determine a current application running environment, and determine a target pipeline corresponding to the current application running environment based on a first mapping relationship between a pre-created application running environment and a pipeline;
a script group searching module 12, configured to search a target script group corresponding to the target pipeline from a preset script storage server based on a second mapping relationship between a pre-created pipeline and the script group;
the script execution module 13 is configured to distribute, by using a preset distributor, each script file in the target script set to a plurality of script execution machines that are created in advance, and load, by using the script execution machine, the received script file into a corresponding memory space, so that a database server corresponding to the script execution machine executes the script file in the memory space, thereby completing a data change operation in a corresponding database.
Therefore, the application can pre-create the pipeline and the corresponding script file, and then trigger the corresponding pipeline according to the current application running environment so as to realize the data change operation in the target database by using the corresponding script file; therefore, the process of manually executing the script to complete the data change by the database manager can be avoided, the condition that the manual operation is easy to miss or repeatedly execute is avoided, the realization efficiency of the data change operation is improved, the consistency of all environment data can be ensured, and the environment stability is improved.
In a specific embodiment, the apparatus may further include:
the first mapping relation establishing unit is used for establishing a plurality of corresponding pipelines according to a plurality of preset application running environments and establishing mapping relations between the preset application running environments and the pipelines so as to obtain the first mapping relation;
the second mapping relation establishing sub-module is used for generating a plurality of corresponding script groups according to the plurality of preset application running environments, and establishing mapping relation between the plurality of pipelines and the plurality of script groups based on the first mapping relation so as to obtain the second mapping relation.
In a specific embodiment, the second mapping relationship establishing sub-module may include:
the script file generation unit is used for generating a plurality of script files based on the plurality of preset application running environments;
and the script group uploading unit is used for classifying the script files according to the categories of the preset application running environments to obtain a plurality of script groups so as to upload the script groups to the preset script storage server.
In a specific embodiment, the script set searching module 12 may include:
a script group information determining unit configured to determine ID information of the target script group based on a second mapping relationship between a pre-created pipeline and the script group;
a script group primary key searching unit, configured to search a primary key ID corresponding to the target script group in the preset script storage server based on ID information of the target script group;
and the script group searching unit is used for searching the target script group from the preset script storage server by utilizing the primary key ID.
In a specific embodiment, the script execution module 13 may include:
a database determining unit, configured to determine a target database corresponding to the script file;
and the script execution unit is used for loading the received script file into the memory space corresponding to the target database through the script execution machine so that the database server corresponding to the script execution machine executes the script file in the memory space to complete the data change operation in the target database.
In a specific embodiment, the apparatus may further include:
and the script recording unit is used for recording the script file which is successfully executed into a preset executed script recording table.
In another specific embodiment, the apparatus may further include:
a script judging unit, configured to determine whether all script files in the target script group have been successfully executed based on the record information in the preset executed script record table;
the script eliminating unit is used for eliminating executed script files corresponding to the record information in the target script group to obtain a current script file to be executed when all script files in the target script group are not executed successfully;
the script distribution unit is used for distributing the current script file to be executed to a plurality of corresponding script execution machines through the preset distributor so as to trigger execution operation for the current script file to be executed.
Further, the embodiment of the present application further discloses an electronic device, and fig. 7 is a block diagram of an electronic device 20 according to an exemplary embodiment, where the content of the figure is not to be considered as any limitation on the scope of use of the present application.
Fig. 7 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, which is loaded and executed by the processor 21 to implement relevant steps in the data modification method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon may include an operating system 221, a computer program 222, and the like, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device 20 and computer programs 222, which may be Windows Server, netware, unix, linux, etc. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the data modification method performed by the electronic device 20 disclosed in any of the previous embodiments.
Further, the application also discloses a computer readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the data modification method disclosed above. For specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no further description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing has outlined rather broadly the more detailed description of the application in order that the detailed description of the application that follows may be better understood, and in order that the present principles and embodiments may be better understood; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. A data modification method, comprising:
determining a current application running environment, and determining a target pipeline corresponding to the current application running environment based on a first mapping relation between the pre-created application running environment and the pipeline;
searching a target script group corresponding to the target pipeline from a preset script storage server based on a second mapping relation between a pre-created pipeline and the script group;
distributing each script file in the target script group to a plurality of script execution machines which are created in advance through a preset distributor, and loading the received script files into corresponding memory spaces through the script execution machines so that database servers corresponding to the script execution machines execute the script files in the memory spaces to complete data change operation in corresponding databases.
2. The method for changing data according to claim 1, further comprising, before determining the current application running environment:
creating a plurality of corresponding pipelines according to a plurality of preset application running environments, and building mapping relations between the preset application running environments and the pipelines to obtain the first mapping relation;
generating a plurality of corresponding script groups according to the plurality of preset application running environments, and establishing a mapping relation between the plurality of pipelines and the plurality of script groups based on the first mapping relation to obtain the second mapping relation.
3. The method for changing data according to claim 2, wherein generating the corresponding script groups according to the preset application running environments includes:
generating a plurality of script files based on the plurality of preset application running environments;
and classifying the script files according to the categories of the preset application running environments to obtain a plurality of script groups, and uploading the script groups to the preset script storage server.
4. The method according to claim 1, wherein the searching for the target script group corresponding to the target pipeline from a preset script storage server based on a second mapping relationship between a pre-created pipeline and the script group, comprises:
determining ID information of the target script group based on a second mapping relation between a pre-created pipeline and the script group;
searching a main key ID corresponding to the target script group in the preset script storage server based on the ID information of the target script group;
and searching the target script group from the preset script storage server by using the primary key ID.
5. The method according to claim 1, wherein the loading, by the script execution machine, the received script file into a corresponding memory space so that a database server corresponding to the script execution machine executes the script file in the memory space to complete a data change operation in a corresponding database, includes:
determining a target database corresponding to the script file;
and loading the received script file into the memory space corresponding to the target database through the script execution machine so that the database server corresponding to the script execution machine executes the script file in the memory space to complete the data change operation in the target database.
6. The data modification method according to any one of claims 1 to 5, wherein after the database server corresponding to the script execution machine executes the script file in the memory space, further comprising:
and recording the script file which is successfully executed into a preset executed script record table.
7. The method according to claim 6, wherein after the database server corresponding to the script execution machine executes the script file in the memory space, further comprising:
determining whether all script files in the target script set are successfully executed or not based on the record information in the preset executed script record table;
if not, rejecting the executed script file corresponding to the recorded information in the target script group to obtain a current script file to be executed;
and distributing the current script file to be executed to a plurality of corresponding script executors through the preset distributor so as to trigger execution operation for the current script file to be executed.
8. A data changing apparatus, comprising:
the pipeline determining module is used for determining a current application running environment and determining a target pipeline corresponding to the current application running environment based on a first mapping relation between the pre-established application running environment and the pipeline;
the script group searching module is used for searching a target script group corresponding to the target pipeline from a preset script storage server based on a second mapping relation between the pre-created pipeline and the script group;
and the script execution module is used for distributing each script file in the target script group to a plurality of script execution machines which are created in advance through a preset distributor, and loading the received script files into corresponding memory spaces through the script execution machines so that a database server corresponding to the script execution machines executes the script files in the memory spaces to complete data change operation in corresponding databases.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the data modification method of any one of claims 1 to 7.
10. A computer readable storage medium for storing a computer program which, when executed by a processor, implements the data modification method of any one of claims 1 to 7.
CN202310658536.1A 2023-06-05 2023-06-05 Data change method, device, equipment and storage medium Pending CN116661899A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310658536.1A CN116661899A (en) 2023-06-05 2023-06-05 Data change method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310658536.1A CN116661899A (en) 2023-06-05 2023-06-05 Data change method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116661899A true CN116661899A (en) 2023-08-29

Family

ID=87727585

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310658536.1A Pending CN116661899A (en) 2023-06-05 2023-06-05 Data change method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116661899A (en)

Similar Documents

Publication Publication Date Title
AU2007289177B2 (en) Dynamically configuring, allocating and deploying computing systems
US8839107B2 (en) Context based script generation
US20180307569A1 (en) Data retracement method, apparatus, and system
US9542173B2 (en) Dependency handling for software extensions
US10963227B2 (en) Technique for transforming a standard messaging component to a customized component
CN110795105A (en) Automatic compiling and deploying method and system for power distribution automation master station system
CN111274004B (en) Process instance management method and device and computer storage medium
CN111147291B (en) Service maintenance method and device
CN114443294B (en) Big data service component deployment method, system, terminal and storage medium
CN116340294A (en) Database deployment method and device, computer readable storage medium and electronic equipment
CN113836121B (en) Database control method and target server
CN116661899A (en) Data change method, device, equipment and storage medium
CN112099803B (en) Incremental deployment method and system of ERP system
CN111400243B (en) Development management system based on pipeline service and file storage method and device
CN114489999A (en) Method and device for processing pipeline task, processor and electronic equipment
CN114416163A (en) Product management method, system, storage medium and electronic equipment
CN113220592A (en) Processing method and device for automated testing resources, server and storage medium
CN111897794A (en) Database maintenance method and device, electronic equipment and storage medium
CN112559444A (en) SQL (structured query language) file migration method and device, storage medium and equipment
US20240168916A1 (en) Dynamic File Selection Process to Transfer Required Data File Between Different Servers in Near Real-Time
CN111930718B (en) Node adjustment method and device for configuration management database
US11243961B2 (en) Complex query optimization
US20230342341A1 (en) Automatic sequencing of database objects
US20240152372A1 (en) Virtual representations of endpoints in a computing environment
US8825610B1 (en) System management based on goals relevant to a current state of a managed system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination