CN113190240A - Version release method and device based on multi-environment deployment and computer equipment - Google Patents

Version release method and device based on multi-environment deployment and computer equipment Download PDF

Info

Publication number
CN113190240A
CN113190240A CN202110587189.9A CN202110587189A CN113190240A CN 113190240 A CN113190240 A CN 113190240A CN 202110587189 A CN202110587189 A CN 202110587189A CN 113190240 A CN113190240 A CN 113190240A
Authority
CN
China
Prior art keywords
data
verification
version
environment
file
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
CN202110587189.9A
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.)
Shenzhen Pingan Zhihui Enterprise Information Management Co ltd
Original Assignee
Shenzhen Pingan Zhihui Enterprise Information Management Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Pingan Zhihui Enterprise Information Management Co ltd filed Critical Shenzhen Pingan Zhihui Enterprise Information Management Co ltd
Priority to CN202110587189.9A priority Critical patent/CN113190240A/en
Publication of CN113190240A publication Critical patent/CN113190240A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The embodiment of the application belongs to the field of rack operation and maintenance, and relates to a version release method, a version release device, computer equipment and a storage medium based on multi-environment deployment, wherein the method comprises the steps of acquiring a data verification instruction comprising a source environment identifier and a target environment identifier, wherein the data verification instruction is triggered when a version is deployed in a cross-environment manner; acquiring a data import template matched with the target environment identifier; importing the version data in the source environment into a data import template to obtain a template file to be verified; acquiring a data verification configuration file according to the source environment identifier and the target environment identifier; performing data verification on the template file to be verified from a data verification dimension preset in the data verification configuration file; and when the verification is passed, importing the version data in the template file to be verified into the target environment corresponding to the target environment identifier so as to finish the cross-environment version release. In addition, the application also relates to a block chain technology, and version data can be stored in the block chain. The method and the device improve the accuracy of the multi-environment deployment version.

Description

