CN117251196A - Data maintenance method, device, equipment and storage medium - Google Patents

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

Info

Publication number
CN117251196A
CN117251196A CN202311540988.6A CN202311540988A CN117251196A CN 117251196 A CN117251196 A CN 117251196A CN 202311540988 A CN202311540988 A CN 202311540988A CN 117251196 A CN117251196 A CN 117251196A
Authority
CN
China
Prior art keywords
data maintenance
data
script
parameterized
maintenance
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
CN202311540988.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.)
Taiping Pension Insurance Co ltd
Taiping Financial Technology Services Shanghai Co Ltd Shenzhen Branch
Original Assignee
Taiping Pension Insurance Co ltd
Taiping Financial Technology Services Shanghai Co Ltd Shenzhen Branch
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 Taiping Pension Insurance Co ltd, Taiping Financial Technology Services Shanghai Co Ltd Shenzhen Branch filed Critical Taiping Pension Insurance Co ltd
Priority to CN202311540988.6A priority Critical patent/CN117251196A/en
Publication of CN117251196A publication Critical patent/CN117251196A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a data maintenance method, a device, equipment and a storage medium, and relates to the technical field of computers. The method comprises the following steps: responding to a data maintenance request, and acquiring a parameterized data maintenance script matched with the data maintenance request; wherein, different data maintenance scenes correspond to different parameterized data maintenance scripts; acquiring data maintenance parameters corresponding to the data maintenance request, writing the data maintenance parameters into the parameterized data maintenance script, and generating a target data maintenance script; executing the target data maintenance script, and carrying out change processing on the data to be processed associated with the data maintenance request. According to the technical scheme, different parameterized data maintenance scripts are provided for different data maintenance scenes, so that one parameterized data maintenance script can be repeatedly used in the same type of data maintenance scenes, and the writing times of the data maintenance scripts are reduced.

Description

