CN111078637A - Script file online method and device, computer equipment and storage medium - Google Patents

Script file online method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111078637A
CN111078637A CN201910969150.6A CN201910969150A CN111078637A CN 111078637 A CN111078637 A CN 111078637A CN 201910969150 A CN201910969150 A CN 201910969150A CN 111078637 A CN111078637 A CN 111078637A
Authority
CN
China
Prior art keywords
script
online
directory
package
svn
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
CN201910969150.6A
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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN201910969150.6A priority Critical patent/CN111078637A/en
Publication of CN111078637A publication Critical patent/CN111078637A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems

Abstract

The embodiment of the application provides a script file online method and device, computer equipment and a storage medium. The method comprises the following steps: calling a preset visual interface according to a script setting request to receive an SVN main directory and an online package directory of the version set through the preset visual interface and to-be-online script information, wherein the to-be-online script information comprises a script type and a script name; if a script online request is received, determining a directory where the script is located according to the SVN main directory and the script name; detecting whether a script to be online exists in the directory where the script is located; and if the script to be online exists in the directory where the script is located, calling a processing strategy matched with the script type to upload the script to be online to the online package directory. The script is automatically processed, the script is uniformly and linearly connected through one key, the probability of errors in the script online process is reduced, the script online speed and efficiency are improved, and the script online time cost and labor cost are saved.

Description