Version release method and device based on multi-environment deployment and computer equipment
Technical Field
The present application relates to the field of rack operation and maintenance technologies, and in particular, to a version release method and apparatus based on multi-environment deployment, a computer device, and a storage medium.
Background
In the field of computers, platforms or projects are often released in gray scale during version updating or testing, and gray scale release is a release mode for realizing smooth transition between two versions. The gray scale distribution may need to distribute the system to multiple environments, and in multi-environment deployment, initialization of data and data migration need to be achieved.
When data initialization and data migration based on multi-environment deployment are performed, data in a source environment is generally directly imported into a target environment so as to achieve initialization, and even initialization is performed manually. However, due to differences between different environments, data in a source environment may not be completely adapted to a target environment, and errors are easily generated in a data importing process, so that the accuracy is low when a version is deployed in multiple environments.
Disclosure of Invention
An embodiment of the application aims to provide a version release method and device based on multi-environment deployment, computer equipment and a storage medium, so as to solve the problem of low accuracy when the multi-environment deployment version is deployed.
In order to solve the above technical problem, an embodiment of the present application provides a version release method for multi-environment deployment, which adopts the following technical solutions:
acquiring a data verification instruction comprising a source environment identifier and a target environment identifier, wherein the data verification instruction is triggered when a version is deployed across environments;
acquiring a data import template matched with the target environment identifier;
importing the version data in the source environment corresponding to the source environment identifier into the data import template to obtain a template file to be verified;
acquiring a data verification configuration file according to the source environment identifier and the target environment identifier;
performing data verification on the template file to be verified from a preset data verification dimension in the data verification configuration file to obtain a verification result;
and when the verification is determined to pass according to the verification result, importing the version data in the template file to be verified into the target environment corresponding to the target environment identifier so as to complete cross-environment version release.
In order to solve the above technical problem, an embodiment of the present application further provides a version release device deployed in multiple environments, which employs the following technical solutions:
the instruction acquisition module is used for acquiring a data verification instruction comprising a source environment identifier and a target environment identifier, and the data verification instruction is triggered when a version is deployed across environments;
the template acquisition module is used for acquiring a data import template matched with the target environment identifier;
the data import module is used for importing the version data in the source environment corresponding to the source environment identifier into the data import template to obtain a template file to be verified;
the file acquisition module is used for acquiring a data verification configuration file according to the source environment identifier and the target environment identifier;
the file verification module is used for performing data verification on the template file to be verified from a preset data verification dimension in the data verification configuration file to obtain a verification result;
and the version release module is used for importing the version data in the template file to be verified into the target environment corresponding to the target environment identifier when the verification is determined to be passed according to the verification result so as to complete the cross-environment version release.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, which adopts the following technical solutions:
acquiring a data verification instruction comprising a source environment identifier and a target environment identifier, wherein the data verification instruction is triggered when a version is deployed across environments;
acquiring a data import template matched with the target environment identifier;
importing the version data in the source environment corresponding to the source environment identifier into the data import template to obtain a template file to be verified;
acquiring a data verification configuration file according to the source environment identifier and the target environment identifier;
performing data verification on the template file to be verified from a preset data verification dimension in the data verification configuration file to obtain a verification result;
and when the verification is determined to pass according to the verification result, importing the version data in the template file to be verified into the target environment corresponding to the target environment identifier so as to complete cross-environment version release.
In order to solve the above technical problem, an embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solutions:
acquiring a data verification instruction comprising a source environment identifier and a target environment identifier, wherein the data verification instruction is triggered when a version is deployed across environments;
acquiring a data import template matched with the target environment identifier;
importing the version data in the source environment corresponding to the source environment identifier into the data import template to obtain a template file to be verified;
acquiring a data verification configuration file according to the source environment identifier and the target environment identifier;
performing data verification on the template file to be verified from a preset data verification dimension in the data verification configuration file to obtain a verification result;
and when the verification is determined to pass according to the verification result, importing the version data in the template file to be verified into the target environment corresponding to the target environment identifier so as to complete cross-environment version release.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects: acquiring a data import template after triggering a data verification instruction when the version is deployed in a cross-environment manner; importing the version data of the source environment into a data import template to obtain a template file to be verified; acquiring a data verification configuration file according to a data source environment identifier and a target environment identifier in a data verification instruction, wherein the data verification configuration file is configured in advance and matched with the directional import of the version data, a data verification dimension is defined according to the data verification configuration file, the data verification can be carried out on the template file to be verified in an all-around manner, and whether the version data in a source environment can make an error or not is checked when the version is deployed in a cross-environment manner; when the verification is passed, the version data is proved to be correct, and the version data can be imported into the target environment, so that cross-environment version release is realized, and the accuracy of the multi-environment deployment version is improved.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a version publishing method based on multi-environment deployment in accordance with the present application;
FIG. 3 is a schematic block diagram illustrating one embodiment of a version issuing device based on multi-environment deployment according to the present application;
FIG. 4 is a schematic block diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that the version issuing method based on multi-environment deployment provided in the embodiment of the present application is generally executed by a server, and accordingly, the version issuing device based on multi-environment deployment is generally disposed in the server.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow diagram of one embodiment of a version publishing method based on multi-environment deployment is shown, in accordance with the present application. The version release method based on multi-environment deployment comprises the following steps:
step S201, a data verification instruction including a source environment identifier and a target environment identifier is obtained, where the data verification instruction is triggered when a version is deployed across environments.
In this embodiment, an electronic device (for example, a server shown in fig. 1) on which the version release method based on multi-environment deployment operates may communicate with a terminal through a wired connection manner or a wireless connection manner. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
The source environment identifier may be an identifier of a source environment, and the source environment may be an environment in which software version deployment has been completed; the target environment identification may be an identification of a target environment, which may be an environment in which deployment of the software version has not been completed. The data in the source environment is version data, and the data verification instruction can be an instruction for indicating the server to verify the version data when the version is deployed in a cross-environment mode.
Specifically, a user can perform cross-environment version deployment through a terminal, select a source environment and a target environment, the terminal generates a data verification instruction according to a source environment identifier of the source environment and a target environment identifier of the target environment, and the data verification instruction is used for indicating a server to verify version data in the source environment before the version deployment so as to reduce version deployment errors caused by the version data errors or errors when a new version operates in the target environment.
Step S202, acquiring a data import template matched with the target environment identifier.
The data import template is used for recording version data and can realize data transfer between different environments; in one embodiment, the data import template may be a form file, such as an Excel form.
Specifically, a plurality of data import templates may be preset, each corresponding to one environment. And the server extracts the target environment identifier from the data verification instruction so as to obtain a data import template matched with the target environment identifier.
And step S203, importing the version data in the source environment corresponding to the source environment identifier into a data import template to obtain a template file to be verified.
In particular, the data import template may predefine how the version data is filled, e.g., in which area in the data import template certain types of version data in the source environment are filled. The version data in the source environment corresponding to the source environment identifier can be correspondingly filled into the data import template, so that the template file to be verified is obtained.
It is emphasized that, to further ensure the privacy and security of the version data, the version data may also be stored in a node of a blockchain.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
And step S204, acquiring a data verification configuration file according to the source environment identifier and the target environment identifier.
The data verification configuration file is used for indicating verification of version data.
Specifically, the server has a plurality of data verification configuration files stored in advance. The method and the device adopt a version data import mode to deploy the new version, namely, the version data in the source environment is imported into the target environment, so that the cross-environment version deployment is realized. The importing of the version data has directionality, and the target environment is imported from the source environment, so that the data verification configuration file is correspondingly set according to the data importing direction among different environments, and the importing of the version data among different environments is verified in a targeted manner.
The server can query the corresponding data verification configuration file according to the source environment identifier and the target environment identifier.
Step S205, performing data verification on the template file to be verified from the data verification dimension preset in the data verification configuration file to obtain a verification result.
Specifically, the data verification dimension is recorded in the data verification configuration file, and the data verification dimension indicates from which aspects the data verification configuration file needs to be verified. The server performs data verification on the template file to be verified according to the specified data verification dimension to obtain a verification result.
And step S206, when the verification is determined to pass according to the verification result, importing the version data in the template file to be verified into the target environment corresponding to the target environment identifier so as to complete the cross-environment version release.
Specifically, when the verification result indicates that no data error exists, the verification is passed, and the template file to be verified can be run in the target environment. And the server imports the version data in the template file to be verified into a target environment corresponding to the target environment identifier, and sets the target environment according to the version data, thereby completing the cross-environment version release.
In the embodiment, after a data verification instruction is triggered when the version is deployed in a cross-environment mode, a data import template is obtained; importing the version data of the source environment into a data import template to obtain a template file to be verified; acquiring a data verification configuration file according to a data source environment identifier and a target environment identifier in a data verification instruction, wherein the data verification configuration file is configured in advance and matched with the directional import of the version data, a data verification dimension is defined according to the data verification configuration file, the data verification can be carried out on the template file to be verified in an all-around manner, and whether the version data in a source environment can make an error or not is checked when the version is deployed in a cross-environment manner; when the verification is passed, the version data is proved to be correct, and the version data can be imported into the target environment, so that cross-environment version release is realized, and the accuracy of the multi-environment deployment version is improved.
Further, the step S203 may include:
step S2031, determining the environment type of the source environment according to the source environment identifier.
Specifically, the server may extract the source environment identifier from the data verification instruction, and query the environment type of the source environment according to the source environment identifier. Version data has two sources, one is imported from other deployed environments, and the environment type is a version environment; one is manual entry, where the environment type is an entry environment.
Step S2032, when the environment type of the source environment is the version environment, importing the version data in the source environment into the data import template to obtain the template file to be verified.
Specifically, when the environment type of the source environment is the version environment, the server acquires version data from the source environment in which version deployment is implemented, and imports the version data into the data import template to obtain a template file to be verified.
And S2033, when the environment type of the source environment is an input environment, generating a template file to be verified according to the data input page.
Specifically, when the environment type of the source environment is an entry environment, it indicates that the user is manually entering version data through the data entry page. The form of the data entry page can be the same as that of the data import template, and the server generates a template file to be verified according to the data entry page filled with the version data.
In the embodiment, the version data can be acquired from the source environment in which the version deployment is completed, the template file to be verified is generated, the manually entered version data can be acquired from the data entry page, and the template file to be verified is generated, so that the acquisition mode of the version data is enriched.
Further, the step S205 may include:
step S2051, reads a preset data verification dimension from the data verification configuration file, where the data verification dimension includes a matching verification, an integrity verification, an validity verification, and a reference association verification.
Specifically, the data verification dimension is recorded in the data verification configuration file, and the server may first obtain the preset data verification dimension from the data verification configuration file, so as to determine which aspect of data verification is performed on the template file to be verified.
The data check dimension includes a match check, an integrity check, a validity check, and a reference association check. The matching check refers to checking the version number and the header field of the template file to be checked; the integrity check is to check whether missing version data exists; the validity check is to check whether the version data is valid; the reference association check is to check whether the reference relationship between the version data is correct.
Step S2052, according to the data verification configuration file, performing data verification on the template file to be verified from the data verification dimension to obtain a verification result.
Specifically, the data verification configuration file records, in addition to the data verification dimension, a verification standard under each data verification dimension, where the verification standard specifically defines what the template file to be verified should be, for example, the verification standard may define which header fields should be present in the template file to be verified, what the reference relationship between version data should be, and the like.
For each data verification dimension, the server takes the verification standard in the data verification configuration file as a standard, and performs data verification on the template file to be verified to obtain a verification result. The verification result may include whether the template file to be verified is correct, data error information, verification time, and the like.
Further, the step S2052 may include:
step S20521, the target environment identifiers and the header fields in the data verification configuration file and the template file to be verified are compared to perform matching verification.
Specifically, whether the version number of the data import template is correct or not may be checked, and since the data import template corresponds to the target environment, the target environment identifier may be used as the version number of the data import template.
The method includes the steps that version data in a template file to be verified are arranged according to a preset sequence, and the version data are provided with header fields, for example, when the template file to be verified is an Excel form, the version data are recorded in cells, and the cells are provided with headers, namely the header fields. The data verification configuration file records a target environment identifier and a header field, and the template file to be verified should have the same target environment identifier and header field.
And comparing whether the target environment identifications in the data verification configuration file and the template file to be verified are consistent or not and whether the header fields of the tables are consistent or not to perform matching verification. And when the target environment identifiers and all the header fields in the data verification configuration file and the template file to be verified are all consistent, the matching verification is passed.
Step S20522 is to detect whether there is empty data in the template file to be verified, so as to perform integrity verification.
Specifically, whether the template file to be verified has the condition that the version data should be filled in but the version data is missing is inquired and verified, that is, integrity verification is performed, and the condition indicates that empty data exists.
Step S20523 compares the constant variable data in the data verification configuration file and the template file to be verified to perform validity verification.
Specifically, some version data have environment specificity, such as some URL (Uniform Resource Locator) domain names, and are usually replaced and updated according to different environments, and these data are constant variable data.
The constant variable data in the source environment is directly imported into the target environment, and may not be normally used and has no effectiveness. The version data corresponding to the header fields of the table are recorded in the data check configuration file as the constant variable data. For the constant variable data in the template file to be verified, the data verification configuration file may preset the specification values of the constant variable data in the target environment. And performing validity check by comparing whether the constant variable data corresponding to the same header field in the data check configuration file and the template file to be checked are the same.
In one embodiment, after the constant variable data is determined in the template file to be verified according to the header field, the constant variable data may be sent to a preset terminal, and validity verification is performed on the constant variable data manually.
Step S20524, performing reference association check on the version data in the template file to be checked according to the data association tree in the data check configuration file.
The data association tree is used for recording the association between the version data, and may be a tree structure.
In particular, there may be a reference relationship between version data, which also needs to be recorded in the data verification configuration file. For example, version data B needs to refer to version data a when running, and if an error occurs in the version data a (for example, data is missing when the version data is manually entered, or version data C is referred to by recording version data B), an exception is caused. Therefore, it is necessary to obtain a data association tree in the data verification configuration file, and verify whether the reference association between version data is correct through the data association tree.
Furthermore, the reference association check may also be applied to the following scenarios: when the version data B needs to quote the version data A when running, the version data A is empty data, downstream version data related to the version data A can be determined through the data association tree, and the downstream version data is determined to be error version data.
Step S20525, a verification result is generated according to the matching verification, the integrity verification, the validity verification, and the reference association verification performed.
Specifically, after the matching check, the integrity check, the validity check and the reference association check are performed on the template file to be checked, a check result is generated. The verification result indicates whether the template file to be verified passes various verifications, and when the template file to be verified does not pass all verifications, the verification result can also comprise data error information.
In the embodiment, the template file to be verified is subjected to matching verification, integrity verification, validity verification and reference association verification, so that the template file to be verified is subjected to omnibearing inspection, and the accuracy of data verification is ensured.
In this embodiment, the data verification dimension is read first to determine which aspect of data verification is performed, and then the template file to be verified is verified with the specified dimension according to the data verification configuration file, so that the data verification is performed orderly.
Further, after step S205, the method may further include:
and step S207, when the verification is determined not to pass according to the verification result, acquiring data error information in the verification result.
The data error information specifically records which version data has errors.
Specifically, when the verification result indicates that the template file to be verified has a data error, the template file to be verified cannot be imported into the target environment. The server can obtain the data error information in the verification result so as to display the data error information.
And step S208, determining error version data and an error filling area associated with the error version data according to the data error information in the template file to be verified.
Specifically, the data error information records which version data in the template file to be verified have errors, that is, the error version data can be determined, wherein the null data can also be classified into the category of the error version data.
And reserving error filling areas in the template file to be verified, wherein each version data corresponds to one error filling area. It is also possible that a plurality of version data have the same error (for example, all the version data under a certain header field are null data), and at this time, a plurality of version data may share one error filling area.
Step S209, fill the data error information in the error filling area, adjust the display mode of the error version data, and generate a verification display file.
Specifically, the server correspondingly fills the data error information into the error filling area, and adjusts a display mode of the error version data, for example, changes a display color of the error version data, thereby generating a verification display file.
In one embodiment, the data errors include a common error and a local error, the common error is an error of data of a non-specific version, and the local error is an error of data of a specific version, for example, the common error may be that a sheet page in an Excel table is empty, and the local error may be that a format of an encoded value of data of a certain version in the Excel table is wrong.
The common error can be written into a preset common error recording area in the template file to be verified. And reserving a local error recording area for the version data by the template to be verified, wherein the local error is recorded in the local error recording area corresponding to the version data. For example, a common error sheet is reserved in an Excel table, and a common error is filled in the common error sheet, for example, "the x-th sheet version data is empty" is filled in the common error sheet; the first column of each sheet page is used for recording whether the version data of each line passes the verification, and the second column of each sheet page is used for filling in specific data error information, for example, "the encoding value format of the version data of the ythh line and the ythh column of the xth sheet page is wrong", and simultaneously, the cell where the wrong version data is located is adjusted to be a red highlight background so as to highlight the wrong version data.
In one embodiment, modification suggestions may also be filled in the common error log area and the local error log area to provide a reference for modifying the version data.
Step S210, sending the verification display file to a preset terminal to instruct the preset terminal to display the verification display file.
Specifically, the server sends the generated verification display file to a preset terminal, and the preset terminal can display the verification display file so that a user can check the wrong version data and the data error information.
In the embodiment, when the verification fails, the data error information is written back to the template file to be verified, and the display mode of the error version data is adjusted, so that a user can conveniently check and correct the error version data at the preset terminal.
Further, the step S210 may include: and sending the verification display file to a preset terminal to indicate the preset terminal to display the verification display file according to the arrangement sequence of the error version data in the verification display file.
Specifically, there may be a plurality of error version data, and the error version data has an arrangement order in the verification display file. The preset terminal can display the error version data according to the arrangement sequence of the error version data. For example, when a verification display file is displayed, the error jump to the first version data with errors can be automatically carried out, an error jump button is arranged in a display page, a user clicks the error jump button, the error jump to the next version data with errors can be automatically carried out, the user does not need to search the error version data one by one, and the user can concentrate on the correction of the version data.
In the embodiment, the error version data are displayed according to the arrangement sequence of the error version data, a user does not need to search the error version data one by one, time waste is reduced, and the checking efficiency and the data correction efficiency are improved.
Further, after the step S210, the method may further include: and when the modified template file to be verified returned by the preset terminal is received, performing data verification on the template file to be verified from the preset data verification dimension in the data verification configuration file to obtain a verification result.
Specifically, the user can modify the template file to be verified according to the data error information, and send the modified template file to be verified to the server through the preset terminal; and the server performs data verification on the modified template file to be verified again from the preset data verification dimension according to the data verification configuration file to obtain a verification result.
When the modified template file to be verified passes the data verification, the version data in the template file to be verified can be imported into a target environment so as to complete the cross-environment version release; and when the modified template file to be verified still does not pass the data verification, deleting the data error information filled in the last verification, filling the data error information obtained in the current verification into the template file to be verified, adjusting the display mode of the data of the current error version, and generating a verification display file. And sending the newly generated verification display file to a preset terminal for displaying and correcting again until the data verification is passed.
In the embodiment, the modified template file to be verified is received and data verification is performed again, so that whether data errors exist in the modified template file to be verified or not is detected, and the accuracy of the multi-environment deployment version is ensured.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a version issuing apparatus based on multi-environment deployment, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 3, the version issuing device 300 based on multi-environment deployment according to the present embodiment includes: an instruction obtaining module 301, a template obtaining module 302, a data importing module 303, a file obtaining module 304, a file checking module 305, and a version releasing module 306, wherein:
the instruction obtaining module 301 is configured to obtain a data verification instruction including a source environment identifier and a target environment identifier, where the data verification instruction is triggered when a version is deployed across environments.
A template obtaining module 302, configured to obtain a data import template matched with the target environment identifier.
And the data import module 303 is configured to import the version data in the source environment corresponding to the source environment identifier into the data import template, so as to obtain a template file to be verified.
And the file obtaining module 304 is configured to obtain a data verification configuration file according to the source environment identifier and the target environment identifier.
The file verification module 305 is configured to perform data verification on the template file to be verified from a data verification dimension preset in the data verification configuration file, so as to obtain a verification result.
And the version release module 306 is configured to, when it is determined that the verification passes according to the verification result, import the version data in the template file to be verified into the target environment corresponding to the target environment identifier, so as to complete cross-environment version release.
In the embodiment, after a data verification instruction is triggered when the version is deployed in a cross-environment mode, a data import template is obtained; importing the version data of the source environment into a data import template to obtain a template file to be verified; acquiring a data verification configuration file according to a data source environment identifier and a target environment identifier in a data verification instruction, wherein the data verification configuration file is configured in advance and matched with the directional import of the version data, a data verification dimension is defined according to the data verification configuration file, the data verification can be carried out on the template file to be verified in an all-around manner, and whether the version data in a source environment can make an error or not is checked when the version is deployed in a cross-environment manner; when the verification is passed, the version data is proved to be correct, and the version data can be imported into the target environment, so that cross-environment version release is realized, and the accuracy of the multi-environment deployment version is improved.
In some optional implementations of this embodiment, the data importing module 303 may include: the system comprises a type acquisition submodule, a data import submodule and a page generation submodule, wherein:
and the type obtaining submodule is used for determining the environment type of the source environment according to the source environment identifier.
And the data import submodule is used for importing the version data in the source environment into the data import template to obtain a template file to be verified when the environment type of the source environment is the version environment.
And the page generation sub-module is used for generating a template file to be verified according to the data entry page when the environment type of the source environment is an entry environment.
In the embodiment, the version data can be acquired from the source environment in which the version deployment is completed, the template file to be verified is generated, the manually entered version data can be acquired from the data entry page, and the template file to be verified is generated, so that the acquisition mode of the version data is enriched.
In some optional implementations of this embodiment, the file checking module 305 may include: dimension acquisition submodule and data delivery submodule, wherein:
and the dimension acquisition submodule is used for reading preset data verification dimensions from the data verification configuration file, and the data verification dimensions comprise matching verification, integrity verification, validity verification and reference association verification.
And the data delivery and verification sub-module is used for carrying out data verification on the template file to be verified from the data verification dimension according to the data verification configuration file to obtain a verification result.
In this embodiment, the data verification dimension is read first to determine which aspect of data verification is performed, and then the template file to be verified is verified with the specified dimension according to the data verification configuration file, so that the data verification is performed orderly.
In some optional implementations of this embodiment, the data delivery verification sub-module may include: the device comprises a matching check unit, an integrity check unit, an effectiveness check unit, a reference check unit and a result generation unit, wherein:
and the matching verification unit is used for comparing the target environment identifier and each header field in the data verification configuration file and the template file to be verified so as to perform matching verification.
And the integrity checking unit is used for detecting whether the template file to be checked has empty data or not so as to carry out integrity checking.
And the validity checking unit is used for comparing the constant variable data in the data checking configuration file and the template file to be checked so as to check the validity.
And the reference checking unit is used for carrying out reference correlation checking on the version data in the template file to be checked according to the data correlation tree in the data checking configuration file.
And the result generating unit is used for generating a verification result according to the matching verification, the integrity verification, the validity verification and the reference association verification.
In the embodiment, the template file to be verified is subjected to matching verification, integrity verification, validity verification and reference association verification, so that the template file to be verified is subjected to omnibearing inspection, and the accuracy of data verification is ensured.
In some optional implementations of the present embodiment, the version issuing device 300 based on multi-environment deployment may further include: the system comprises an information acquisition module, a determination module, a filling adjustment module and a file sending module, wherein:
and the information acquisition module is used for acquiring data error information in the verification result when the verification is determined not to pass according to the verification result.
And the determining module is used for determining error version data and an error filling area associated with the error version data according to the data error information in the template file to be verified.
And the filling and adjusting module is used for filling the data error information into the error filling area, adjusting the display mode of the error version data and generating a verification display file.
And the file sending module is used for sending the verification display file to the preset terminal so as to indicate the preset terminal to display the verification display file.
In the embodiment, when the verification fails, the data error information is written back to the template file to be verified, and the display mode of the error version data is adjusted, so that a user can conveniently check and correct the error version data at the preset terminal.
In some optional implementations of the present application, the file sending module is further configured to: and sending the verification display file to a preset terminal to indicate the preset terminal to display the verification display file according to the arrangement sequence of the error version data in the verification display file.
In the embodiment, the error version data are displayed according to the arrangement sequence of the error version data, a user does not need to search the error version data one by one, time waste is reduced, and the checking efficiency and the data correction efficiency are improved.
In some optional implementations of the present application, the file checking module is further configured to: and when the modified template file to be verified returned by the preset terminal is received, performing data verification on the template file to be verified from the preset data verification dimension in the data verification configuration file to obtain a verification result.
In the embodiment, the modified template file to be verified is received and data verification is performed again, so that whether data errors exist in the modified template file to be verified or not is detected, and the accuracy of the multi-environment deployment version is ensured.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 4, fig. 4 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It is noted that only computer device 4 having components 41-43 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the computer device 4. Of course, the memory 41 may also include both internal and external storage devices of the computer device 4. In this embodiment, the memory 41 is generally used for storing an operating system and various types of application software installed on the computer device 4, such as computer readable instructions of a version issuing method based on multi-environment deployment. Further, the memory 41 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute computer readable instructions stored in the memory 41 or process data, for example, execute computer readable instructions of the multi-environment deployment-based version issuing method.
The network interface 43 may comprise a wireless network interface or a wired network interface, and the network interface 43 is generally used for establishing communication connection between the computer device 4 and other electronic devices.
The computer device provided in this embodiment may execute the version release method based on multi-environment deployment. The version release method based on multi-environment deployment here can be the version release method based on multi-environment deployment of the above embodiments.
In the embodiment, after a data verification instruction is triggered when the version is deployed in a cross-environment mode, a data import template is obtained; importing the version data of the source environment into a data import template to obtain a template file to be verified; acquiring a data verification configuration file according to a data source environment identifier and a target environment identifier in a data verification instruction, wherein the data verification configuration file is configured in advance and matched with the directional import of the version data, a data verification dimension is defined according to the data verification configuration file, the data verification can be carried out on the template file to be verified in an all-around manner, and whether the version data in a source environment can make an error or not is checked when the version is deployed in a cross-environment manner; when the verification is passed, the version data is proved to be correct, and the version data can be imported into the target environment, so that cross-environment version release is realized, and the accuracy of the multi-environment deployment version is improved.
The present application further provides another embodiment, which is to provide a computer-readable storage medium storing computer-readable instructions executable by at least one processor to cause the at least one processor to perform the steps of the multi-environment deployment based version publishing method as described above.
In the embodiment, after a data verification instruction is triggered when the version is deployed in a cross-environment mode, a data import template is obtained; importing the version data of the source environment into a data import template to obtain a template file to be verified; acquiring a data verification configuration file according to a data source environment identifier and a target environment identifier in a data verification instruction, wherein the data verification configuration file is configured in advance and matched with the directional import of the version data, a data verification dimension is defined according to the data verification configuration file, the data verification can be carried out on the template file to be verified in an all-around manner, and whether the version data in a source environment can make an error or not is checked when the version is deployed in a cross-environment manner; when the verification is passed, the version data is proved to be correct, and the version data can be imported into the target environment, so that cross-environment version release is realized, and the accuracy of the multi-environment deployment version is improved.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. A version release method based on multi-environment deployment is characterized by comprising the following steps:
acquiring a data verification instruction comprising a source environment identifier and a target environment identifier, wherein the data verification instruction is triggered when a version is deployed across environments;
acquiring a data import template matched with the target environment identifier;
importing the version data in the source environment corresponding to the source environment identifier into the data import template to obtain a template file to be verified;
acquiring a data verification configuration file according to the source environment identifier and the target environment identifier;
performing data verification on the template file to be verified from a preset data verification dimension in the data verification configuration file to obtain a verification result;
and when the verification is determined to pass according to the verification result, importing the version data in the template file to be verified into the target environment corresponding to the target environment identifier so as to complete cross-environment version release.
2. The multi-environment deployment-based version release method according to claim 1, wherein the step of importing the version data in the source environment corresponding to the source environment identifier into the data import template to obtain the template file to be verified includes:
determining the environment type of the source environment according to the source environment identifier;
when the environment type of the source environment is a version environment, importing the version data in the source environment into the data import template to obtain a template file to be verified;
and when the environment type of the source environment is an input environment, generating a template file to be verified according to a data input page.
3. The multi-environment deployment-based version release method according to claim 1, wherein the step of performing data verification on the template file to be verified from a data verification dimension preset in the data verification configuration file to obtain a verification result comprises:
reading preset data verification dimensions from the data verification configuration file, wherein the data verification dimensions comprise matching verification, integrity verification, validity verification and reference association verification;
and according to the data verification configuration file, performing data verification on the template file to be verified from the data verification dimension to obtain a verification result.
4. The multi-environment deployment-based version release method according to claim 3, wherein the step of performing data verification on the template file to be verified from the data verification dimension according to the data verification configuration file to obtain a verification result comprises:
comparing the target environment identification and each header field in the data verification configuration file and the template file to be verified to perform matching verification;
detecting whether empty data exist in the template file to be verified or not so as to carry out integrity verification;
comparing the constant variable data in the data verification configuration file and the template file to be verified to verify the validity;
performing reference association check on the version data in the template file to be checked according to the data association tree in the data check configuration file;
and generating a verification result according to the matching verification, the integrity verification, the validity verification and the reference association verification.
5. The multi-environment deployment-based version release method according to claim 1, wherein after the step of performing data verification on the template file to be verified to obtain a verification result from a data verification dimension preset in the data verification configuration file, the method further comprises:
when the verification is determined to fail according to the verification result, acquiring data error information in the verification result;
in the template file to be verified, determining error version data and an error filling area associated with the error version data according to the data error information;
filling the data error information into the error filling area, adjusting the display mode of the error version data, and generating a verification display file;
and sending the verification display file to a preset terminal to indicate the preset terminal to display the verification display file.
6. The multi-environment deployment based version release method according to claim 5, wherein the step of sending the verification display file to a preset terminal to instruct the preset terminal to display the verification display file comprises:
and sending the verification display file to a preset terminal to indicate the preset terminal to display the verification display file according to the arrangement sequence of the error version data in the verification display file.
7. The multi-environment deployment-based version release method according to claim 5, wherein after the step of sending the verification display file to a preset terminal to instruct the preset terminal to display the verification display file, the method further comprises:
and when receiving the modified template file to be verified returned by the preset terminal, executing the preset data verification dimensionality in the data verification configuration file, and performing data verification on the template file to be verified to obtain a verification result.
8. A version publishing device based on multi-environment deployment, comprising:
the instruction acquisition module is used for acquiring a data verification instruction comprising a source environment identifier and a target environment identifier, and the data verification instruction is triggered when a version is deployed across environments;
the template acquisition module is used for acquiring a data import template matched with the target environment identifier;
the data import module is used for importing the version data in the source environment corresponding to the source environment identifier into the data import template to obtain a template file to be verified;
the file acquisition module is used for acquiring a data verification configuration file according to the source environment identifier and the target environment identifier;
the file verification module is used for performing data verification on the template file to be verified from a preset data verification dimension in the data verification configuration file to obtain a verification result;
and the version release module is used for importing the version data in the template file to be verified into the target environment corresponding to the target environment identifier when the verification is determined to be passed according to the verification result so as to complete the cross-environment version release.
9. A computer device comprising a memory having computer readable instructions stored therein and a processor which when executed implements the steps of the multi-environment deployment based version publishing method of any one of claims 1 to 7.
10. A computer readable storage medium having computer readable instructions stored thereon which, when executed by a processor, implement the steps of the multi-environment deployment based version publishing method of any one of claims 1 to 7.
CN202110587189.9A 2021-05-27 2021-05-27 Version release method and device based on multi-environment deployment and computer equipment Pending CN113190240A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110587189.9A CN113190240A (en) 2021-05-27 2021-05-27 Version release method and device based on multi-environment deployment and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110587189.9A CN113190240A (en) 2021-05-27 2021-05-27 Version release method and device based on multi-environment deployment and computer equipment