Data maintenance method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data maintenance method, apparatus, device, and storage medium.
Background
When a service person operates a system service, due to a special service scene or a system defect, the service process can not be executed or error data can be generated, and data maintenance is needed.
At present, a corresponding data maintenance script is usually rewritten for each maintenance request, and because the same maintenance request can be repeatedly submitted, when different personnel write the data maintenance script for the same maintenance request, the situation of non-uniform logic can exist, so that maintenance errors or maintenance omission can be caused, and therefore, the writing and auditing workload of the data maintenance script is large.
Disclosure of Invention
The embodiment of the invention provides a data maintenance method, a device, equipment and a storage medium, which enable one parameterized data maintenance script to be repeatedly used in the same type of data maintenance scene by providing different parameterized data maintenance scripts for different data maintenance scenes, so that the writing times of the data maintenance scripts are reduced.
According to an aspect of the present invention, there is provided a data maintenance method including:
responding to a data maintenance request, and acquiring a parameterized data maintenance script matched with the data maintenance request; wherein, different data maintenance scenes correspond to different parameterized data maintenance scripts;
Acquiring data maintenance parameters corresponding to the data maintenance request, writing the data maintenance parameters into the parameterized data maintenance script, and generating a target data maintenance script;
executing the target data maintenance script, and carrying out change processing on the data to be processed associated with the data maintenance request.
According to another aspect of the present invention, there is provided a data maintenance apparatus comprising:
the script acquisition module is used for responding to the data maintenance request and acquiring a parameterized data maintenance script matched with the data maintenance request; wherein, different data maintenance scenes correspond to different parameterized data maintenance scripts;
the parameter binding module is used for acquiring the data maintenance parameters corresponding to the data maintenance request, writing the data maintenance parameters into the parameterized data maintenance script and generating a target data maintenance script;
and the data maintenance module is used for executing the target data maintenance script and carrying out change processing on the data to be processed associated with the data maintenance request.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data maintenance method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a data maintenance method according to any embodiment of the present invention.
According to the technical scheme, the parameterized data maintenance script matched with the data maintenance request is obtained by responding to the data maintenance request; wherein, different data maintenance scenes correspond to different parameterized data maintenance scripts; acquiring data maintenance parameters corresponding to the data maintenance request, writing the data maintenance parameters into the parameterized data maintenance script, and generating a target data maintenance script; the target data maintenance script is executed, the data to be processed associated with the data maintenance request is changed, the problem that the writing and auditing workload of the data maintenance script in the related technology is large is solved, and by providing different parameterized data maintenance scripts for different data maintenance scenes, one parameterized data maintenance script can be repeatedly used in the same kind of data maintenance scenes, so that the writing times of the data maintenance script are reduced.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a data maintenance method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a data maintenance parameterization provided according to one embodiment of the present invention;
FIG. 3 is a flow chart of another data maintenance method according to a second embodiment of the present invention;
FIG. 4 is a schematic illustration of a parameter entry interface provided in accordance with a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of a data maintenance device according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device implementing a data maintenance method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "target," and the like in the description and claims of the present invention and in the above-described figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a data maintenance method according to a first embodiment of the present invention, where the method may be implemented by a data maintenance device, and the device may be implemented in hardware and/or software, and the device may be configured in an electronic device, where the method is applicable to a case where corresponding data changes are performed on a system according to a data maintenance request of a user. As shown in fig. 1, the method includes:
s110, responding to a data maintenance request, and acquiring a parameterized data maintenance script matched with the data maintenance request.
Wherein, different data maintenance scenarios correspond to different parameterized data maintenance scripts. According to the embodiment, by adopting a data maintenance parameterization mode, parameterization data maintenance scripts are only required to be written once for each data maintenance scene, the parameterization data maintenance scripts can be used for realizing the data maintenance of the same scene, and the data maintenance scripts do not need to be rewritten, so that the writing and auditing workload of the data maintenance scripts is reduced. According to the data maintenance flow corresponding to each data maintenance scene, some data maintenance scenes may be matched with one parameterized data maintenance script, some data maintenance scenes may be matched with a plurality of parameterized data maintenance scripts, and the plurality of scripts need to be executed according to a specified sequence. For convenience of description, in this embodiment, a data maintenance scenario is taken as an example to describe a data maintenance procedure corresponding to a parameterized data maintenance pin.
In this embodiment, as shown in fig. 2, when a user performs a service operation in the system, if a service flow cannot be executed or error data is generated due to a special service scenario, an operation error, or a system function defect, a corresponding data maintenance request is generated to apply for correcting the error service flow or the error data. And generating an audit instruction according to the received data maintenance request to indicate the reasonability of the data maintenance request to be approved by the superior lead of the user, and acquiring a parameterized data maintenance script according to a data maintenance scene corresponding to the data maintenance request if the audit is passed after receiving a reply message with reasonable request. If a reply message with unreasonable request is received, the data maintenance is finished.
Optionally, the responding to the data maintenance request, acquiring the parameterized data maintenance script matched with the data maintenance request, includes: responding to a data maintenance request, carrying out semantic analysis on a description text of the data maintenance request, and determining a target data maintenance scene corresponding to the data maintenance request; inquiring whether script identifiers matched with the target data maintenance scene exist in a scene mapping list or not; if yes, acquiring a parameterized data maintenance script corresponding to the script identifier, and taking the parameterized data maintenance script as a parameterized data maintenance script matched with the data maintenance request; if the parameterized data maintenance script does not exist, generating a script writing instruction corresponding to the target data maintenance scene, and acquiring the parameterized data maintenance script corresponding to the script writing instruction.
In this embodiment, each data maintenance request has a description text for describing an error problem generated in the business operation. In response to the data maintenance request, semantic analysis can be performed on the description text of the data maintenance request, and a target data maintenance scene corresponding to the data maintenance, such as a scene of A-type transaction withdrawal, is determined according to the semantic analysis result. And then, according to the scene identification of the target data maintenance scene, inquiring the mapping relation between the data maintenance scene and the parameterized data maintenance script stored in the scene mapping list, and judging whether a script identification matched with the scene identification of the target data maintenance scene exists, as shown in fig. 2, if so, acquiring the parameterized data maintenance script corresponding to the script identification from a script library as the parameterized data maintenance script used for the current data maintenance. If the data is not stored, the data maintenance is not performed on the target data maintenance scene before, and at the moment, a script writing instruction corresponding to the target data maintenance scene can be generated to instruct an operation and maintenance personnel to write a parameterized data maintenance script matched with the target data maintenance scene according to the script writing instruction.
In an alternative embodiment, the parameterized data maintenance script comprises: scene description information, parameterization description information, and data maintenance execution code. The scene description information is used for recording which data maintenance scene the parameterized data maintenance script aims at to carry out data maintenance processing. The parameterized description information is used for recording the parameter name, the parameter description, the data type of the parameter and the parameter binding sequence of the data maintenance parameter which needs to be bound by the parameterized data maintenance script. The data maintenance execution code is used to explain the specific execution steps of the data maintenance process, and the data maintenance parameters involved in the code may be replaced with preset symbols, for example "? "replace".
In an optional implementation manner, after generating a script writing instruction corresponding to the target data maintenance scene and acquiring a parameterized data maintenance script corresponding to the script writing instruction, the method further includes: reading scene description information in the parameterized data maintenance script, and determining a target data maintenance scene corresponding to the parameterized data maintenance script; and generating a mapping relation between the target data maintenance scene and the parameterized data maintenance script, and adding the mapping relation into the scene mapping list.
In this embodiment, after the parameterized data maintenance script written by the operation and maintenance personnel is obtained, a script auditing instruction may be generated to instruct other personnel to perform code auditing on the parameterized data maintenance script. If a return message passing the audit is received, the parameterized data maintenance script can be executed in the production environment as shown in fig. 2, and the parameterized data maintenance script is solidified, that is, scene description information in the parameterized data maintenance script is read, a target data maintenance scene corresponding to the parameterized data maintenance script is determined, a mapping relation between the target data maintenance scene and the parameterized data maintenance script is generated, and the mapping relation is added into a scene mapping list, so that when a data maintenance request corresponding to the target data maintenance scene is received later, the corresponding parameterized data maintenance script can be found out quickly.
S120, acquiring data maintenance parameters corresponding to the data maintenance request, writing the data maintenance parameters into the parameterized data maintenance script, and generating a target data maintenance script.
In this embodiment, since the data maintenance parameters related to the parameterized data maintenance script are replaced by the preset symbols, a specific data maintenance step for solving the current data maintenance request cannot be determined, and therefore, after the parameterized data maintenance script is acquired, the data maintenance parameters corresponding to the data maintenance request need to be acquired and sequentially bound to the parameterized data maintenance script, so as to generate a target data maintenance script capable of solving the specific problem corresponding to the current data maintenance request.
Optionally, the obtaining the data maintenance parameter corresponding to the data maintenance request, and writing the data maintenance parameter into the parameterized data maintenance script, to generate a target data maintenance script, includes: acquiring a parameter description list matched with a target data maintenance scene according to the target data maintenance scene corresponding to the data maintenance request; extracting data maintenance parameters from the statement text of the data maintenance request according to the parameter description information in the parameter description list; and writing the data maintenance parameters corresponding to the parameter description information into the parameterized data maintenance script according to the sequence of the parameter description information in the parameter description list, and generating a target data maintenance script.
In this embodiment, a matched parameter description list may be generated for each data maintenance scenario in advance, where the parameter description list includes description information of each data maintenance parameter required by the parameterized data maintenance script corresponding to the data maintenance scenario. Therefore, when the parameter description list is realized as the parameterized data maintenance script binding the data maintenance parameters, the parameter description list can be determined according to the target data maintenance scene corresponding to the parameterized data maintenance script. And then, according to the parameter description information in the parameter description list, keyword extraction operation is carried out on the description text of the data maintenance request, so as to obtain the data maintenance parameters. And writing the data maintenance parameters corresponding to the parameter description information into the parameterized data maintenance script according to the sequence of the parameter description information in the parameter description list to generate a target data maintenance script.
S130, executing the target data maintenance script, and carrying out change processing on the data to be processed associated with the data maintenance request.
In this embodiment, the target data maintenance script is executed, and according to the data processing statement such as the data update statement and the data deletion statement in the target data maintenance script, the data to be processed in the data table corresponding to the data processing statement is correspondingly updated or deleted, so as to complete the data maintenance of the system.
Optionally, the executing the target data maintenance script performs a change process on the data to be processed associated with the data maintenance request, including: executing the target data maintenance script, and generating data statistical information matched with the data to be processed; generating and displaying data change prompt information according to the data statistical information; and responding to the triggering operation of the user on the confirmation component in the data change prompt information, and carrying out change processing on the data to be processed.
In this embodiment, when the target data maintenance script is executed to perform data maintenance, pre-execution may be performed first to count the number of data to be processed, generate a data change prompt message according to the number of data to be processed, and pop up a prompt box containing the data change prompt message in the current page, so as to ask a user whether to perform maintenance update on the data. If the user considers that the quantity of the data to be processed has problems, a cancel button in the prompt box can be clicked to cancel the data maintenance, and if the user agrees to continue the data maintenance, a confirm button in the prompt box can be clicked to continue the data maintenance. According to the embodiment, the pre-execution is set, so that a user can audit the data to be maintained before the data maintenance is performed, and serious consequences caused by the execution of wrong data maintenance are avoided.
According to the technical scheme, the parameterized data maintenance script matched with the data maintenance request is obtained by responding to the data maintenance request; wherein, different data maintenance scenes correspond to different parameterized data maintenance scripts; acquiring data maintenance parameters corresponding to the data maintenance request, writing the data maintenance parameters into the parameterized data maintenance script, and generating a target data maintenance script; the target data maintenance script is executed, the data to be processed associated with the data maintenance request is changed, the problem that the writing and auditing workload of the data maintenance script in the related technology is large is solved, and by providing different parameterized data maintenance scripts for different data maintenance scenes, one parameterized data maintenance script can be repeatedly used in the same kind of data maintenance scenes, so that the writing times of the data maintenance script are reduced.
Example two
Fig. 3 is a flowchart of another data maintenance method according to a second embodiment of the present invention, where another implementation manner of generating a target data maintenance script according to a parameterized data maintenance script is further provided, a specific step of performing data backup before performing data change processing on data, a specific step of recording a relationship between a data maintenance request and a script, and a specific step of performing system function development according to a use frequency of the script are provided on the basis of the above embodiment. As shown in fig. 3, the method includes:
S310, responding to a data maintenance request, and acquiring a parameterized data maintenance script matched with the data maintenance request.
Wherein, different data maintenance scenarios correspond to different parameterized data maintenance scripts. According to the embodiment, by adopting a data maintenance parameterization mode, parameterization data maintenance scripts are only required to be written once for each data maintenance scene, the parameterization data maintenance scripts can be used for realizing the data maintenance of the same scene, the data maintenance scripts do not need to be rewritten, the writing and auditing workload of the data maintenance scripts is reduced, and meanwhile, the risk of data maintenance errors caused by inconsistent scripts written by different personnel during the data maintenance of the same scene is avoided.
S320, acquiring data maintenance parameters corresponding to the data maintenance request, writing the data maintenance parameters into the parameterized data maintenance script, and generating a target data maintenance script.
In an optional implementation manner, the obtaining the data maintenance parameter corresponding to the data maintenance request, and writing the data maintenance parameter into the parameterized data maintenance script, to generate a target data maintenance script, includes: generating and displaying a parameter input interface corresponding to the parameterized data maintenance script; responding to the input operation of a user to a parameter editing box in the parameter input interface, and acquiring data maintenance parameters; and writing each data maintenance parameter into the parameterized data maintenance script according to the sequence of the parameter editing frame of each data maintenance parameter in the parameter input interface to generate a target data maintenance script.
In this embodiment, a corresponding parameter entry interface may be provided in advance for each parameterized data maintenance script, and edit boxes of a plurality of data maintenance parameters may be sequentially arranged in the parameter entry interface, where relevant information of the corresponding data maintenance parameters, such as data types or parameter descriptions of the parameters, may be displayed in the parameter edit boxes, as shown in fig. 4. After determining the parameterized data maintenance script that matches the data maintenance request, a parameter entry interface corresponding to the script may be automatically generated and presented to the user. And responding to the input operation of a user on a parameter editing box in the parameter input interface, and acquiring data maintenance parameters. And then writing the acquired data maintenance parameters into corresponding code positions of the parameterized data maintenance script according to the arrangement sequence of the parameter editing frames in the parameter input interface, and generating a target data maintenance script.
S330, searching the data processing keywords in the target data maintenance script.
In the related art, backup of data to be processed cannot be performed during data maintenance, so that the data change history cannot be traced, and the post-problem investigation is not facilitated. In order to solve the above problem, after the target data maintenance script is generated, the target data maintenance script needs to be parsed to find the data processing statement, and a backup statement matching the data processing statement is generated, so that the data to be processed is automatically backed up, as shown in fig. 2.
In this embodiment, the data processing keywords may include an UPDATE keyword for updating the data in the table and a DELETE keyword for deleting the data in the table. All UPDATE keywords and DELETE keywords in the target data maintenance script can be found by parsing and keyword matching the target data maintenance script.
S340, reading the data processing statement in which the data processing keyword is located, and generating a backup statement matched with the data processing statement.
In this embodiment, after the UPDATE keyword and the DELETE keyword in the target data maintenance script are found, the UPDATE statement containing the UPDATE keyword may be read, and the DELETE statement containing the DELETE keyword may be read, and the UPDATE statement and the DELETE statement may be automatically replaced with corresponding backup statements.
And S350, executing the backup statement, backing up the data to be processed in the data table corresponding to the data processing keyword, and adding the backup data and the backup record information into the backup table of the data table.
In this embodiment, the backup statement corresponding to the UPDATE statement is executed to backup the data to be updated in the data table pointed by the UPDATE statement, and the backup statement corresponding to the DELETE statement is executed to backup the data to be deleted in the data table pointed by the DELETE statement. In order to record the correspondence between the backup data and the data maintenance request, corresponding backup record information may be generated for each backup data, and the backup data and the backup record information may be added to a backup table of the corresponding data table. The backup record information may be a maintenance number for marking a data maintenance request, and each data table to be processed has a corresponding backup table for storing backup data of data to be processed in the corresponding data table.
When the data is backed up, if the currently processed data table does not have the backup table in the system, the backup table is automatically created, and compared with the data table, a maintenance number field is added to the backup table for helping to establish the relation between the backup data and the data maintenance request, so that the post-problem investigation is facilitated.
In the embodiment, the data to be processed is automatically backed up by carrying out semantic analysis on the parameterized data maintenance script bound with the data maintenance parameters, so that the safety of data maintenance and the traceability of the data are enhanced.
Optionally, after executing the backup statement, backing up the data to be processed in the data table corresponding to the data processing keyword, and adding the backup data and the backup record information to the backup table of the data table, the method further includes: and recording the association relation between the data maintenance request, the target data maintenance script and the backup table.
In this embodiment, by recording the association relationship between each data maintenance request and the execution script and the backup table, the method is more beneficial to the maintenance of the multi-disk data and the analysis of the post-event problem.
S360, executing the target data maintenance script, and carrying out change processing on the data to be processed associated with the data maintenance request.
In this embodiment, the target data maintenance script is executed, and according to the data processing statement such as the data update statement and the data deletion statement in the target data maintenance script, the data to be processed in the data table corresponding to the data processing statement is correspondingly updated or deleted, so as to complete the data maintenance of the system.
Optionally, the method further comprises: acquiring the use frequency of each parameterized data maintenance script; if a first parameterized data maintenance script with the use frequency being greater than a first threshold value exists, determining a first data maintenance scene corresponding to the first parameterized data maintenance script; and generating a system function development instruction corresponding to the first data maintenance scene.
In this embodiment, the frequency of performing data maintenance in various data maintenance scenarios may be determined by counting the frequency of use of each parameterized data maintenance script. If the data maintenance script with higher use frequency is called a first parameterized data maintenance script, a system function development instruction is required to be generated aiming at a first data maintenance scene corresponding to the first parameterized data maintenance script so as to perfect the system function under the scene and reduce the times of data maintenance.
According to the technical scheme, the parameterized data maintenance script matched with the data maintenance request is obtained by responding to the data maintenance request; wherein, different data maintenance scenes correspond to different parameterized data maintenance scripts; acquiring data maintenance parameters corresponding to the data maintenance request, writing the data maintenance parameters into the parameterized data maintenance script, and generating a target data maintenance script; the target data maintenance script is executed, the data to be processed associated with the data maintenance request is changed, the problem that the writing and auditing workload of the data maintenance script in the related technology is large is solved, and by providing different parameterized data maintenance scripts for different data maintenance scenes, one parameterized data maintenance script can be repeatedly used in the same kind of data maintenance scenes, so that the writing times of the data maintenance script are reduced.
Example III
Fig. 5 is a schematic structural diagram of a data maintenance device according to a third embodiment of the present invention. As shown in fig. 5, the apparatus includes:
a script acquisition module 510, configured to respond to a data maintenance request, and acquire a parameterized data maintenance script that matches the data maintenance request; wherein, different data maintenance scenes correspond to different parameterized data maintenance scripts;
A parameter binding module 520, configured to obtain a data maintenance parameter corresponding to the data maintenance request, and write the data maintenance parameter into the parameterized data maintenance script, so as to generate a target data maintenance script;
and the data maintenance module 530 is configured to execute the target data maintenance script, and perform modification processing on the data to be processed associated with the data maintenance request.
According to the technical scheme, the parameterized data maintenance script matched with the data maintenance request is obtained by responding to the data maintenance request; wherein, different data maintenance scenes correspond to different parameterized data maintenance scripts; acquiring data maintenance parameters corresponding to the data maintenance request, writing the data maintenance parameters into the parameterized data maintenance script, and generating a target data maintenance script; the target data maintenance script is executed, the data to be processed associated with the data maintenance request is changed, the problem that the writing and auditing workload of the data maintenance script in the related technology is large is solved, and by providing different parameterized data maintenance scripts for different data maintenance scenes, one parameterized data maintenance script can be repeatedly used in the same kind of data maintenance scenes, so that the writing times of the data maintenance script are reduced.
Optionally, the script acquisition module 510 is configured to:
responding to a data maintenance request, carrying out semantic analysis on a description text of the data maintenance request, and determining a target data maintenance scene corresponding to the data maintenance request;
inquiring whether script identifiers matched with the target data maintenance scene exist in a scene mapping list or not;
if yes, acquiring a parameterized data maintenance script corresponding to the script identifier, and taking the parameterized data maintenance script as a parameterized data maintenance script matched with the data maintenance request;
if the parameterized data maintenance script does not exist, generating a script writing instruction corresponding to the target data maintenance scene, and acquiring the parameterized data maintenance script corresponding to the script writing instruction.
Optionally, the parameterized data maintenance script includes: scene description information, parameterization description information, and data maintenance execution code;
further comprises: the script solidifying module is used for reading scene description information in the parameterized data maintenance script after generating a script writing instruction corresponding to the target data maintenance scene and acquiring the parameterized data maintenance script corresponding to the script writing instruction, and determining the target data maintenance scene corresponding to the parameterized data maintenance script;
And generating a mapping relation between the target data maintenance scene and the parameterized data maintenance script, and adding the mapping relation into the scene mapping list.
Optionally, the parameter binding module 520 includes: the first parameter binding unit is used for acquiring a parameter description list matched with the target data maintenance scene according to the target data maintenance scene corresponding to the data maintenance request;
extracting data maintenance parameters from the statement text of the data maintenance request according to the parameter description information in the parameter description list;
and writing the data maintenance parameters corresponding to the parameter description information into the parameterized data maintenance script according to the sequence of the parameter description information in the parameter description list, and generating a target data maintenance script.
Optionally, the parameter binding module 520 includes: the second parameter binding unit is used for generating and displaying a parameter input interface corresponding to the parameterized data maintenance script;
responding to the input operation of a user to a parameter editing box in the parameter input interface, and acquiring data maintenance parameters;
and writing each data maintenance parameter into the parameterized data maintenance script according to the sequence of the parameter editing frame of each data maintenance parameter in the parameter input interface to generate a target data maintenance script.
Optionally, the method further comprises: the backup module is used for searching a data processing keyword in the target data maintenance script before executing the target data maintenance script and carrying out change processing on the data to be processed associated with the data maintenance request;
reading a data processing statement in which the data processing keyword is located, and generating a backup statement matched with the data processing statement;
and executing the backup statement, backing up the data to be processed in the data table corresponding to the data processing keyword, and adding the backup data and the backup record information into the backup table of the data table.
Optionally, the method further comprises: and the relation recording module is used for recording the association relation between the data maintenance request, the target data maintenance script and the backup table after executing the backup statement, backing up the data to be processed in the data table corresponding to the data processing keyword, and adding the backup data and the backup record information into the backup table of the data table.
Optionally, the data maintenance module 530 is configured to:
executing the target data maintenance script, and generating data statistical information matched with the data to be processed;
Generating and displaying data change prompt information according to the data statistical information;
and responding to the triggering operation of the user on the confirmation component in the data change prompt information, and carrying out change processing on the data to be processed.
Optionally, the method further comprises: the analysis module is used for acquiring the use frequency of each parameterized data maintenance script;
if a first parameterized data maintenance script with the use frequency being greater than a first threshold value exists, determining a first data maintenance scene corresponding to the first parameterized data maintenance script;
and generating a system function development instruction corresponding to the first data maintenance scene.
The data maintenance device provided by the embodiment of the invention can execute the data maintenance method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 6 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the data maintenance method.
In some embodiments, the data maintenance method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the data maintenance method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the data maintenance method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (12)