Script file online method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a script file online method, an apparatus, a computer device, and a storage medium.
Background
The scripts developed by the large data platform basically comprise several types of scripts such as sh, sql, hql and the like. When a developed product needs to be updated, scripts for updating the product generally need to be deployed to a server corresponding to a production environment in a unified manner. Due to the need for uniform deployment, updated scripts need to be brought online into the same directory. At present, each developer manually uploads a script to be online to a directory of an instruction. The manual online script reduces the online speed of the script and is easy to generate errors, such as online script to an error directory; while scripts are easily missed. In addition, the scheduling configuration parameters of the update script are also manually filled, and various errors are very likely to occur in the manual filling process of each developer.
Disclosure of Invention
The embodiment of the application provides a script file online method and device, a computer device and a storage medium, which can improve the online efficiency of scripts and reduce the error rate.
In a first aspect, an embodiment of the present application provides a script file online method, including:
if a script setting request is received, calling a preset visual interface according to the script setting request to receive an SVN main directory and an online package directory of the version set through the preset visual interface, and to-be-online script information, wherein the to-be-online script information comprises a script type and a script name; if a script online request is received, determining a directory where the script is located according to the SVN main directory and the script name; detecting whether the script to be online exists in the directory where the script is located according to the script name; if the script to be online exists in the catalog where the script is located, calling a processing strategy matched with the script type to upload the script to be online to the online package catalog.
In a second aspect, an embodiment of the present invention provides a script file uploading apparatus, where the script file uploading apparatus includes a unit configured to execute the method according to the first aspect.
In a third aspect, an embodiment of the present invention provides a computer device, where the computer device includes a memory and a processor connected to the memory;
the memory is adapted to store a computer program and the processor is adapted to execute the computer program stored in the memory to perform the method of the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the method according to the first aspect.
According to the embodiment of the application, the SVN main directory of the script online, the coil directory of the version and the script information to be online can be set through the preset visual interface, the processing strategy matched with the script type is called to upload the script to the coil directory of the version uniformly by one key, so that the script is automatically processed, the script is online uniformly by one key, the probability of error in the process of online of the script is reduced, the online speed and efficiency of the script are improved, and the online time cost and labor cost of the script are saved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart illustrating an online method for a script file according to an embodiment of the present disclosure;
FIG. 2 is a sub-flow diagram illustrating an online method for a script file according to an embodiment of the present disclosure;
FIG. 3 is a sub-flow diagram illustrating an online method for a script file according to an embodiment of the present disclosure;
FIG. 4 is a schematic block diagram of an online device for script files provided by an embodiment of the present application;
fig. 5 is a schematic block diagram of a directory determination unit in a script file online device provided by an embodiment of the present application;
FIG. 6 is a schematic block diagram of an online unit in an online device for script files provided by an embodiment of the present application;
fig. 7 is a schematic block diagram of a computer device provided by an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a flowchart illustrating an online method for a script file according to an embodiment of the present application. As shown in fig. 1, the method includes S101-S105.
S101, if a script setting request is received, calling a preset visual interface according to the script setting request to receive an SVN (version control system) main directory and a version online package directory set through the preset visual interface, and script information to be online, wherein the script information to be online comprises a script type and a script name.
The script setting request can be triggered by various ways, such as receiving a voice message related to script setting input by a user to trigger the script setting request; if a user touches or clicks a certain script to trigger a related button set by the script corresponding to the script or an image triggers a script setting request, if the user right-clicks a certain script, the button set by the script is clicked in a popped option to trigger the script setting request; if the preset tool is directly found, the received instruction for opening the preset visual interface corresponding to the preset tool is the received script setting request. In this embodiment, it can be understood that the script file online method of the present application is encapsulated in a preset tool, and the preset tool provides a visual interface for relevant personnel to set relevant information of online script, and presses an online script according to the set relevant information of online script. Therefore, the preset visual interface can be opened by opening the preset tool.
If a script setting request is received, calling a preset visual interface to set an SVN (version control system) main directory, an online package directory of the current version and script information to be online through the preset visual interface, and receiving the set SVN main directory, the online package directory of the current version and the script information to be online. The script information to be online includes script type, script name, developer information (by which developer the script is developed), and the like. The script type includes a new table, a new job (new scheduling document), an updated table, and the like. The newly added operation comprises newly added scheduling configuration parameter information and the like for the script which is on line at this time. It should be noted that the scheduling configuration parameters in the newly added job are not directly displayed in the form of parameters, but displayed in the form of SQL statements according to the development requirements. The script name comprises a folder identifier, and the specific folder to which the script belongs can be determined according to the folder identifier. The script name also includes the suffix name of the script, which includes.sh,. sql,. hql, etc. Setting an SVN main directory, a present version online package directory and script information to be online, wherein the script information to be online can be input in a form of direct manual input, for example, the SVN directory is directly input, and the input SVN directory is used as the SVN main directory; the corresponding information can also be directly generated according to the selection of the user, such as that the SVN directory selected by the user is used as the SVN main directory, the script file selected by the user on the local computer is used as the script to be online, and the like. If the set up package directory of the current version is D:// program/online document/code, the set up script name of a script to be online is DWD _ CUST _ CDM _ DATA.hql (for example, DWD in the name belongs to folder identification,. hql is suffix name), and the set up SVN main directory is D: \ big data \ design document \ subject field design \ new task, etc. In addition, it should be noted that the script to be online may include one script, or may include multiple scripts. Typically, the script to be brought online includes a plurality of scripts.
According to the online script uploading method and device, a plurality of scripts to be uploaded can be directly uploaded through the preset visual interface, one script of a developer is prevented from being uploaded, the online speed of the scripts is improved, meanwhile, the scripts of the version are prevented from being missed, and the error cost is reduced.
And S102, determining the directory where the script is located according to the SVN main directory and the script name if a script online request is received.
The script online request can be triggered in various ways, for example, by clicking or triggering a relevant button on an interface corresponding to a preset visual interface, such as a button for "one-key online" and the like; such as triggering a script online request by receiving the relevant voice information of the user's script online.
And if a script online request is received, determining the directory of the script according to the SVN main directory and the script name.
In one embodiment, as shown in FIG. 2, step S102 includes the following steps S1021-S1023.
And S1021, acquiring the folder identification in the script name.
It should be noted that the script name is named according to a certain rule, for example, a plurality of identifiers in the script name are separated by underlines, and a first identifier is set as a folder identifier, so that the first identifier in the script name is obtained, that is, the identifier before the first underline is obtained. The script under which specific folder the script belongs can be determined according to the folder identifier in the script name.
And S1022, determining the specific folder corresponding to the folder identifier according to the mapping relationship between the folder identifier and the specific folder.
The mapping relation between the folder identifier and the specific folder is stored in the database/configuration file, if the folder identifier is DWD, the specific folder is hduiser 0102, and it indicates that the script file beginning with DWD is always placed under the folder of hduiser 0102. Thus, the corresponding folder identifier is searched in the database/configuration file, and the specific folder having the mapping relation with the folder identifier is used as the specific folder corresponding to the folder identifier.
And S1023, forming a path by the SVN main directory and the specific folder, and taking the path as a directory where the script is located.
The SVN master catalog may be understood as a catalog of items corresponding to a product, and it is understood that a plurality of folders are included under the items corresponding to the product. Forming a path by the SVN main directory and the specific folder, wherein the path comprises the following steps: after adding a specific folder to the SVN main directory, a path is formed. For example, a SVN main directory is D: \ big data \ design document \ subject field design \ new task, and the specific folder is hduiser 0102. The path formed is as follows: d \ big data \ design document \ subject field design \ new task \ hduiser 0102. And taking the formed path as a directory where the script is located.
If a plurality of scripts to be online are available, the folder identifications in the script names of the scripts to be online are obtained, specific folders corresponding to the folder identifications are determined, and a plurality of paths are formed according to the SVN main directory and the specific folders. The specific folders corresponding to the folder identifiers may be the same, that is, the same specific folder (multiple scripts to be uploaded are multiple scripts under the same specific folder), or may be different, that is, the multiple specific folders (multiple scripts to be uploaded are scripts under the multiple folders). The multiple paths may be the same or different.
S103, detecting whether the script to be on-line exists in the directory where the script is located according to the script name.
The directory where the script is located is composed of the SVN directory and the folder identifier in the script name, and the script name further includes other contents, such as a suffix name and the like. Meanwhile, the set SVN directory and script name may be directly input, so that it is required to detect whether the to-be-online script exists in the directory where the script is located. Specifically, whether the script to be on-line exists or not can be detected under the directory where the script is located according to the name of the script.
If the script to be online exists in the directory where the script is located, executing step S104; and if the to-be-online script does not exist in the directory where the script is located, executing step S105.
And S104, calling a processing strategy matched with the script type to upload the script to be uploaded to the online package catalogue.
The script types are different, and the script to be online is uploaded to the online package catalog of the version corresponding to different processing strategies.
In one embodiment, as shown in FIG. 3, step S104 includes the following steps S1041-S1046.
And S1041, judging whether the script type of the script to be online is newly added operation.
And S1042, if the script type of the script to be online is newly added, reading the script content of the script to be online.
And opening a script to be online, the script type of which is newly added operation, and reading the script content.
S1043, analyzing the script content to generate a scheduling configuration file.
The newly added operation script content comprises SQL sentences, and the script content is analyzed to generate a scheduling configuration file, which comprises the following steps: analyzing the SQL statement to obtain scheduling parameter value information in the SQL statement; and correspondingly matching the scheduling parameter value information and the information of the script to be on-line with a preset scheduling parameter, and writing the information into a file with a preset format to generate a scheduling configuration file.
For example, a to-be-brought script is named DWD _ CUST _ CDM _ DATA. The SQL statement exists in the script to be online: select a.sid, a.name, a.sage, a.ssex from a as B where a.sage >18and GETDATE (), 2019050112:00: 00. Acquiring a word from, analyzing the word into a table name, and referring the table name to be a dependent task, wherein the dependent task is understood as a task in the script to be on-line only if A exists; acquiring a word after the first as from, analyzing the word into a table name, and taking the table name as a target table name; obtaining the conditional statement after where, and analyzing the conditional statement to obtain the task start time and other limiting conditions; and acquiring the file name of the script to be online, and taking the file name as a task name and the like. Thus, a plurality of scheduling parameter values are obtained, and the scheduling parameter value information is correspondingly matched with the preset scheduling parameters. If the analyzed scheduling parameter value is matched with the preset scheduling parameter, the method comprises the following steps:
Figure BDA0002231507470000061
it should be noted that the SQL statement described above is only an example. In a real case, the SQL statement comprises more contents, and more scheduling parameter value information can be resolved. And the system also can comprise scheduling parameter information such as task types, task periods, task priorities, task description modules, mandatory pre-tasks, mandatory post-tasks, task energy consumption, task repetition times, databases related to tasks, synchronization modes, developers, development recheckers and the like. It can be easily understood that the script type is information such as what time and what conditions are satisfied in the to-be-online script of the newly added job to execute the to-be-online script related to the current version, how to execute the to-be-online script related to the current version, and how to process the to-be-online script after execution (which database to store the to-be-online script), and the like.
Analyzing the scheduling parameter values, correspondingly matching the scheduling parameter values with the preset scheduling parameters, and writing the correspondingly matched preset scheduling parameters and scheduling parameter values into a file with a preset format. The preset formats such as txt format, xls and the like are used for writing the corresponding matched preset scheduling parameters and scheduling parameter values into a txt file and an excel file to generate a scheduling configuration file. The script is analyzed, the corresponding matched preset scheduling parameters and scheduling parameter values are written into the file with the preset format, the system can acquire the corresponding preset scheduling parameters and scheduling parameter value information more quickly and conveniently, the file with the preset format can read data more quickly and conveniently, and after the data is analyzed, the data does not need to be analyzed again when a task is executed, so that the task execution speed is increased, and the system operation speed is increased. Compared with the method that the scheduling parameters and the scheduling parameter values are manually filled according to the script to be on-line, the method and the device for automatically analyzing the scheduling parameter values and automatically matching the scheduling parameter values with the preset parameters improve analyzing and matching speed, increase accuracy, avoid omission and error and reduce error cost.
And S1044, uploading the scheduling configuration file to the online package directory.
The line packet directory on the version is a different directory existing on the same physical machine with the SVN main directory. In other embodiments, the online package directory may also be a different directory that is a different physical machine than the SVN master directory.
And S1045, if the script type of the script to be online is not newly added, copying the script to be online.
Copying is copying, and the type of the copy script is the script to be online of the non-newly-added operation.
And S1046, uploading the copied script to be uploaded to the online package directory.
In this embodiment, the scripts to be online are processed differently according to the different script types, for example, the scripts to be online of the newly added job are analyzed to generate a scheduling configuration file, the scheduling configuration file is uploaded to the package directory of the current version, and the scripts to be online of the non-newly added job are copied and uploaded to the package directory.
And S105, presenting.
According to the embodiment of the application, the SVN main catalog of the script online, the coil catalog of the version and the script information to be online can be set through the preset visual interface, the processing strategy matched with the script type is called to upload the script to be online to the coil catalog of the version uniformly by one key according to the script type of the script information to be online, so that the script is automatically processed, the script is online uniformly by one key, the probability of errors in the process of online of the script is reduced, the online speed and efficiency of the script are improved, and the online time cost and labor cost of the script are saved.
In an embodiment, as shown in fig. 1, after receiving a script online request, the method further includes:
s102a, it is detected whether the set SVN master directory exists.
If the set SVN master directory is D: \ big data \ design document \ theme domain design \ new task, and the directory is substantially absent on the local physical machine D disk, then it means that the set SNV master directory is absent. If the set SVN master directory does not exist, executing step S105; if the set SVN master directory exists, step S102 is performed.
In an embodiment, as shown in fig. 1, after receiving a script online request, the method further includes:
s102b, detecting whether the set package list exists.
If the set online package directory is D: \ USER \ list and the directory is not retrieved on the local physical machine, it means that the set online package directory does not exist. If the set package online catalog does not exist, executing step S102 c; if the set package online directory exists, step S102 is executed.
And S102c, creating the online package catalogue.
And creating a folder corresponding to the upper package directory. Firstly, whether a drive letter exists is detected, if the drive letter does not exist, prompting is carried out, if the drive letter exists, whether each folder behind the drive letter exists is sequentially detected, if the drive letter does not exist, the folders are created and named, and if the folder exists, whether the next folder exists is judged.
In one embodiment, it is first detected whether the set SVN main directory exists, if the set SVN main directory exists, then it is detected whether the set package directory exists, if the set package directory does not exist, step S102b is executed; if the set package online directory exists, step S102 is executed. Therefore, whether the set SVN main directory exists or not is detected firstly, so that errors are avoided, and resources and time are wasted.
In an embodiment, as shown in fig. 1, after step S104, the method further includes:
s104a, obtaining the current system time, and adding the online record of the version in the database.
The online record of the current version includes online time (acquired current system time), information of all script files online this time, SVN master directory, and a package directory of the current version. It is equivalent to record the information of the online in the database.
In an embodiment, as shown in fig. 1, after step S104, the method further includes:
and S104b, issuing all scripts in the online package directory.
And acquiring the information of the server, and issuing all scripts in the online package directory to the server. It can be appreciated that the script files that are brought online into the upper package directory are not submitted to the server and the uploaded script files are not made to provide services. And issuing all scripts in the online package directory to submit script files in the online package directory to the server and provide services.
Fig. 4 is a schematic block diagram of an online device of a script file provided by an embodiment of the present application. The device comprises a unit corresponding to the script file online method described in the above fig. 1. As shown in fig. 4, the script file online device 100 includes a setting unit 101, a directory determining unit 102, a script detecting unit 103, an online unit 104, and a prompting unit 105.
The setting unit 101 is configured to, if a script setting request is received, call a preset visual interface according to the script setting request to receive an SVN main directory and a present version online package directory set through the preset visual interface, and to-be-online script information, where the to-be-online script information includes a script type and a script name.
And the directory determining unit 102 is configured to determine, if a script online request is received, a directory where the script is located according to the SVN main directory and the script name.
In one embodiment, as shown in fig. 5, the directory determining unit 102 includes an identification obtaining unit 1021, a mapping unit 1022, and a combining unit 1023. The identifier obtaining unit 1021 is configured to obtain a folder identifier in the script name. The mapping unit 1022 is configured to determine, according to a mapping relationship between the folder identifier and the specific folder, the specific folder corresponding to the folder identifier. And the combining unit 1023 is used for combining the SVN main directory and the specific folder into a path, and taking the path as a directory where the script is located.
And the script detection unit 103 is configured to detect whether the script to be online exists in the directory where the script is located according to the script name.
And the online unit 104 is configured to call a processing strategy matched with the script type to upload the script to be online to the online package directory if the script to be online exists in the directory where the script is located.
And the prompting unit 105 is configured to prompt if the script to be online does not exist in the directory where the script is located.
In an embodiment, as shown in fig. 6, the online unit 104 includes a script type determining unit 1041, a content reading unit 1042, an analyzing unit 1043, a file uploading unit 1044, and a copying unit 1045. The script type determining unit 1041 is configured to determine whether the script type of the script to be online is a new job. A content reading unit 1042, configured to read the script content of the script to be online if the script type of the script to be online is a new job. An analyzing unit 1043, configured to analyze the script content to generate a scheduling configuration file. A file uploading unit 1044, configured to upload the scheduling configuration file to the online package directory. And a copying unit 1045, configured to copy the script to be online if the script type of the script to be online is a non-new job. The file uploading unit 1044 is further configured to upload the copied to-be-online script to the online package directory.
In an embodiment, the parsing unit 1043 includes a parameter value parsing unit and a matching writing unit. And the parameter value analyzing unit is used for analyzing the SQL statement to obtain scheduling parameter value information in the SQL statement. And the matching writing unit is used for correspondingly matching the scheduling parameter value information and the information of the script to be on-line with a preset scheduling parameter and writing the information into a file with a preset format so as to generate a scheduling configuration file.
In one embodiment, as shown in fig. 1, the online device 100 for script files further includes an SVN directory detection unit 102 a. The SVN directory detecting unit 102a is configured to detect whether the set SVN main directory exists. If the set SVN master directory exists, triggering the directory determination unit 102; if the set SVN master directory does not exist, the presentation unit 105 is triggered.
In an embodiment, as shown in fig. 1, the online device 100 of the script file further includes an online package directory detecting unit 102b and a creating unit 102 c. The online package directory detecting unit 102b is configured to detect whether the set online package directory exists. If the set online package directory does not exist, triggering a creating unit 102c to create the online package directory; if the set online package directory exists, the directory determining unit 102 is triggered.
In an embodiment, as shown in fig. 1, the online device 100 for script files further includes an SVN directory detecting unit 102a, an online package directory detecting unit 102b, and a creating unit 102 c. The SVN directory detecting unit 102a is configured to detect whether the set SVN main directory exists. If the set SVN master directory exists, triggering an online package directory detecting unit 102b for detecting whether the set online package directory exists; if the set SVN master directory does not exist, the presentation unit 105 is triggered. If the set online package directory does not exist, triggering a creating unit 102c to create the online package directory; if the set online package directory exists, the directory determining unit 102 is triggered.
In an embodiment, as shown in fig. 1, the online device 100 for script files further includes an acquiring and adding unit 104 a. The acquiring and adding unit 104a is configured to acquire a current system time and add an online record of the current version to the database.
In one embodiment, as shown in fig. 1, the online device 100 for script files further includes a publishing unit 104 b. The publishing unit 104b is configured to publish all scripts in the online package directory.
It should be noted that, as will be clear to those skilled in the art, specific implementation processes of the above apparatus and each unit may refer to corresponding descriptions in the foregoing method embodiments, and for convenience and brevity of description, no further description is provided herein.
The above-described apparatus may be implemented in the form of a computer program which is executable on a computer device as shown in fig. 7.
Fig. 7 is a schematic block diagram of a computer device according to an embodiment of the present application. The device is a terminal or the like, such as a desktop computer, a mobile phone, a PAD, etc. used by a developer. The device 100 includes a processor 102, memory, and a network interface 103 connected by a system bus 101, where the memory may include a non-volatile storage medium 104 and an internal memory 105.
The non-volatile storage medium 104 may store an operating system 1041 and computer programs 1042. The computer program 1042 stored in the nonvolatile storage medium can implement the script file online method described in the above terminal when executed by the processor 102. The processor 102 is used to provide computing and control capabilities that support the operation of the overall device 100. The internal memory 105 provides an environment for running a computer program in the non-volatile storage medium, and when the computer program is executed by the processor 102, the processor 102 may be enabled to execute the script file online method described in the terminal. The network interface 103 is used for network communication. It will be appreciated by those skilled in the art that the configurations shown in the figures are block diagrams of only some of the configurations relevant to the present application, and do not constitute a limitation on the devices to which the present application may be applied, and that a particular device may include more or less components than those shown in the figures, or may combine certain components, or have a different arrangement of components.
Wherein the processor 102 is configured to run a computer program stored in a memory to implement any of the embodiments of the above-described script file online method.
It should be understood that, in the embodiment of the present application, the Processor 102 may be a Central Processing Unit (CPU), and the Processor may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be understood by those skilled in the art that all or part of the flow of the method implementing the above embodiments may be implemented by a computer program instructing associated hardware. The computer program may be stored in a storage medium, which may be a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present application also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program which, when executed by a processor, implements any of the embodiments of the above-described script file uploading method.
The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, which can store various computer readable storage media.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, device and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and the division of the unit is only one logical function division, and other division manners may be available in actual implementation. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A script file online method, the method comprising:
if a script setting request is received, calling a preset visual interface according to the script setting request to receive an SVN (version control system) main directory and an online package directory of the version set through the preset visual interface, and script information to be online, wherein the script information to be online comprises a script type and a script name;
if a script online request is received, determining a directory where the script is located according to the SVN main directory and the script name;
detecting whether the script to be online exists in the directory where the script is located according to the script name;
if the script to be online exists in the catalog where the script is located, calling a processing strategy matched with the script type to upload the script to be online to the online package catalog.
2. The method according to claim 1, wherein the invoking of the processing policy matched with the script type uploads the to-be-online script to the online package directory includes:
judging whether the script type of the script to be online is a newly added operation;
if the script type of the script to be online is newly added, reading the script content of the script to be online;
analyzing the script content to generate a scheduling configuration file;
uploading the scheduling configuration file to the uploading package directory;
if the script type of the script to be online is not newly added, copying the script to be online;
and uploading the copied script to be uploaded to the online package directory.
3. The method of claim 2, wherein the script content comprises SQL statements, and wherein parsing the script content to generate the scheduling configuration file comprises:
analyzing the SQL statement to obtain scheduling parameter value information in the SQL statement;
and correspondingly matching the scheduling parameter value information and the information of the script to be on-line with a preset scheduling parameter, and writing the information into a file with a preset format to generate a scheduling configuration file.
4. The method of claim 1, wherein determining the directory of the script according to the SVN master directory and the script name comprises:
acquiring a folder identifier in the script name;
determining a specific folder corresponding to a folder identifier according to the mapping relation between the folder identifier and the specific folder;
and forming a path by the SVN main directory and the specific folder, and taking the path as a directory where the script is located.
5. The method according to claim 1, wherein before the calling the processing policy matched with the script type uploads the to-be-online script to the online package directory, the method further comprises:
detecting whether the set online package directory exists or not;
and if the set online package catalogue does not exist, establishing the online package catalogue.
6. The method according to claim 1, wherein after the calling the processing policy matching the script type uploads the to-be-online script into the online package directory, the method further comprises:
and acquiring the current system time, and adding the version online record in the database.
7. The method of claim 1, further comprising:
and issuing all scripts in the online package directory.
8. A script file uploading apparatus, comprising:
the device comprises a setting unit, a display unit and a display unit, wherein the setting unit is used for calling a preset visual interface according to a script setting request if the script setting request is received so as to receive an SVN main directory and an online package directory of a version and to-be-online script information which are set through the preset visual interface, wherein the to-be-online script information comprises a script type and a script name;
the directory determining unit is used for determining a directory where the script is located according to the SVN main directory and the script name if a script online request is received;
the detection unit is used for detecting whether the script to be on-line exists in the directory where the script is located according to the script name;
and the online unit is used for calling a processing strategy matched with the script type to upload the script to be online to the online package directory if the script to be online exists in the directory where the script is located.
9. A computer device, comprising a memory, and a processor coupled to the memory;
the memory is used for storing a computer program; the processor is configured to execute a computer program stored in the memory to perform the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method according to any one of claims 1-7.
CN201910969150.6A 2019-10-12 2019-10-12 Script file online method and device, computer equipment and storage medium Pending CN111078637A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910969150.6A CN111078637A (en) 2019-10-12 2019-10-12 Script file online method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910969150.6A CN111078637A (en) 2019-10-12 2019-10-12 Script file online method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111078637A true CN111078637A (en) 2020-04-28

