WO2022126918A1 - 关联脚本自动同步方法、装置、计算机设备及存储介质 - Google Patents

关联脚本自动同步方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2022126918A1
WO2022126918A1 PCT/CN2021/083757 CN2021083757W WO2022126918A1 WO 2022126918 A1 WO2022126918 A1 WO 2022126918A1 CN 2021083757 W CN2021083757 W CN 2021083757W WO 2022126918 A1 WO2022126918 A1 WO 2022126918A1
Authority
WO
WIPO (PCT)
Prior art keywords
script
target
execution
scripts
synchronization
Prior art date
Application number
PCT/CN2021/083757
Other languages
English (en)
French (fr)
Inventor
张延中
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022126918A1 publication Critical patent/WO2022126918A1/zh

Links

Images

Classifications

    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Definitions

  • the present application relates to the field of operation and maintenance technologies, and in particular, to a method, device, computer equipment and storage medium for automatic synchronization of associated scripts.
  • the synchronization is completed but the system resources are still occupied.
  • the exhaustion of server resources will cause the server to crash, resulting in low efficiency of synchronizing and updating the application. Therefore, the prior art method has the problem of low synchronization efficiency when synchronizing the script included in the application program.
  • Embodiments of the present application provide an automatic synchronization method, device, computer device and storage medium for associated scripts, which aim to solve the problem of low synchronization efficiency existing in the prior art method for synchronizing scripts included in application programs.
  • an embodiment of the present application provides an automatic synchronization method for an associated script, which includes:
  • the target scripts in the script publishing log are associated and grouped to obtain a plurality of initial script groups
  • a plurality of the script groups are synchronized in batches in parallel, and data information corresponding to each of the script groups is synchronized to the test server.
  • an apparatus for automatically synchronizing an associated script which includes:
  • a log obtaining unit configured to obtain a script release log from the production server and obtain a script synchronization log from the test server if a script synchronization instruction input by an administrator is received;
  • a data table synchronization script generation unit for obtaining the data processing script in the script release log and generating a corresponding data table synchronization script
  • a target script acquisition unit configured to judge whether the synchronization time of the same non-data processing script in the script synchronization log is not greater than the publishing time in the script publishing log, and obtain a non-data processing script whose synchronization time is not greater than the publishing time as the target script;
  • an initial script grouping obtaining unit configured to associate and group the target scripts in the script publishing log according to a preset grouping rule to obtain a plurality of initial script groups
  • a script group obtaining unit configured to evenly distribute the data table synchronization script to the multiple initial script groups to obtain the multiple script groups
  • the script grouping parallel synchronization unit is configured to perform parallel synchronization of a plurality of the script groups in batches, and synchronize the data information corresponding to each of the script groups to the test server.
  • an embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer
  • the method for automatically synchronizing the associated script described in the first aspect above is implemented in the program.
  • an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when executed by a processor, the computer program causes the processor to execute the above-mentioned first step.
  • the method for automatically synchronizing an associated script is described.
  • Embodiments of the present application provide an automatic synchronization method, apparatus, computer device, and storage medium for an associated script.
  • Obtain the script release log from the production server and the script synchronization log from the test server obtain the data processing script in the script release log and generate the data table synchronization script correspondingly, and judge the synchronization time and release time of each time-consuming processing script to obtain the target Script, associate and group target scripts to obtain multiple initial script groups, evenly distribute data table synchronization scripts to initial script groups to obtain multiple script groups, and synchronize multiple script groups in parallel in batches to synchronize scripts .
  • the target scripts with associated relationships can be associated and grouped, and the scripts included in the script grouping can be synchronized in batches in parallel, which can ensure that the scripts with the associated relationship are synchronized in an orderly and parallel manner, which greatly improves the performance of the associated scripts. Efficiency of synchronization.
  • FIG. 1 is a schematic flowchart of a method for automatically synchronizing an associated script according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of an application scenario of the method for automatically synchronizing an associated script provided by an embodiment of the present application
  • FIG. 3 is a schematic sub-flow diagram of the method for automatically synchronizing an associated script provided by an embodiment of the present application
  • FIG. 4 is a schematic diagram of another sub-flow of the method for automatically synchronizing an associated script provided by an embodiment of the present application
  • FIG. 5 is a schematic diagram of another sub-flow of the method for automatically synchronizing an associated script provided by an embodiment of the present application
  • FIG. 6 is a schematic diagram of another sub-flow of the method for automatically synchronizing an associated script provided by an embodiment of the present application
  • FIG. 7 is another schematic flowchart of the method for automatically synchronizing an associated script according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of another sub-flow of the method for automatically synchronizing an associated script provided by an embodiment of the present application.
  • FIG. 9 is a schematic block diagram of an apparatus for automatically synchronizing an associated script provided by an embodiment of the present application.
  • FIG. 10 is a schematic block diagram of a computer device provided by an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a method for automatically synchronizing an associated script provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of an application scenario of the method for automatically synchronizing an associated script provided by an embodiment of the present application.
  • the associated script is automatically synchronized
  • the method is applied in the management server 10, the method is executed by the application software installed in the management server 10, and the management server 10 is respectively connected with at least one production server 20 and at least one test server 30 for communication connection to realize the transmission of data information , wherein the management server 10 is the server side configured within the enterprise to synchronize the non-data processing scripts and data table information published in the production server 20 to the test server 30, and the user of the management server 10 is the management of the enterprise member.
  • the method includes steps S110-S160.
  • a script release log is obtained from the production server and a script synchronization log is obtained from the test server.
  • the administrator can input the script synchronization command to the management server, and the management server starts to perform the script synchronization operation; or the administrator can preset the synchronization cycle, and when the synchronization time point in the synchronization cycle is reached, the management server automatically synchronizes the script.
  • the management server obtains the script release log from the production server. After the program developer completes the application development, it will release the script corresponding to the application to the production server.
  • the script release log is the process of publishing the script to the production server. Record the obtained log information.
  • the script release log is updated once according to the script contained in the released application;
  • the published scripts are correspondingly updated to the test server.
  • the script synchronization log is the log information obtained by recording the process of synchronously updating the script to the test server.
  • the script in the test server is synchronized once, that is, according to the synchronization process, the The script makes an update to the script synchronization log.
  • S120 Acquire the data processing script in the script release log and generate a corresponding data table synchronization script.
  • the script publishing log records the publishing process of data processing scripts and non-data processing scripts.
  • the data processing script is the script that processes the data information in the data table, obtains the data processing script in the script publishing log, and generates a corresponding data table Synchronization script, by executing the data table synchronization script, the data information in the data table processed by the data processing script can be synchronized more efficiently.
  • step S120 includes sub-steps S121 and S122.
  • the data processing script includes data table information
  • the data table information is information such as the name, number, and type of the data table processed by the data processing script.
  • the specific information of a data table included in the data table information is tablename_123.sql.
  • a data table synchronization script that can synchronize data information in parallel can be generated based on the data table information.
  • a data table synchronization script can be generated based on multiple data tables with the same data table name, the same type, and different numbers.
  • tablename_123 .sql, tablename_124.sql and tablename_125.sql three data tables correspond to generate a data table synchronization script, then executing the data table synchronization script can synchronize the data information contained in the corresponding multiple data tables in parallel, which can maximize the use of Database service resources are used to synchronize data information, which can greatly improve the efficiency of synchronizing data information in data tables.
  • the synchronization time of the same non-data processing script in the script synchronization log is not greater than the publishing time in the script publishing log, and a non-data processing script whose synchronization time is not greater than the publishing time is obtained as a target script.
  • the non-data processing scripts contained in the test server correspond to the non-data processing scripts contained in the production server. If the corresponding non-data processing scripts in the production server have not been updated, there is no need to synchronously update the corresponding non-data processing scripts in the test server.
  • the same non-data processing script contains the synchronization time in the script synchronization log, and the release time in the script release log.
  • the release time of the non-data processing script is completed in the time of publishing the non-data processing script, which is also the execution end time point of the execution duration of the non-data processing script being published in the production server.
  • the synchronization time and release time of the same non-data processing script can be compared and judged. If the synchronization time is not greater than the release time, the non-data processing script is the target script that needs to be synchronized; if the synchronization time is greater than the release time, it indicates that the Synchronization is not currently required for non-data processing scripts.
  • a plurality of initial script groups are obtained by correlating and grouping the target scripts in the script release log according to a preset grouping rule.
  • the script release log contains information related to the release of the target scripts.
  • the target scripts are related to each other. To ensure that the target scripts can be synchronized concurrently in batches without completely exhausting server resources, they can be released according to grouping rules and scripts.
  • the log associates and groups target scripts to obtain multiple initial script groups.
  • the grouping rule includes the number of groups.
  • step S140 includes sub-steps S141 and S142.
  • the script publishing log includes each production library.
  • the deployment time is the time when the production library starts to be deployed. The deployment of each production library in the log can be published according to the script.
  • the time and the execution duration of each target script obtain the corresponding associated execution sequence
  • the execution duration includes the execution start time point and the execution end time point
  • the execution duration is the time spent in the publishing and execution process of the non-data processing script
  • the execution start time point is the time point when publishing and execution of the non-data processing script is started
  • the execution end time point is the time point when the publishing and execution of the non-data processing script is completed.
  • step S141 includes sub-steps S1411 , S1412 , S1413 , S1414 , S1415 and S1416 .
  • the execution start time of the target script is inconsistent with the deployment time of the production library to which it belongs, it means that the target script is not published and executed immediately after the corresponding production library is deployed, and it can be further judged whether the target script is behind other target scripts.
  • Publish execution that is, to determine whether the execution start time point of the target script is consistent with the execution end time point of another target script. If they are consistent, it means that the target script is indeed published and executed after the execution of the other target script is completed. , determine that the execution order of the target script is after another target script.
  • start execution time point of the target script is inconsistent with the execution end time point of any target script, it indicates that the target script can be executed independently, and it is determined that the execution sequence of the target script is at the end.
  • the script release log also includes the data volume of each non-data processing script.
  • the resulting associated execution order includes sorting information for each target script.
  • the target scripts can be sequentially grouped according to the number of groups and the obtained associated execution order, and multiple initial script groups can be obtained. Then, according to the number of groups, multiple target scripts that are equal to the number of groups in the associated execution sequence can be obtained as an initial script group. , the number of target scripts contained in the last initial script group is less than or equal to the number of groups. Except for the last initial script group, the number of target scripts contained in other initial script groups is equal to the number of groups. Numbering to determine the execution batch of the initial script grouping.
  • the grouping rule includes a data volume threshold.
  • step S140 includes sub-steps S141 and S143.
  • the target scripts can be sequentially grouped according to the data volume threshold and the obtained associated execution order to obtain multiple initial script groups, and then multiple target scripts whose data volume is not greater than the data volume threshold in the associated execution sequence can be obtained correspondingly according to the data volume threshold.
  • the data size of each obtained initial script group is not greater than the data amount threshold, and the initial script group can be numbered to determine the execution batch of the initial script group.
  • the data volume threshold is 2Mb
  • multiple target scripts with a data volume not greater than 2Mb are sequentially obtained from the associated execution sequence to form an initial script group, until all target scripts in the associated execution sequence are grouped into the corresponding initial script group.
  • the data table synchronization scripts are evenly distributed to the plurality of initial script groups to obtain the plurality of script groups.
  • the data table synchronization scripts can be evenly distributed into multiple initial script groups to obtain multiple corresponding script groups.
  • the data table synchronization scripts in the script group are also synchronized.
  • the efficiency of synchronizing non-data processing scripts and synchronizing data information in data tables can be improved.
  • a plurality of the script groups are synchronized in batches in parallel, and data information corresponding to each of the script groups is synchronized to the test server.
  • multiple obtained script groups can be synchronized in batches in parallel, then each batch only executes the scripts included in one script group in parallel, and multiple scripts can be synchronized according to the preset execution interval.
  • Script groups are synchronized in batches in parallel, and the scripts included in the next script group will be executed at every execution interval.
  • the script group contains non-data processing scripts and data processing scripts. When synchronizing a script group, all scripts included in the script group need to be executed in parallel. Synchronizing the non-data processing scripts is to synchronize the corresponding non-data processing scripts in the production server.
  • the same non-data synchronization script has two matching security identifiers (Security Identifiers, SIDs) in the production library of the production server and the test library of the test server.
  • SIDs security identifiers
  • the security identifier correspondingly acquires the security identifier of the target script in the test server, and synchronizes the target script to the test library in the test server that matches the corresponding security identifier.
  • the security identifier of a target script in the production server is: S: ⁇ APP1 ⁇ system ⁇ 001.tmp
  • the corresponding security identifier of the target script in the test server is: C: ⁇ APP1 ⁇ system ⁇ 001. tmp.
  • Synchronous execution of the data processing script means that the data processing script is first synchronized to the test server, and then the data processing script is executed to synchronize the data information contained in the data table corresponding to the data processing script to the test server in parallel, so as to realize Synchronization of data information in data tables.
  • steps S170 , S180 and S190 are further included after step S160 .
  • S170 monitor the synchronous execution process of the scripts in each of the script groups to obtain script monitoring information; S180, determine whether the script monitoring information satisfies a preset judgment condition; S190, if the script monitoring information satisfies a preset judgment condition The judgment condition is to unlock the database corresponding to the script of the script monitoring information.
  • the synchronous execution process of each script can be monitored to obtain script monitoring information.
  • the obtained script monitoring information may include specific information such as script execution time and script type. Judging whether the script monitoring information satisfies the preset judgment conditions, if the judgment conditions are met, it means that the script corresponding to the script monitoring information cannot be successfully executed synchronously due to a problem, and the database corresponding to the script of the script monitoring information needs to be unlocked.
  • the judgment condition includes a time threshold and a target type keyword.
  • step S170 includes sub-steps S171 , S172 and S173 .
  • the monitoring information includes information such as script execution time and script type. It can be used to determine whether the script execution time exceeds the time threshold in the judgment condition. For example, the configurable time threshold is 20 minutes. If it does not exceed, the synchronous execution process of the script will continue to be monitored. ;If it exceeds, it means that the script execution time is too long, and it is necessary to further judge whether the script type matches the target type keyword.
  • the target type keyword can be configured as ddl and pkg. If the script type matches any of the target type keywords If the word matches, it is determined that the script type matches the target type keyword.
  • script type matches the target type keyword, it indicates that the script corresponding to the script monitoring information has a resource lock problem during synchronous execution; if the script type does not match the target type keyword, it indicates that the script corresponding to the script monitoring information has a resource lock problem. Scripts do not have resource locking issues.
  • Some scripts need to access data information in the database during synchronous execution.
  • the database will generate data locks to prevent multiple scripts from accessing the database at the same time. If a data lock is added when a script accesses the database, other scripts will be prohibited from accessing the database at this time. . If there is a problem with resource locks in the script, it means that data locks have been added to the database that the script needs to access, then you can generate the corresponding data lock unlocking script according to the script, and execute the data lock unlocking script in the database of the script to complete the data lock unlocking script.
  • the resource lock is unlocked. After the resource lock of the database is unlocked, the corresponding script can access the data information in the unlocked database and execute synchronously smoothly.
  • a script release log is obtained from a production server and a script synchronization log is obtained from a test server, a data processing script in the script release log is obtained, and a data table synchronization script is correspondingly generated.
  • a time-consuming process is to determine the synchronization time and release time of the script to obtain the target script, associate and group the target scripts to obtain multiple initial script groups, and evenly distribute the data table synchronization scripts to the initial script groups to obtain multiple script groups.
  • Script groups are synchronized in batches in parallel to synchronize scripts.
  • the target scripts with associated relationships can be associated and grouped, and the scripts included in the script grouping can be synchronized in batches in parallel, which can ensure that the scripts with the associated relationship are synchronized in an orderly and parallel manner, which greatly improves the performance of the associated scripts. Efficiency of synchronization.
  • An embodiment of the present application further provides an apparatus for automatically synchronizing an associated script, and the apparatus for automatically synchronizing an associated script is configured to execute any embodiment of the foregoing method for automatically synchronizing an associated script.
  • FIG. 9 is a schematic block diagram of an apparatus for automatically synchronizing an associated script provided by an embodiment of the present application.
  • the associated script automatic synchronization device can be configured in the management server 10 .
  • the associated script automatic synchronization apparatus 100 includes a log acquisition unit 110, a data table synchronization script generation unit 120, a target script acquisition unit 130, an initial script group acquisition unit 140, a script group acquisition unit 150, and a script group parallel synchronization unit 160.
  • the log obtaining unit 110 is configured to obtain a script release log from the production server and obtain a script synchronization log from the test server if a script synchronization instruction input by an administrator is received.
  • the data table synchronization script generating unit 120 is configured to acquire the data processing script in the script release log and generate a corresponding data table synchronization script.
  • the data table synchronization script generation unit 120 includes subunits: a data table information acquisition unit and a script generation unit.
  • a data table information acquisition unit is used for acquiring data table information contained in the data processing script; a script generation unit is used for generating a corresponding data table synchronization script according to the data table information.
  • the target script obtaining unit 130 is configured to judge whether the synchronization time of the same non-data processing script in the script synchronization log is not greater than the publishing time in the script publishing log, and obtain the non-data processing whose synchronization time is not greater than the publishing time script as the target script.
  • the initial script group obtaining unit 140 is configured to associate and group the target scripts in the script release log according to a preset grouping rule to obtain a plurality of initial script groups.
  • the initial script grouping obtaining unit 140 includes subunits: an associated execution sequence obtaining unit and a first grouping unit.
  • an associated execution order obtaining unit configured to associate and group the target scripts in the script release log according to preset grouping rules to obtain a plurality of initial script groups;
  • a first grouping unit is configured to obtain a plurality of initial script groups according to the The target scripts are sequentially grouped in association with the execution order to obtain a plurality of initial script groups.
  • the initial script grouping obtaining unit 140 includes subunits: an associated execution sequence obtaining unit and a second grouping unit.
  • an associated execution sequence obtaining unit configured to obtain the associated execution sequence of the target script according to the deployment time of each production repository and the execution duration of each target script in the script release log;
  • the second grouping unit is configured to obtain the associated execution sequence of the target script according to the The target scripts are sequentially grouped by the data volume threshold and the associated execution order to obtain a plurality of initial script groups.
  • the associated execution order obtaining unit includes subunits: a first judgment unit, a second judgment unit, a first execution order determination unit, a second execution order determination unit, a third execution order determination unit, and a sorting process unit.
  • the first judgment unit is used for judging whether the execution start time point of each target script is consistent with the deployment time of the production library to which the target script belongs; the second judgment unit is used for if the execution start time of the target script is The point is inconsistent with the deployment time of the production library to which it belongs, and it is judged whether the execution start time point of the target script is consistent with the execution end time point of another target script; the first execution order determination unit is used to determine if the execution of the target script The start time point is consistent with the execution end time point of another target script, and it is determined that the execution order of the target script is located after the other target script; the second execution order determination unit is used for if the execution of the target script starts The time point is inconsistent with the execution end time point of any of the target scripts, and it is determined that the execution order of the target script is at the end; the third execution order determination unit is used if the execution start time point of the target script is consistent with the production The deployment time of the library is consistent, and it is determined that the execution order of the target script is
  • the script group obtaining unit 150 is configured to evenly distribute the data table synchronization script to the multiple initial script groups to obtain the multiple script groups.
  • the script grouping parallel synchronization unit 160 is configured to perform parallel synchronization of a plurality of the script groups in batches, and synchronize the data information corresponding to each of the script groups to the test server.
  • the associated script automatic synchronization apparatus further includes subunits: a script monitoring information acquisition unit, a script monitoring information judgment unit, and a database unlocking unit.
  • a script monitoring information acquisition unit configured to monitor the synchronous execution process of the scripts in each of the script groups to obtain script monitoring information
  • a script monitoring information judgment unit configured to judge whether the script monitoring information satisfies a preset judgment condition
  • a database unlocking unit configured to unlock the database corresponding to the script of the script monitoring information if the script monitoring information satisfies a preset judgment condition.
  • the script monitoring information judgment unit includes subunits: a script execution duration judgment unit, a script type judgment unit, and a judgment unit.
  • a script execution duration judging unit for judging whether the script execution duration in the script monitoring information exceeds the time threshold; a script type judgment unit for judging the script monitoring if the script execution duration exceeds the time threshold Whether the script type in the information matches the target type keyword; a determining unit, configured to determine that the script monitoring information satisfies the judgment condition if the script type matches the target type keyword.
  • the above-mentioned automatic synchronization method for associated scripts is applied to the apparatus for automatically synchronizing associated scripts provided by the embodiments of the present application, and the script publishing log is obtained from the production server and the script synchronization log is obtained from the test server, and the data processing script in the script publishing log is obtained and correspondingly generates data Table synchronization script, determine the synchronization time and release time of each time-consuming processing script to obtain the target script, associate and group the target script to obtain multiple initial script groups, and evenly distribute the data table synchronization script to the initial script group to obtain multiple Script grouping, to synchronize multiple script groups in parallel in batches to synchronize scripts.
  • the target scripts with associated relationships can be associated and grouped, and the scripts included in the script grouping can be synchronized in batches in parallel, which can ensure that the scripts with the associated relationship are synchronized in an orderly and parallel manner, which greatly improves the performance of the associated scripts. Efficiency of synchronization.
  • the above-mentioned apparatus for automatically synchronizing associated scripts can be implemented in the form of a computer program, and the computer program can be executed on a computer device as shown in FIG. 10 .
  • FIG. 10 is a schematic block diagram of a computer device provided by an embodiment of the present application.
  • the computer device may be an association server 10 for executing an association script automatic synchronization method to automatically synchronize association scripts.
  • the computer device 500 includes a processor 502, a memory and a network interface 505 connected through a system bus 501, wherein the memory may include a storage medium 503 and an internal memory 504, wherein the storage medium may be a volatile storage medium or a non-volatile storage medium Volatile storage media.
  • the storage medium 503 can store an operating system 5031 and a computer program 5032 .
  • the computer program 5032 when executed, can cause the processor 502 to execute the associated script automatic synchronization method.
  • the processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .
  • the internal memory 504 provides an environment for running the computer program 5032 in the storage medium 503.
  • the processor 502 can execute the automatic synchronization method of the associated script.
  • the network interface 505 is used for network communication, such as providing transmission of data information.
  • the network interface 505 is used for network communication, such as providing transmission of data information.
  • FIG. 10 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied.
  • the specific computer device 500 may include more or fewer components than shown, or combine certain components, or have a different arrangement of components.
  • the processor 502 is configured to run the computer program 5032 stored in the memory, so as to realize the corresponding functions in the above-mentioned method for automatic synchronization of associated scripts.
  • the embodiment of the computer device shown in FIG. 10 does not constitute a limitation on the specific structure of the computer device. Either some components are combined, or different component arrangements.
  • the computer device may only include a memory and a processor.
  • the structures and functions of the memory and the processor are the same as those of the embodiment shown in FIG. 10 , which will not be repeated here.
  • the processor 502 may be a central processing unit (Central Processing Unit, CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor can be a microprocessor or the processor can also be any conventional processor or the like.
  • a computer-readable storage medium may be a non-volatile or volatile computer-readable storage medium.
  • the computer-readable storage medium stores a computer program, wherein when the computer program is executed by the processor, the steps included in the above-mentioned method for automatic synchronization of associated scripts are implemented.
  • the disclosed apparatus, apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of the units is only logical function division.
  • there may be other division methods, or units with the same function may be grouped into one Units, such as multiple units or components, may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solutions of the embodiments of the present application.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
  • the read storage medium includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned computer-readable storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

一种关联脚本自动同步方法、装置、计算机设备及存储介质,属于运维技术领域,该方法包括:从生产服务器获取脚本发布日志并从测试服务器获取脚本同步日志(S110),获取脚本发布日志中的数据处理脚本并对应生成数据表同步脚本(S120),对同一非数据处理脚本的同步时间与发布时间进行判断,获取同步时间不大于发布时间的非数据处理脚本作为目标脚本(S130),对目标脚本进行关联分组得到多个初始脚本分组(S140),将数据表同步脚本平均分配至初始脚本分组得到多个脚本分组(S150),对多个脚本分组进行分批次并行同步(S160)。基于所述方法,可对存在关联关系的目标脚本进行关联分组,对脚本分组包含的脚本进行分批次并行同步,可确保存证关联关系的脚本依次有序并行同步,极大提高了对关联脚本进行同步的效率。

Description

关联脚本自动同步方法、装置、计算机设备及存储介质
本申请要求于2020年12月17日提交中国专利局、申请号为202011495921.1,发明名称为“关联脚本自动同步方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及运维技术领域,尤其涉及一种关联脚本自动同步方法、装置、计算机设备及存储介质。
背景技术
大型企业通常会开发大量业务类应用程序,各应用程序中包含多个脚本,当企业对大量应用程序进行批量迭代更新后,则需要在其他服务器中对迭代更新后的应用程序进行同步更新。传统技术方法中均是以应用程序为整体进行同步更新,而实际应用中不同应用程序的脚本之间存在关联关系,也即前一脚本完成同步后才能进行后一脚本的同步,且不同脚本进行同步所需时间各不相同,然而发明人发现,传统技术方法忽略了脚本之间的关联关系而采用同步展开方式对大量应用程序所包含的脚本进行同步,导致大量同步顺序靠后的脚本无法及时完成同步但依然占用系统资源,服务器资源消耗殆尽则会导致服务器崩溃,导致对应用程序进行同步更新的效率较低。因此,现有技术方法对应用程序包含的脚本进行同步时,存在同步效率较低的问题。
发明内容
本申请实施例提供了一种关联脚本自动同步方法、装置、计算机设备及存储介质,旨在解决现有技术方法对应用程序包含的脚本进行同步时所存在的同步效率较低的问题。
第一方面,本申请实施例提供了一种关联脚本自动同步方法,其包括:
若接收到管理员所输入的脚本同步指令,从所述生产服务器获取脚本发布日志并从所述测试服务器获取脚本同步日志;
获取所述脚本发布日志中的数据处理脚本并生成对应的数据表同步脚本;
对同一非数据处理脚本在所述脚本同步日志中的同步时间是否不大于所述脚本发布日志中的发布时间进行判断,获取同步时间不大于发布时间的非数据处理脚本作为目标脚本;
根据预置的分组规则对所述脚本发布日志中所述目标脚本进行关联分组得到多个初始脚本分组;
将所述数据表同步脚本平均分配至所述多个初始脚本分组以得到所述多个脚本分组;
对多个所述脚本分组进行分批次并行同步,将与每一所述脚本分组对应的数据信息同步至所述测试服务器。
第二方面,本申请实施例提供了一种关联脚本自动同步装置,其包括:
日志获取单元,用于若接收到管理员所输入的脚本同步指令,从所述生产服务器获取脚本发布日志并从所述测试服务器获取脚本同步日志;
数据表同步脚本生成单元,用于获取所述脚本发布日志中的数据处理脚本并生成对应的 数据表同步脚本;
目标脚本获取单元,用于对同一非数据处理脚本在所述脚本同步日志中的同步时间是否不大于所述脚本发布日志中的发布时间进行判断,获取同步时间不大于发布时间的非数据处理脚本作为目标脚本;
初始脚本分组获取单元,用于根据预置的分组规则对所述脚本发布日志中所述目标脚本进行关联分组得到多个初始脚本分组;
脚本分组获取单元,用于将所述数据表同步脚本平均分配至所述多个初始脚本分组以得到所述多个脚本分组;
脚本分组并行同步单元,用于对多个所述脚本分组进行分批次并行同步,将与每一所述脚本分组对应的数据信息同步至所述测试服务器。
第三方面,本申请实施例又提供了一种计算机设备,其包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述第一方面所述的关联脚本自动同步方法。
第四方面,本申请实施例还提供了一种计算机可读存储介质,其中所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行时使所述处理器执行上述第一方面所述的关联脚本自动同步方法。
本申请实施例提供了一种关联脚本自动同步方法、装置、计算机设备及存储介质。从生产服务器获取脚本发布日志并从测试服务器获取脚本同步日志,获取脚本发布日志中的数据处理脚本并对应生成数据表同步脚本,对每一费时间处理脚本的同步时间与发布时间进行判断得到目标脚本,对目标脚本进行关联分组得到多个初始脚本分组,将数据表同步脚本平均分配至初始脚本分组得到多个脚本分组,对多个脚本分组进行分批次并行同步,以实现对脚本进行同步。通过上述方法,可对存在关联关系的目标脚本进行关联分组,对脚本分组包含的脚本进行分批次并行同步,可确保存证关联关系的脚本依次有序并行同步,极大提高了对关联脚本进行同步的效率。
附图说明
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的关联脚本自动同步方法的流程示意图;
图2为本申请实施例提供的关联脚本自动同步方法的应用场景示意图;
图3为本申请实施例提供的关联脚本自动同步方法的子流程示意图;
图4为本申请实施例提供的关联脚本自动同步方法的另一子流程示意图;
图5为本申请实施例提供的关联脚本自动同步方法的另一子流程示意图;
图6为本申请实施例提供的关联脚本自动同步方法的另一子流程示意图;
图7为本申请实施例提供的关联脚本自动同步方法的另一流程示意图;
图8为本申请实施例提供的关联脚本自动同步方法的另一子流程示意图;
图9为本申请实施例提供的关联脚本自动同步装置的示意性框图;
图10为本申请实施例提供的计算机设备的示意性框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
请参阅图1及图2,图1是本申请实施例提供的关联脚本自动同步方法的流程示意图,图2为本申请实施例提供的关联脚本自动同步方法的应用场景示意图,该关联脚本自动同步方法应用于管理服务器10中,该方法通过安装于管理服务器10中的应用软件进行执行,管理服务器10分别与至少一台生产服务器20及至少一台测试服务器30进行通信连接以实现数据信息的传输,其中,管理服务器10即是企业内部所配置的用于将生产服务器20内发布的非数据处理脚本及数据表信息同步至测试服务器30的服务器端,管理服务器10的使用者即为企业的管理员。如图1所示,该方法包括步骤S110~S160。
S110、若接收到管理员所输入的脚本同步指令,从所述生产服务器获取脚本发布日志并从所述测试服务器获取脚本同步日志。
若接收到管理员所输入的脚本同步指令,从所述生产服务器获取脚本发布日志并从所述测试服务器获取脚本同步日志。管理员可输入脚本同步指令至管理服务器,则管理服务器开始进行脚本同步操作;也可以是管理员预先设置同步周期,到达同步周期中的同步时间点,管理服务器自动进行脚本同步。具体的,管理服务器从生产服务器获取脚本发布日志,程序开发人员完成应用程序开发后,则会将应用程序对应的脚本发布至生产服务器中,脚本发布日志即为对脚本发布至生产服务器的过程进行记录所得到的日志信息,程序开发人员每发布新版本应用程序至生产服务器,则根据所发布的应用程序包含的脚本对脚本发布日志进行一次更新;对应用程序进行同步更新即为将生产服务器内已发布的脚本对应同步更新至测试服务器中,脚本同步日志即为对脚本同步更新至测试服务器的过程进行记录所得到的日志信息,对测试服务器中的脚本进行一次同步,即根据同步处理过程包含的脚本对脚本同步日志进行一次更新。
S120、获取所述脚本发布日志中的数据处理脚本并生成对应的数据表同步脚本。
获取所述脚本发布日志中的数据处理脚本并生成对应的数据表同步脚本。脚本发布日志中记录有数据处理脚本及非数据处理脚本的发布过程,数据处理脚本即为对数据表中的数据信息进行处理的脚本,获取脚本发布日志中的数据处理脚本,并对应生成数据表同步脚本,通过执行数据表同步脚本,可对数据处理脚本处理的数据表中的数据信息进行更高效地同步处理。
在一实施例中,如图3所示,步骤S120包括子步骤S121和S122。
S121、获取所述数据处理脚本中包含的数据表信息;S122、根据所述数据表信息生成对应的数据表同步脚本。
具体的,数据处理脚本中包含数据表信息,数据表信息即为数据处理脚本所处理的数据表的名称、编号及类型等信息。例如,数据表信息中包括某一数据表的具体信息为tablename_123.sql。可基于数据表信息生成可进行数据信息并行同步的数据表同步脚本,具体的,可基于数据表名称相同、类型相同且编号不同的多个数据表生成一个数据表同步脚本,例如,可基于tablename_123.sql、tablename_124.sql及tablename_125.sql三个数据表对应生成数据表同步脚本,则执行该数据表同步脚本即可对相应的多个数据表中包含的数据信息进行并行同步,可最大化利用数据库服务资源以进行数据信息的同步,可大幅提升对数据表中的数据信息进行同步处理的效率。
S130、对同一非数据处理脚本在所述脚本同步日志中的同步时间是否不大于所述脚本发布日志中的发布时间进行判断,获取同步时间不大于发布时间的非数据处理脚本作为目标脚本。
对同一非数据处理脚本在所述脚本同步日志中的同步时间是否不大于所述脚本发布日志中的发布时间进行判断,获取同步时间不大于发布时间的非数据处理脚本作为目标脚本。测试服务器中包含的非数据处理脚本与生产服务器包含的非数据处理脚本相对应,若生产服务器中相应非数据处理脚本并未被更新,则无需对测试服务器中相应非数据处理脚本进行同步更新。具体的,同一非数据处理脚本在脚本同步日志中包含同步时间,在脚本发布日志中包含发布时间,同步时间可以是测试服务器对非数处理脚本进行同步的终止时间,发布时间可以是在生产服务器中完成对非数据处理脚本发布的时间,发布时间也即是非数据处理脚本在生产服务器中进行发布的执行时长的执行结束时间点。可对同一非数据处理脚本的同步时间与发布时间进行对比判断,若同步时间不大于发布时间,则该非数据处理脚本即为需要进行同步的目标脚本;若同步时间大于发布时间,则表明该非数据处理脚本当前并不需要进行同步。
S140、根据预置的分组规则对所述脚本发布日志中所述目标脚本进行关联分组得到多个初始脚本分组。
根据预置的分组规则对所述脚本发布日志中所述目标脚本进行关联分组得到多个初始脚本分组。脚本发布日志中包含与对目标脚本进行发布的相关信息,目标脚本相互之间存在关联关系,为确保可以对目标脚本进行批量并发同步而不至于完全耗尽服务器资源,可根据分组规则及脚本发布日志对目标脚本进行关联分组,得到多个初始脚本分组。
在一实施例中,分组规则中包括分组数量,如图4所示,步骤S140包括子步骤S141和S142。
S141、根据所述脚本发布日志中每一生产库的部署时间及每一所述目标脚本的执行时长获取所述目标脚本的关联执行顺序。
在将非数据处理脚本发布至生产服务器时,需要在生产服务器中对应部署一个或多个生产库,并将相应非数据处理脚本发布至所部署的生产库中,脚本发布日志中包括每一生产库的部署时间,以及对每一生产库中包含的非数据处理脚本进行发布的相关信息,部署时间即为对生产库开始进行部署的时间点,可根据脚本发布日志中每一生产库的部署时间及每一目标脚本的执行时长获取对应的关联执行顺序,所述执行时长包括执行开始时间点及执行结束时间点,执行时长即为非数据处理脚本在进行发布执行过程中所耗费的时长,执行开始时间点即为开始对非数据处理脚本进行发布执行的时间点,执行结束时间点即为完成对非数据处理脚本进行发布执行的时间点。
在一实施例中,如图6所示,步骤S141包括子步骤S1411、S1412、S1413、S1414、S1415和S1416。
S1411、判断每一所述目标脚本的执行开始时间点是否与所述目标脚本所属生产库的部署时间相一致;
首先判断目标脚本的执行开始时间点是否与该目标脚本所属生产库的部署时间相一致,若目标脚本的执行开始时间点与所属生产库的部署时间点相一致,则表明完成对生产库进行部署的同时也开始对目标脚本进行发布执行,则该目标脚本的执行顺序位于最前。
S1412、若所述目标脚本的执行开始时间点与所属生产库的部署时间不一致,判断所述目标脚本的执行开始时间点是否与另一目标脚本的执行结束时间点相一致;S1413、若所述目标脚本的执行开始时间点与另一目标脚本的执行结束时间点相一致,确定所述目标脚本的执行顺序位于所述另一目标脚本之后。
若目标脚本的执行开始时间点与所属生产库的部署时间不一致,则表明目标脚本在相应生产库完成部署后并未在第一时间进行发布执行,可进一步判断该目标脚本是否在其他目标脚本之后发布执行,也即是判断目标脚本的执行开始时间点是否与另一目标脚本的执行结束时间点相一致,若相一致,则表明该目标脚本确实在另一目标脚本完成执行之后才进行发布执行,确定该目标脚本的执行顺序位于另一目标脚本之后。
S1414、若所述目标脚本的执行开始时间点与任一所述目标脚本的执行结束时间点均不一致,确定所述目标脚本的执行顺序位于最后;S1415、若所述目标脚本的执行开始时间点与所属生产库的部署时间相一致,确定所述目标脚本的执行顺序位于最前。
若目标脚本的开始执行时间点与任一目标脚本的执行结束时间点均不一致,则表明目标脚本可被单独执行,确定该目标脚本的执行顺序位于最后。
S1416、根据所述目标脚本的执行时长对执行顺序相同的多个目标脚本进行排序得到对应的关联执行顺序。
完成对所有目标脚本的执行顺序进行排序后,可对执行顺序相同的多个目标脚本进行再 次排序,具体的,可根据目标脚本的执行时长由小到大对执行顺序相同的多个目标脚本进行排序,得到关联执行顺序;脚本发布日志中还包含每一非数据处理脚本的数据量大小,可根据目标脚本的数据量大小由小到大对执行顺序相同的多个目标脚本进行排序,得到关联执行顺序。所得到的关联执行顺序中包含每一目标脚本的排序信息。
S142、根据所述分组数量及所述关联执行顺序对所述目标脚本进行顺序分组得到多个初始脚本分组。
可根据分组数量及所得到的关联执行顺序对目标脚本进行顺序分组,得到多个初始脚本分组,则可按照分组数量对应获取关联执行顺序中与分组数量相等的多个目标脚本作为一个初始脚本分组,则最后一个初始脚本分组中包含的目标脚本的数量少于或等于分组数量,除最后一个初始脚本分组之外,其它初始脚本分组包含的目标脚本的数量均等于分组数量,可对初始脚本分组进行编号以确定初始脚本分组的执行批次。
例如,分组数量为12,则依次从关联执行顺序中获取12个目标脚本组成一个初始脚本分组,直至关联执行顺序中所有目标脚本均被分组至相应初始脚本分组。
在一实施例中,所述分组规则中包括数据量阈值,如图5所示,步骤S140包括子步骤S141和S143。
S141、根据所述脚本发布日志中每一生产库的部署时间及每一所述目标脚本的执行时长获取所述目标脚本的关联执行顺序;S143、根据所述数据量阈值及所述关联执行顺序对所述目标脚本进行顺序分组得到多个初始脚本分组。
可根据数据量阈值及所得到的关联执行顺序对目标脚本进行顺序分组,得到多个初始脚本分组,则可按照数据量阈值对应获取关联执行顺序中数据量不大于数据量阈值的多个目标脚本作为一个初始脚本分组,则所得到的每一初始脚本分组的数据量大小均不大于数据量阈值,可对初始脚本分组进行编号以确定初始脚本分组的执行批次。
例如,数据量阈值为2Mb,则依次从关联执行顺序中获取数据量不大于2Mb的多个目标脚本组成一个初始脚本分组,直至关联执行顺序中所有目标脚本均被分组至相应初始脚本分组。
S150、将所述数据表同步脚本平均分配至所述多个初始脚本分组以得到所述多个脚本分组。
将所述数据表同步脚本平均分配至所述多个初始脚本分组以得到所述多个脚本分组。可将数据表同步脚本平均分配至多个初始脚本分组中,得到对应的多个脚本分组,则对脚本分组中的非数据处理脚本进行同步时,也同时对其中的数据表同步脚本进行同步执行,可在对服务器资源进行最大化利用的前提下,提高对非数据处理脚本进行同步及对数据表中数据信息进行同步处理的效率。
S160、对多个所述脚本分组进行分批次并行同步,将与每一所述脚本分组对应的数据信息同步至所述测试服务器。
对多个所述脚本分组进行分批次并行同步,将与每一所述脚本分组对应的数据信息同步至所述测试服务器。具体的,可对所得到的多个脚本分组进行分批次并行同步,则每一批次 仅对一个脚本分组中所包含的脚本进行并行同步执行,还可根据预置的执行间隔时间对多个脚本分组进行分批次并行同步,则每间隔一个执行间隔时间则开始执行下一脚本分组中所包含的脚本。脚本分组中包含非数据处理脚本及数据处理脚本,对脚本分组进行同步时需对该脚本分组所包含的所有脚本进行并行同步执行,同步非数据处理脚本即为将生产服务器中相应非数据处理脚本同步至测试服务器中,同一非数据同步脚本在生产服务器的生产库及测试服务器的测试库中分别拥有相匹配的两个安全标识符(Security Identifiers,SID),可根据目标脚本在生产服务器中的安全标识符对应获取该目标脚本在测试服务器中的安全标识符,并将该目标脚本对应同步至测试服务器中与对应安全标识符相匹配的测试库中。例如某一目标脚本在生产服务器中的安全标识符为:S:\APP1\system\001.tmp,则该目标脚本在测试服务器中对应的安全标识符为:C:\APP1\system\001.tmp。同步执行数据处理脚本,即可将数据处理脚本先同步至测试服务器内,再执行该数据处理脚本以将与该数据处理脚本对应的数据表中包含的数据信息并行同步至测试服务器中,以实现对数据表中数据信息的同步。
在一实施例中,如图7所示,步骤S160之后还包括步骤S170、S180和S190。
S170、对每一所述脚本分组中脚本的同步执行过程进行监控得到脚本监控信息;S180、判断所述脚本监控信息是否满足预置的判断条件;S190、若所述脚本监控信息满足预置的判断条件,对与所述脚本监控信息的脚本对应的数据库进行解锁。
在对脚本分组中所包含脚本进行同步执行的过程中,可对每一脚本的同步执行过程进行监控,得到脚本监控信息,所得到的脚本监控信息可以包括脚本执行时长、脚本类型等具体信息。判断脚本监控信息是否满足预置的判断条件,若满足判断条件则表明与脚本监控信息对应的脚本因存在问题而无法顺利进行同步执行,则需对与脚本监控信息的脚本对应的数据库进行解锁,其中,判断条件包括时间阈值及目标类型关键字。
在一实施例中,如图8所示,步骤S170包括子步骤S171、S172和S173。
S171、判断所述脚本监控信息中的脚本执行时长是否超出所述时间阈值;S172、若所述脚本执行时长超出所述时间阈值,判断所述脚本监控信息中的脚本类型是否与所述目标类型关键字相匹配;S173、若所述脚本类型与所述目标类型关键字相匹配,判定所述脚本监控信息满足所述判断条件。
监控信息中包括脚本执行时长及脚本类型等信息,可判断脚本执行时长是否超出判断条件中的时间阈值,例如可配置时间阈值为20分钟,若未超出则对该脚本的同步执行过程继续进行监控;若超出则表明脚本执行时长过长,需进一步判断脚本类型是否与目标类型关键字相匹配,例如,可配置目标类型关键字为ddl和pkg,若脚本类型与目标类型关键字中任一关键字相匹配,均判定脚本类型与目标类型关键字相匹配。若脚本类型与目标类型关键字相匹配,则表明脚本监控信息对应的脚本在进行同步执行过程中存在资源锁的问题;若脚本类型不与目标类型关键字相匹配,则表明脚本监控信息对应的脚本并不存在资源锁的问题。
部分脚本在同步执行过程中需访问数据库中的数据信息,数据库为避免多个脚本同时访问数据库会生成数据锁,在某一脚本访问数据库时添加数据锁,则此时会禁止其他脚本访问该数据库。若脚本存在资源锁的问题,则表明该脚本所需访问的数据库已添加数据锁,则可 根据该脚本生成对应的数据锁解锁脚本,并在该脚本的数据库内执行数据锁解锁脚本以完成对资源锁进行解锁,对数据库的资源锁进行解锁后,相应脚本即可访问已解锁的数据库中的数据信息并顺利进行同步执行。
在本申请实施例所提供的关联脚本自动同步方法中,从生产服务器获取脚本发布日志并从测试服务器获取脚本同步日志,获取脚本发布日志中的数据处理脚本并对应生成数据表同步脚本,对每一费时间处理脚本的同步时间与发布时间进行判断得到目标脚本,对目标脚本进行关联分组得到多个初始脚本分组,将数据表同步脚本平均分配至初始脚本分组得到多个脚本分组,对多个脚本分组进行分批次并行同步,以实现对脚本进行同步。通过上述方法,可对存在关联关系的目标脚本进行关联分组,对脚本分组包含的脚本进行分批次并行同步,可确保存证关联关系的脚本依次有序并行同步,极大提高了对关联脚本进行同步的效率。
本申请实施例还提供一种关联脚本自动同步装置,该关联脚本自动同步装置用于执行前述关联脚本自动同步方法的任一实施例。具体地,请参阅图9,图9是本申请实施例提供的关联脚本自动同步装置的示意性框图。该关联脚本自动同步装置可配置于管理服务器10中。
如图9所示,关联脚本自动同步装置100包括日志获取单元110、数据表同步脚本生成单元120、目标脚本获取单元130、初始脚本分组获取单元140、脚本分组获取单元150和脚本分组并行同步单元160。
日志获取单元110,用于若接收到管理员所输入的脚本同步指令,从所述生产服务器获取脚本发布日志并从所述测试服务器获取脚本同步日志。
数据表同步脚本生成单元120,用于获取所述脚本发布日志中的数据处理脚本并生成对应的数据表同步脚本。
在一实施例中,所述数据表同步脚本生成单元120包括子单元:数据表信息获取单元和脚本生成单元。
数据表信息获取单元,用于获取所述数据处理脚本中包含的数据表信息;脚本生成单元,用于根据所述数据表信息生成对应的数据表同步脚本。
目标脚本获取单元130,用于对同一非数据处理脚本在所述脚本同步日志中的同步时间是否不大于所述脚本发布日志中的发布时间进行判断,获取同步时间不大于发布时间的非数据处理脚本作为目标脚本。
初始脚本分组获取单元140,用于根据预置的分组规则对所述脚本发布日志中所述目标脚本进行关联分组得到多个初始脚本分组。
在一实施例中,所述初始脚本分组获取单元140包括子单元:关联执行顺序获取单元和第一分组单元。
关联执行顺序获取单元,用于根据预置的分组规则对所述脚本发布日志中所述目标脚本进行关联分组得到多个初始脚本分组;第一分组单元,用于根据所述分组数量及所述关联执行顺序对所述目标脚本进行顺序分组得到多个初始脚本分组。
在一实施例中,所述初始脚本分组获取单元140包括子单元:关联执行顺序获取单元和第二分组单元。
关联执行顺序获取单元,用于根据所述脚本发布日志中每一生产库的部署时间及每一所述目标脚本的执行时长获取所述目标脚本的关联执行顺序;第二分组单元,用于根据所述数据量阈值及所述关联执行顺序对所述目标脚本进行顺序分组得到多个初始脚本分组。
在一实施例中,所述关联执行顺序获取单元包括子单元:第一判断单元、第二判断单元、第一执行顺序确定单元、第二执行顺序确定单元、第三执行顺序确定单元和排序处理单元。
第一判断单元,用于判断每一所述目标脚本的执行开始时间点是否与所述目标脚本所属生产库的部署时间相一致;第二判断单元,用于若所述目标脚本的执行开始时间点与所属生产库的部署时间不一致,判断所述目标脚本的执行开始时间点是否与另一目标脚本的执行结束时间点相一致;第一执行顺序确定单元,用于若所述目标脚本的执行开始时间点与另一目标脚本的执行结束时间点相一致,确定所述目标脚本的执行顺序位于所述另一目标脚本之后;第二执行顺序确定单元,用于若所述目标脚本的执行开始时间点与任一所述目标脚本的执行结束时间点均不一致,确定所述目标脚本的执行顺序位于最后;第三执行顺序确定单元,用于若所述目标脚本的执行开始时间点与所属生产库的部署时间相一致,确定所述目标脚本的执行顺序位于最前;排序处理单元,用于根据所述目标脚本的执行时长对执行顺序相同的多个目标脚本进行排序得到对应的关联执行顺序。
脚本分组获取单元150,用于将所述数据表同步脚本平均分配至所述多个初始脚本分组以得到所述多个脚本分组。
脚本分组并行同步单元160,用于对多个所述脚本分组进行分批次并行同步,将与每一所述脚本分组对应的数据信息同步至所述测试服务器。
在一实施例中,所述关联脚本自动同步装置还包括子单元:脚本监控信息获取单元、脚本监控信息判断单元和数据库解锁单元。
脚本监控信息获取单元,用于对每一所述脚本分组中脚本的同步执行过程进行监控得到脚本监控信息;脚本监控信息判断单元,用于判断所述脚本监控信息是否满足预置的判断条件;数据库解锁单元,用于若所述脚本监控信息满足预置的判断条件,对与所述脚本监控信息的脚本对应的数据库进行解锁。
在一实施例中,所述脚本监控信息判断单元包括子单元:脚本执行时长判断单元、脚本类型判断单元和判定单元。
脚本执行时长判断单元,用于判断所述脚本监控信息中的脚本执行时长是否超出所述时间阈值;脚本类型判断单元,用于若所述脚本执行时长超出所述时间阈值,判断所述脚本监控信息中的脚本类型是否与所述目标类型关键字相匹配;判定单元,用于若所述脚本类型与所述目标类型关键字相匹配,判定所述脚本监控信息满足所述判断条件。
在本申请实施例所提供的关联脚本自动同步装置应用上述关联脚本自动同步方法,从生产服务器获取脚本发布日志并从测试服务器获取脚本同步日志,获取脚本发布日志中的数据处理脚本并对应生成数据表同步脚本,对每一费时间处理脚本的同步时间与发布时间进行判断得到目标脚本,对目标脚本进行关联分组得到多个初始脚本分组,将数据表同步脚本平均分配至初始脚本分组得到多个脚本分组,对多个脚本分组进行分批次并行同步,以实现对脚 本进行同步。通过上述方法,可对存在关联关系的目标脚本进行关联分组,对脚本分组包含的脚本进行分批次并行同步,可确保存证关联关系的脚本依次有序并行同步,极大提高了对关联脚本进行同步的效率。
上述关联脚本自动同步装置可以实现为计算机程序的形式,该计算机程序可以在如图10所示的计算机设备上运行。
请参阅图10,图10是本申请实施例提供的计算机设备的示意性框图。该计算机设备可以是用于执行关联脚本自动同步方法以对关联脚本进行自动同步的关联服务器10。
参阅图10,该计算机设备500包括通过系统总线501连接的处理器502、存储器和网络接口505,其中,存储器可以包括存储介质503和内存储器504,其中存储介质可以是易失性存储介质或非易失性存储介质。
该存储介质503可存储操作系统5031和计算机程序5032。该计算机程序5032被执行时,可使得处理器502执行关联脚本自动同步方法。
该处理器502用于提供计算和控制能力,支撑整个计算机设备500的运行。
该内存储器504为存储介质503中的计算机程序5032的运行提供环境,该计算机程序5032被处理器502执行时,可使得处理器502执行关联脚本自动同步方法。
该网络接口505用于进行网络通信,如提供数据信息的传输等。本领域技术人员可以理解,图10中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备500的限定,具体的计算机设备500可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
其中,所述处理器502用于运行存储在存储器中的计算机程序5032,以实现上述的关联脚本自动同步方法中对应的功能。
本领域技术人员可以理解,图10中示出的计算机设备的实施例并不构成对计算机设备具体构成的限定,在其他实施例中,计算机设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。例如,在一些实施例中,计算机设备可以仅包括存储器及处理器,在这样的实施例中,存储器及处理器的结构及功能与图10所示实施例一致,在此不再赘述。
应当理解,在本申请实施例中,处理器502可以是中央处理单元(Central Processing Unit,CPU),该处理器502还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
在本申请的另一实施例中提供计算机可读存储介质。该计算机可读存储介质可以为非易失性或易失性的计算机可读存储介质。该计算机可读存储介质存储有计算机程序,其中计算机程序被处理器执行时实现上述的关联脚本自动同步方法中所包含的步骤。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的设备、装 置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为逻辑功能划分,实际实现时可以有另外的划分方式,也可以将具有相同功能的单元集合成一个单元,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本申请实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个计算机可读存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的计算机可读存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种关联脚本自动同步方法,应用于管理服务器,所述管理服务器与至少一台生产服务器及至少一台测试服务器通过网络连接以进行数据信息的传输,其中,所述方法包括:
    若接收到管理员所输入的脚本同步指令,从所述生产服务器获取脚本发布日志并从所述测试服务器获取脚本同步日志;
    获取所述脚本发布日志中的数据处理脚本并生成对应的数据表同步脚本;
    对同一非数据处理脚本在所述脚本同步日志中的同步时间是否不大于所述脚本发布日志中的发布时间进行判断,获取同步时间不大于发布时间的非数据处理脚本作为目标脚本;
    根据预置的分组规则对所述脚本发布日志中所述目标脚本进行关联分组得到多个初始脚本分组;
    将所述数据表同步脚本平均分配至所述多个初始脚本分组以得到所述多个脚本分组;
    对多个所述脚本分组进行分批次并行同步,将与每一所述脚本分组对应的数据信息同步至所述测试服务器。
  2. 根据权利要求1所述的关联脚本自动同步方法,其中,所述获取所述脚本发布日志中的数据处理脚本并生成对应的数据表同步脚本,包括:
    获取所述数据处理脚本中包含的数据表信息;
    根据所述数据表信息生成对应的数据表同步脚本。
  3. 根据权利要求1所述的关联脚本自动同步方法,其中,所述分组规则中包括分组数量,所述根据预置的分组规则对所述脚本发布日志中所述目标脚本进行关联分组得到多个初始脚本分组,包括:
    根据所述脚本发布日志中每一生产库的部署时间及每一所述目标脚本的执行时长获取所述目标脚本的关联执行顺序;
    根据所述分组数量及所述关联执行顺序对所述目标脚本进行顺序分组得到多个初始脚本分组。
  4. 根据权利要求1所述的关联脚本自动同步方法,其中,所述分组规则中包括数据量阈值,所述根据预置的分组规则对所述脚本发布日志中每一生产库所包含的关联脚本及所述数据表同步脚本进行分组得到多个脚本分组,包括:
    根据所述脚本发布日志中每一生产库的部署时间及每一所述目标脚本的执行时长获取所述目标脚本的关联执行顺序;
    根据所述数据量阈值及所述关联执行顺序对所述目标脚本进行顺序分组得到多个初始脚本分组。
  5. 根据权利要求3所述的关联脚本自动同步方法,其中,所述执行时长包括执行开始时间点及执行结束时间点,所述根据所述脚本发布日志中每一生产库的部署时间及每一所述目标脚本的执行时长获取所述目标脚本的关联执行顺序,包括:
    判断每一所述目标脚本的执行开始时间点是否与所述目标脚本所属生产库的部署时间相一致;
    若所述目标脚本的执行开始时间点与所属生产库的部署时间不一致,判断所述目标脚本 的执行开始时间点是否与另一目标脚本的执行结束时间点相一致;
    若所述目标脚本的执行开始时间点与另一目标脚本的执行结束时间点相一致,确定所述目标脚本的执行顺序位于所述另一目标脚本之后;
    若所述目标脚本的执行开始时间点与任一所述目标脚本的执行结束时间点均不一致,确定所述目标脚本的执行顺序位于最后;
    若所述目标脚本的执行开始时间点与所属生产库的部署时间相一致,确定所述目标脚本的执行顺序位于最前;
    根据所述目标脚本的执行时长对执行顺序相同的多个目标脚本进行排序得到对应的关联执行顺序。
  6. 根据权利要求4所述的关联脚本自动同步方法,其中,所述执行时长包括执行开始时间点及执行结束时间点,所述根据所述脚本发布日志中每一生产库的部署时间及每一所述目标脚本的执行时长获取所述目标脚本的关联执行顺序,包括:
    判断每一所述目标脚本的执行开始时间点是否与所述目标脚本所属生产库的部署时间相一致;
    若所述目标脚本的执行开始时间点与所属生产库的部署时间不一致,判断所述目标脚本的执行开始时间点是否与另一目标脚本的执行结束时间点相一致;
    若所述目标脚本的执行开始时间点与另一目标脚本的执行结束时间点相一致,确定所述目标脚本的执行顺序位于所述另一目标脚本之后;
    若所述目标脚本的执行开始时间点与任一所述目标脚本的执行结束时间点均不一致,确定所述目标脚本的执行顺序位于最后;
    若所述目标脚本的执行开始时间点与所属生产库的部署时间相一致,确定所述目标脚本的执行顺序位于最前;
    根据所述目标脚本的执行时长对执行顺序相同的多个目标脚本进行排序得到对应的关联执行顺序。
  7. 根据权利要求1所述的关联脚本自动同步方法,其中,所述对多个所述脚本分组所包含的脚本进行分批次并行同步,将与每一所述脚本分组对应的数据信息同步至所述测试服务器之后,还包括:
    对每一所述脚本分组中脚本的同步执行过程进行监控得到脚本监控信息;
    判断所述脚本监控信息是否满足预置的判断条件;
    若所述脚本监控信息满足预置的判断条件,对与所述脚本监控信息的脚本对应的数据库进行解锁。
  8. 根据权利要求7所述的关联脚本自动同步方法,其中,所述判断条件包括时间阈值及目标类型关键字,所述判断所述脚本监控信息是否满足预置的判断条件,包括:
    判断所述脚本监控信息中的脚本执行时长是否超出所述时间阈值;
    若所述脚本执行时长超出所述时间阈值,判断所述脚本监控信息中的脚本类型是否与所述目标类型关键字相匹配;
    若所述脚本类型与所述目标类型关键字相匹配,判定所述脚本监控信息满足所述判断条件。
  9. 一种关联脚本自动同步装置,其中,包括:
    日志获取单元,用于若接收到管理员所输入的脚本同步指令,从所述生产服务器获取脚本发布日志并从所述测试服务器获取脚本同步日志;
    数据表同步脚本生成单元,用于获取所述脚本发布日志中的数据处理脚本并生成对应的数据表同步脚本;
    目标脚本获取单元,用于对同一非数据处理脚本在所述脚本同步日志中的同步时间是否不大于所述脚本发布日志中的发布时间进行判断,获取同步时间不大于发布时间的非数据处理脚本作为目标脚本;
    初始脚本分组获取单元,用于根据预置的分组规则对所述脚本发布日志中所述目标脚本进行关联分组得到多个初始脚本分组;
    脚本分组获取单元,用于将所述数据表同步脚本平均分配至所述多个初始脚本分组以得到所述多个脚本分组;
    脚本分组并行同步单元,用于对多个所述脚本分组进行分批次并行同步,将与每一所述脚本分组对应的数据信息同步至所述测试服务器。
  10. 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现以下步骤:
    若接收到管理员所输入的脚本同步指令,从所述生产服务器获取脚本发布日志并从所述测试服务器获取脚本同步日志;
    获取所述脚本发布日志中的数据处理脚本并生成对应的数据表同步脚本;
    对同一非数据处理脚本在所述脚本同步日志中的同步时间是否不大于所述脚本发布日志中的发布时间进行判断,获取同步时间不大于发布时间的非数据处理脚本作为目标脚本;
    根据预置的分组规则对所述脚本发布日志中所述目标脚本进行关联分组得到多个初始脚本分组;
    将所述数据表同步脚本平均分配至所述多个初始脚本分组以得到所述多个脚本分组;
    对多个所述脚本分组进行分批次并行同步,将与每一所述脚本分组对应的数据信息同步至所述测试服务器。
  11. 根据权利要求10所述的计算机设备,其中,所述获取所述脚本发布日志中的数据处理脚本并生成对应的数据表同步脚本,包括:
    获取所述数据处理脚本中包含的数据表信息;
    根据所述数据表信息生成对应的数据表同步脚本。
  12. 根据权利要求10所述的计算机设备,其中,所述分组规则中包括分组数量,所述根据预置的分组规则对所述脚本发布日志中所述目标脚本进行关联分组得到多个初始脚本分组,包括:
    根据所述脚本发布日志中每一生产库的部署时间及每一所述目标脚本的执行时长获取所 述目标脚本的关联执行顺序;
    根据所述分组数量及所述关联执行顺序对所述目标脚本进行顺序分组得到多个初始脚本分组。
  13. 根据权利要求10所述的计算机设备,其中,所述分组规则中包括数据量阈值,所述根据预置的分组规则对所述脚本发布日志中每一生产库所包含的关联脚本及所述数据表同步脚本进行分组得到多个脚本分组,包括:
    根据所述脚本发布日志中每一生产库的部署时间及每一所述目标脚本的执行时长获取所述目标脚本的关联执行顺序;
    根据所述数据量阈值及所述关联执行顺序对所述目标脚本进行顺序分组得到多个初始脚本分组。
  14. 根据权利要求12所述的计算机设备,其中,所述执行时长包括执行开始时间点及执行结束时间点,所述根据所述脚本发布日志中每一生产库的部署时间及每一所述目标脚本的执行时长获取所述目标脚本的关联执行顺序,包括:
    判断每一所述目标脚本的执行开始时间点是否与所述目标脚本所属生产库的部署时间相一致;
    若所述目标脚本的执行开始时间点与所属生产库的部署时间不一致,判断所述目标脚本的执行开始时间点是否与另一目标脚本的执行结束时间点相一致;
    若所述目标脚本的执行开始时间点与另一目标脚本的执行结束时间点相一致,确定所述目标脚本的执行顺序位于所述另一目标脚本之后;
    若所述目标脚本的执行开始时间点与任一所述目标脚本的执行结束时间点均不一致,确定所述目标脚本的执行顺序位于最后;
    若所述目标脚本的执行开始时间点与所属生产库的部署时间相一致,确定所述目标脚本的执行顺序位于最前;
    根据所述目标脚本的执行时长对执行顺序相同的多个目标脚本进行排序得到对应的关联执行顺序。
  15. 根据权利要求13所述的计算机设备,其中,所述执行时长包括执行开始时间点及执行结束时间点,所述根据所述脚本发布日志中每一生产库的部署时间及每一所述目标脚本的执行时长获取所述目标脚本的关联执行顺序,包括:
    判断每一所述目标脚本的执行开始时间点是否与所述目标脚本所属生产库的部署时间相一致;
    若所述目标脚本的执行开始时间点与所属生产库的部署时间不一致,判断所述目标脚本的执行开始时间点是否与另一目标脚本的执行结束时间点相一致;
    若所述目标脚本的执行开始时间点与另一目标脚本的执行结束时间点相一致,确定所述目标脚本的执行顺序位于所述另一目标脚本之后;
    若所述目标脚本的执行开始时间点与任一所述目标脚本的执行结束时间点均不一致,确定所述目标脚本的执行顺序位于最后;
    若所述目标脚本的执行开始时间点与所属生产库的部署时间相一致,确定所述目标脚本的执行顺序位于最前;
    根据所述目标脚本的执行时长对执行顺序相同的多个目标脚本进行排序得到对应的关联执行顺序。
  16. 根据权利要求10所述的计算机设备,其中,所述对多个所述脚本分组所包含的脚本进行分批次并行同步,将与每一所述脚本分组对应的数据信息同步至所述测试服务器之后,还包括:
    对每一所述脚本分组中脚本的同步执行过程进行监控得到脚本监控信息;
    判断所述脚本监控信息是否满足预置的判断条件;
    若所述脚本监控信息满足预置的判断条件,对与所述脚本监控信息的脚本对应的数据库进行解锁。
  17. 根据权利要求16所述的计算机设备,其中,所述判断条件包括时间阈值及目标类型关键字,所述判断所述脚本监控信息是否满足预置的判断条件,包括:
    判断所述脚本监控信息中的脚本执行时长是否超出所述时间阈值;
    若所述脚本执行时长超出所述时间阈值,判断所述脚本监控信息中的脚本类型是否与所述目标类型关键字相匹配;
    若所述脚本类型与所述目标类型关键字相匹配,判定所述脚本监控信息满足所述判断条件。
  18. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行时使所述处理器执行以下操作:
    若接收到管理员所输入的脚本同步指令,从所述生产服务器获取脚本发布日志并从所述测试服务器获取脚本同步日志;
    获取所述脚本发布日志中的数据处理脚本并生成对应的数据表同步脚本;
    对同一非数据处理脚本在所述脚本同步日志中的同步时间是否不大于所述脚本发布日志中的发布时间进行判断,获取同步时间不大于发布时间的非数据处理脚本作为目标脚本;
    根据预置的分组规则对所述脚本发布日志中所述目标脚本进行关联分组得到多个初始脚本分组;
    将所述数据表同步脚本平均分配至所述多个初始脚本分组以得到所述多个脚本分组;
    对多个所述脚本分组进行分批次并行同步,将与每一所述脚本分组对应的数据信息同步至所述测试服务器。
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述获取所述脚本发布日志中的数据处理脚本并生成对应的数据表同步脚本,包括:
    获取所述数据处理脚本中包含的数据表信息;
    根据所述数据表信息生成对应的数据表同步脚本。
  20. 根据权利要求18所述的关联脚本自动同步方法,其中,所述分组规则中包括分组数量,所述根据预置的分组规则对所述脚本发布日志中所述目标脚本进行关联分组得到多个初 始脚本分组,包括:
    根据所述脚本发布日志中每一生产库的部署时间及每一所述目标脚本的执行时长获取所述目标脚本的关联执行顺序;
    根据所述分组数量及所述关联执行顺序对所述目标脚本进行顺序分组得到多个初始脚本分组。
PCT/CN2021/083757 2020-12-17 2021-03-30 关联脚本自动同步方法、装置、计算机设备及存储介质 WO2022126918A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011495921.1A CN112527904A (zh) 2020-12-17 2020-12-17 关联脚本自动同步方法、装置、计算机设备及存储介质
CN202011495921.1 2020-12-17

Publications (1)

Publication Number Publication Date
WO2022126918A1 true WO2022126918A1 (zh) 2022-06-23

Family

ID=75001030

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/083757 WO2022126918A1 (zh) 2020-12-17 2021-03-30 关联脚本自动同步方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN112527904A (zh)
WO (1) WO2022126918A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115860968A (zh) * 2022-12-14 2023-03-28 中电金信软件(上海)有限公司 记账任务的批量处理方法、装置、电子设备及存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527904A (zh) * 2020-12-17 2021-03-19 平安科技(深圳)有限公司 关联脚本自动同步方法、装置、计算机设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105787077A (zh) * 2016-03-02 2016-07-20 百度在线网络技术(北京)有限公司 数据同步方法和装置
US20180081956A1 (en) * 2013-11-04 2018-03-22 Guangdong Electronics Industry Institute Ltd. Method for automatically synchronizing multi-source heterogeneous data resources
CN107908631A (zh) * 2017-07-25 2018-04-13 平安科技(深圳)有限公司 数据处理方法、装置、存储介质和计算机设备
CN111367883A (zh) * 2020-02-25 2020-07-03 平安科技(深圳)有限公司 数据同步方法、装置、设备及计算机可读存储介质
CN111611009A (zh) * 2020-05-26 2020-09-01 深圳壹账通智能科技有限公司 数据库脚本管理方法、装置、计算机设备及存储介质
CN112527904A (zh) * 2020-12-17 2021-03-19 平安科技(深圳)有限公司 关联脚本自动同步方法、装置、计算机设备及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180081956A1 (en) * 2013-11-04 2018-03-22 Guangdong Electronics Industry Institute Ltd. Method for automatically synchronizing multi-source heterogeneous data resources
CN105787077A (zh) * 2016-03-02 2016-07-20 百度在线网络技术(北京)有限公司 数据同步方法和装置
CN107908631A (zh) * 2017-07-25 2018-04-13 平安科技(深圳)有限公司 数据处理方法、装置、存储介质和计算机设备
CN111367883A (zh) * 2020-02-25 2020-07-03 平安科技(深圳)有限公司 数据同步方法、装置、设备及计算机可读存储介质
CN111611009A (zh) * 2020-05-26 2020-09-01 深圳壹账通智能科技有限公司 数据库脚本管理方法、装置、计算机设备及存储介质
CN112527904A (zh) * 2020-12-17 2021-03-19 平安科技(深圳)有限公司 关联脚本自动同步方法、装置、计算机设备及存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115860968A (zh) * 2022-12-14 2023-03-28 中电金信软件(上海)有限公司 记账任务的批量处理方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN112527904A (zh) 2021-03-19

Similar Documents

Publication Publication Date Title
Nathan et al. Blockchain meets database: Design and implementation of a blockchain relational database
US9723097B2 (en) Assigning shared catalogs to cache structures in a cluster computing system
US7373554B2 (en) Techniques for automatic software error diagnostics and correction
US9223617B2 (en) Methods and systems for migrating networked systems across administrative domains
US10325079B1 (en) Version management platform
US7606838B2 (en) Distributed conflict resolution for replicated databases
WO2022126918A1 (zh) 关联脚本自动同步方法、装置、计算机设备及存储介质
JP7125854B2 (ja) 自動化された試験システムの方法及び設計
Shi et al. Evaluating scalability bottlenecks by workload extrapolation
US10949401B2 (en) Data replication in site recovery environment
CN109325016B (zh) 数据迁移方法、装置、介质及电子设备
US11494493B1 (en) Software verification for network-accessible applications
US20200371902A1 (en) Systems and methods for software regression detection
WO2021174817A1 (zh) 数据库自动化审计方法、系统、设备及存储介质
US11706280B2 (en) Methods and system for auditing batch jobs using blockchain
Padalia Apache Cassandra Essentials
WO2023211531A1 (en) Automatic correctness validation of database management systems
US20150347402A1 (en) System and method for enabling a client system to generate file system operations on a file system data set using a virtual namespace
CN107085681B (zh) 鲁棒的计算设备标识框架
US20050286415A1 (en) System and method for lightweight deadlock detection
WO2019236202A1 (en) Array structures
US20230185559A1 (en) Managing a federated software repository across multiple devices
CN107016101B (zh) 数据管理方法、装置及系统
CN116302912A (zh) 用于计算系统的验证测试的总结报告的自动生成
CN112905653A (zh) 数据比对方法、计算设备及计算机存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21904858

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21904858

Country of ref document: EP

Kind code of ref document: A1