1. A method of data maintenance, comprising:
responding to a data maintenance request, and acquiring a parameterized data maintenance script matched with the data maintenance request; wherein, different data maintenance scenes correspond to different parameterized data maintenance scripts;
acquiring data maintenance parameters corresponding to the data maintenance request, writing the data maintenance parameters into the parameterized data maintenance script, and generating a target data maintenance script;
Executing the target data maintenance script, and carrying out change processing on the data to be processed associated with the data maintenance request.
2. The method of claim 1, wherein the obtaining, in response to a data maintenance request, a parameterized data maintenance script that matches the data maintenance request comprises:
responding to a data maintenance request, carrying out semantic analysis on a description text of the data maintenance request, and determining a target data maintenance scene corresponding to the data maintenance request;
inquiring whether script identifiers matched with the target data maintenance scene exist in a scene mapping list or not;
if yes, acquiring a parameterized data maintenance script corresponding to the script identifier, and taking the parameterized data maintenance script as a parameterized data maintenance script matched with the data maintenance request;
if the parameterized data maintenance script does not exist, generating a script writing instruction corresponding to the target data maintenance scene, and acquiring the parameterized data maintenance script corresponding to the script writing instruction.
3. The method of claim 2, wherein the parameterized data maintenance script comprises: scene description information, parameterization description information, and data maintenance execution code;
After generating a script writing instruction corresponding to the target data maintenance scene and acquiring a parameterized data maintenance script corresponding to the script writing instruction, the method further comprises:
reading scene description information in the parameterized data maintenance script, and determining a target data maintenance scene corresponding to the parameterized data maintenance script;
and generating a mapping relation between the target data maintenance scene and the parameterized data maintenance script, and adding the mapping relation into the scene mapping list.
4. The method of claim 1, wherein the obtaining the data maintenance parameter corresponding to the data maintenance request and writing the data maintenance parameter into the parameterized data maintenance script, generating a target data maintenance script, comprises:
acquiring a parameter description list matched with a target data maintenance scene according to the target data maintenance scene corresponding to the data maintenance request;
extracting data maintenance parameters from the statement text of the data maintenance request according to the parameter description information in the parameter description list;
and writing the data maintenance parameters corresponding to the parameter description information into the parameterized data maintenance script according to the sequence of the parameter description information in the parameter description list, and generating a target data maintenance script.
5. The method of claim 1, wherein the obtaining the data maintenance parameter corresponding to the data maintenance request and writing the data maintenance parameter into the parameterized data maintenance script, generating a target data maintenance script, comprises:
generating and displaying a parameter input interface corresponding to the parameterized data maintenance script;
responding to the input operation of a user to a parameter editing box in the parameter input interface, and acquiring data maintenance parameters;
and writing each data maintenance parameter into the parameterized data maintenance script according to the sequence of the parameter editing frame of each data maintenance parameter in the parameter input interface to generate a target data maintenance script.
6. The method of claim 1, wherein prior to executing the target data maintenance script to alter the pending data associated with the data maintenance request, further comprising:
searching a data processing keyword in the target data maintenance script;
reading a data processing statement in which the data processing keyword is located, and generating a backup statement matched with the data processing statement;
and executing the backup statement, backing up the data to be processed in the data table corresponding to the data processing keyword, and adding the backup data and the backup record information into the backup table of the data table.
7. The method according to claim 6, wherein after executing the backup statement, backing up the data to be processed in the data table corresponding to the data processing keyword, and adding the backup data and the backup record information to the backup table of the data table, further comprising:
and recording the association relation between the data maintenance request, the target data maintenance script and the backup table.
8. The method of claim 1, wherein executing the target data maintenance script alters the pending data associated with the data maintenance request, comprising:
executing the target data maintenance script, and generating data statistical information matched with the data to be processed;
generating and displaying data change prompt information according to the data statistical information;
and responding to the triggering operation of the user on the confirmation component in the data change prompt information, and carrying out change processing on the data to be processed.
9. The method as recited in claim 1, further comprising:
acquiring the use frequency of each parameterized data maintenance script;
if a first parameterized data maintenance script with the use frequency being greater than a first threshold value exists, determining a first data maintenance scene corresponding to the first parameterized data maintenance script;
And generating a system function development instruction corresponding to the first data maintenance scene.
10. A data maintenance device, comprising:
the script acquisition module is used for responding to the data maintenance request and acquiring a parameterized data maintenance script matched with the data maintenance request; wherein, different data maintenance scenes correspond to different parameterized data maintenance scripts;
the parameter binding module is used for acquiring the data maintenance parameters corresponding to the data maintenance request, writing the data maintenance parameters into the parameterized data maintenance script and generating a target data maintenance script;
and the data maintenance module is used for executing the target data maintenance script and carrying out change processing on the data to be processed associated with the data maintenance request.
11. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data maintenance method of any one of claims 1-9.
12. A computer readable storage medium storing computer instructions for causing a processor to perform the data maintenance method of any one of claims 1-9.
CN202311540988.6A 2023-11-20 2023-11-20 Data maintenance method, device, equipment and storage medium Pending CN117251196A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311540988.6A CN117251196A (en) 2023-11-20 2023-11-20 Data maintenance method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311540988.6A CN117251196A (en) 2023-11-20 2023-11-20 Data maintenance method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117251196A true CN117251196A (en) 2023-12-19