Family

ID=70310285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910969150.6A Pending CN111078637A (en) 2019-10-12 2019-10-12 Script file online method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111078637A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111898345A (en) * 2020-07-24 2020-11-06 北京车和家信息技术有限公司 Data processing method and device based on detailed design document
CN113157581A (en) * 2021-04-27 2021-07-23 网易(杭州)网络有限公司 Method and device for automatically triggering service, electronic equipment and storage medium
CN113778478A (en) * 2020-11-09 2021-12-10 北京沃东天骏信息技术有限公司 Method, device and storage medium for generating prompt message
CN117149734A (en) * 2023-10-30 2023-12-01 常州楠菲微电子有限公司 SVN-based file management method and device, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902558A (en) * 2012-09-11 2013-01-30 新浪网技术(中国)有限公司 Project script file updating system and method as well as script file merging method and device
CN107193619A (en) * 2017-07-28 2017-09-22 郑州云海信息技术有限公司 The method and apparatus that a kind of compiled version is automatically updated
CN109376166A (en) * 2018-08-20 2019-02-22 中国平安财产保险股份有限公司 Script conversion method, device, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902558A (en) * 2012-09-11 2013-01-30 新浪网技术(中国)有限公司 Project script file updating system and method as well as script file merging method and device
CN107193619A (en) * 2017-07-28 2017-09-22 郑州云海信息技术有限公司 The method and apparatus that a kind of compiled version is automatically updated
CN109376166A (en) * 2018-08-20 2019-02-22 中国平安财产保险股份有限公司 Script conversion method, device, computer equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111898345A (en) * 2020-07-24 2020-11-06 北京车和家信息技术有限公司 Data processing method and device based on detailed design document
CN113778478A (en) * 2020-11-09 2021-12-10 北京沃东天骏信息技术有限公司 Method, device and storage medium for generating prompt message
CN113157581A (en) * 2021-04-27 2021-07-23 网易(杭州)网络有限公司 Method and device for automatically triggering service, electronic equipment and storage medium
CN117149734A (en) * 2023-10-30 2023-12-01 常州楠菲微电子有限公司 SVN-based file management method and device, storage medium and electronic equipment
CN117149734B (en) * 2023-10-30 2024-02-02 常州楠菲微电子有限公司 SVN-based file management method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN111078637A (en) Script file online method and device, computer equipment and storage medium
US11314698B2 (en) Dynamically performing data processing in a data pipeline system
US11269660B2 (en) Methods and systems for integrated development environment editor support with a single code base
US9342273B1 (en) Automatic communications graphing for a source application
US9367305B1 (en) Automatic container definition
CA2852760C (en) Migration assessment for cloud computing platforms
CN109918055B (en) Application program generation method and device
US20060020937A1 (en) System and method for extraction and creation of application meta-information within a software application repository
WO2016177341A1 (en) Interface calling method and device, and terminal
US9483384B2 (en) Generation of software test code
CN108255708B (en) Method, device, storage medium and equipment for accessing production file in test environment
US8839126B1 (en) Secure HTML components for building client-side user interface
US9542173B2 (en) Dependency handling for software extensions
CN117693734A (en) Front-end item processing method, device, equipment, management system and storage medium
CN112685105A (en) Front-end component sharing method and device, computer equipment and storage medium
WO2019161620A1 (en) Application dependency update method, terminal and device, and storage medium
CN111428132A (en) Data verification method and device, computer storage medium and electronic equipment
CN111045717B (en) Method, device, computer equipment and storage medium for acquiring project dependent package
US20160055074A1 (en) Program analysis device, program analysis method, and program analysis program
US11392622B2 (en) Cloud service categorization
US10514940B2 (en) Virtual application package reconstruction
CN112527459A (en) Log analysis method and device based on Kubernetes cluster
CN111813385A (en) Web application-based page plug-in method, device and equipment
US10284628B2 (en) Distribution method and resource acquisition method
US20210382764A1 (en) Comparisons of application programming interface interactions to determine compatibilities

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