Publications (1)

Publication Number Publication Date
CN113190240A true CN113190240A (en) 2021-07-30

Family

ID=76985507

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110587189.9A Pending CN113190240A (en) 2021-05-27 2021-05-27 Version release method and device based on multi-environment deployment and computer equipment

Country Status (1)

Country Link
CN (1) CN113190240A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100054156A1 (en) * 2008-08-29 2010-03-04 Dehaan Michael Paul Systems and methods for software provisioning in multiple network configuration environment
CN109032611A (en) * 2018-06-06 2018-12-18 平安科技(深圳)有限公司 Script dispositions method, device, computer equipment and storage medium
CN110377294A (en) * 2019-07-23 2019-10-25 上海金融期货信息技术有限公司 A kind of multi-environment configuration system and method based on DevOps

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100054156A1 (en) * 2008-08-29 2010-03-04 Dehaan Michael Paul Systems and methods for software provisioning in multiple network configuration environment
CN109032611A (en) * 2018-06-06 2018-12-18 平安科技(深圳)有限公司 Script dispositions method, device, computer equipment and storage medium
CN110377294A (en) * 2019-07-23 2019-10-25 上海金融期货信息技术有限公司 A kind of multi-environment configuration system and method based on DevOps

Similar Documents

Publication Publication Date Title
CA2876732A1 (en) Method and system for secured communication of personal information
CN111314172B (en) Block chain-based data processing method, device, equipment and storage medium
CN111274045A (en) Multi-platform docking method and device, computer equipment and readable storage medium
CN109597979B (en) List table generation method and device, computer equipment and storage medium
CN112365202B (en) Method for screening evaluation factors of multi-target object and related equipment thereof
CN110598433B (en) Block chain-based anti-fake information processing method and device
CN108154048B (en) Asset information processing method and device
CN112328486A (en) Interface automation test method and device, computer equipment and storage medium
CN112181835A (en) Automatic testing method and device, computer equipment and storage medium
CN111680477A (en) Method and device for exporting spreadsheet file, computer equipment and storage medium
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN111651749A (en) Method and device for finding account based on password, computer equipment and storage medium
CN114996675A (en) Data query method and device, computer equipment and storage medium
CN113434254B (en) Client deployment method, client deployment apparatus, computer device, and storage medium
CN112860662B (en) Automatic production data blood relationship establishment method, device, computer equipment and storage medium
CN113709181A (en) Website login method, device, equipment and storage medium based on browser plug-in
EP4040720A1 (en) Secure identity card using unclonable functions
CN117133006A (en) Document verification method and device, computer equipment and storage medium
CN112363814A (en) Task scheduling method and device, computer equipment and storage medium
CN111552663A (en) File consistency verification method and device, computer equipment and storage medium
CN113190240A (en) Version release method and device based on multi-environment deployment and computer equipment
CN114912003A (en) Document searching method and device, computer equipment and storage medium
CN114710297A (en) Block chain evidence storing method, device and equipment based on aggregated signature and storage medium
CN112529700A (en) Business handling and auditing method, system, equipment and readable storage medium
CN112395450A (en) Picture character detection method and device, computer equipment and storage medium

Legal Events

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