Family

ID=89126869

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311540988.6A Pending CN117251196A (en) 2023-11-20 2023-11-20 Data maintenance method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117251196A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110704390A (en) * 2019-09-17 2020-01-17 平安科技(深圳)有限公司 Method, device, electronic equipment and medium for obtaining server maintenance script
CN112346775A (en) * 2020-09-21 2021-02-09 杭州数智政通科技有限公司 General index data processing method, electronic device and storage medium
US20210073204A1 (en) * 2018-10-22 2021-03-11 Wangsu Science & Technology Co., Ltd. Method, system, and device for processing operation and maintenance data
CN112685077A (en) * 2020-12-29 2021-04-20 平安普惠企业管理有限公司 Data modification method, system, computer device and computer readable storage medium
CN113572833A (en) * 2021-07-21 2021-10-29 北京百度网讯科技有限公司 Cloud mobile phone maintenance method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210073204A1 (en) * 2018-10-22 2021-03-11 Wangsu Science & Technology Co., Ltd. Method, system, and device for processing operation and maintenance data
CN110704390A (en) * 2019-09-17 2020-01-17 平安科技(深圳)有限公司 Method, device, electronic equipment and medium for obtaining server maintenance script
CN112346775A (en) * 2020-09-21 2021-02-09 杭州数智政通科技有限公司 General index data processing method, electronic device and storage medium
CN112685077A (en) * 2020-12-29 2021-04-20 平安普惠企业管理有限公司 Data modification method, system, computer device and computer readable storage medium
CN113572833A (en) * 2021-07-21 2021-10-29 北京百度网讯科技有限公司 Cloud mobile phone maintenance method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN114445047A (en) Workflow generation method and device, electronic equipment and storage medium
CN116701053B (en) Method, device, equipment and medium for restoring data backup of production environment database
CN114168119B (en) Code file editing method, device, electronic equipment and storage medium
CN116185389A (en) Code generation method and device, electronic equipment and medium
CN116011955A (en) Robot flow automation demand realization method, device, equipment and storage medium
CN116028517A (en) Fusion database system and electronic equipment
CN115328736A (en) Probe deployment method, device, equipment and storage medium
CN117251196A (en) Data maintenance method, device, equipment and storage medium
CN113778849A (en) Method, apparatus, device and storage medium for testing code
CN115859926B (en) Electronic form data relationship processing method and device, electronic equipment and medium
CN114328224A (en) Method and device for reproducing exception request, electronic equipment and storage medium
CN114879947A (en) Method, device, equipment and medium for field configuration
CN117056222A (en) Interface test file generation method and device, electronic equipment and storage medium
CN115618234A (en) Model training method, device, equipment and storage medium
CN115098477A (en) Data standard management method and device for production data of nuclear power station
CN117609055A (en) Data management method, device, electronic equipment and storage medium
CN117632138A (en) Attendance application form analysis method and device, electronic equipment and storage medium
CN116225943A (en) Interactive interface testing method and device, electronic equipment and storage medium
CN115481090A (en) File processing method and device, electronic equipment and storage medium
CN114721964A (en) Automatic generation method, device, equipment and medium of test case
CN117670236A (en) Mobile-terminal-based to-be-handled flow approval method, device, equipment and medium
CN117873990A (en) DDL analysis method, device, equipment and storage medium based on WAL log
CN115983222A (en) EasyExcel-based file data reading method, device, equipment and medium
CN116991825A (en) Database flashback method, device, equipment and storage medium
CN113836291A (en) Data processing method, device, 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