CN109542890B - Data modification method, device, computer equipment and storage medium - Google Patents

Data modification method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN109542890B
CN109542890B CN201811184393.0A CN201811184393A CN109542890B CN 109542890 B CN109542890 B CN 109542890B CN 201811184393 A CN201811184393 A CN 201811184393A CN 109542890 B CN109542890 B CN 109542890B
Authority
CN
China
Prior art keywords
cursor
data
product
index
original
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.)
Active
Application number
CN201811184393.0A
Other languages
Chinese (zh)
Other versions
CN109542890A (en
Inventor
查月阅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811184393.0A priority Critical patent/CN109542890B/en
Publication of CN109542890A publication Critical patent/CN109542890A/en
Application granted granted Critical
Publication of CN109542890B publication Critical patent/CN109542890B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/08Insurance

Abstract

The invention discloses a data modification method, a device, terminal equipment and a storage medium, wherein the method comprises the following steps: obtaining a product data table, wherein the product data table comprises original price data of a product and product information fields; generating an original cursor according to the original price data of the product and the product information field, wherein the original cursor comprises a cursor index; performing traversing operation on the original cursor by adopting a cursor index to obtain cursor data; and carrying out product price logic verification on the product data table by adopting vernier data to obtain a product data table verification result, if the verification result is that the verification is successful, taking the original vernier as a parameter entering vernier of the product data table, generating a target script, and executing the target script to modify the original price data of the product to obtain the target price of the product. According to the data modification method, the data is modified after the cursor is generated on the product data table, so that the data modification efficiency is improved.

Description

Data modification method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data modification method, apparatus, computer device, and storage medium.
Background
With the rapid development of social economy, the business scope of a plurality of products is wider and wider, the processing of product data of the business is also more and more complex, taking the insurance industry as an example, the current insurance organization system is continuously expanded and perfected, and the related insurance processing business is more frequent. The policy modification (i.e., the policy modification in the insurance document) is a very important item in many insurance processing businesses. Modification of the policy data in the policy is often required for various reasons.
In the traditional method, when a user needs to modify the product data of the insurance amount, special staff is required to manually screen the insurance policy, search is performed from each insurance policy corresponding to the insurance claim case of the input system, the insurance policy is manually checked one by one, and then a developer modifies the product data of the insurance amount provided by service staff. However, this manual inspection policy occupies a large amount of human resources, and this method wastes a lot of time and has a high error rate and a high risk when inspecting these product data one by one.
Disclosure of Invention
The embodiment of the invention provides a data modification method, a data modification device, computer equipment and a storage medium, which are used for solving the problem of low data modification efficiency.
A data modification method, comprising:
obtaining a product data table, wherein the product data table comprises product original price data and product information fields;
generating an original cursor according to the original price data of the product and the product information field, wherein the original cursor comprises a cursor index;
performing traversal operation on the original cursor by adopting the cursor index to obtain cursor data;
carrying out product price logic verification on the product data table by adopting the cursor data to obtain a verification result of the product data table;
and if the verification result is that the verification is successful, taking the original cursor as a parameter entering cursor of the product data table, generating a target script, and executing the target script to modify the original price data of the product to obtain the target price of the product.
A data modification apparatus comprising:
the original cursor acquisition module is used for generating an original cursor according to the original price data of the product and the product information field, wherein the original cursor comprises a cursor index;
the cursor data acquisition module is used for performing traversal operation on the original cursor by adopting the cursor index to obtain cursor data;
the product price logic verification module is used for carrying out product price logic verification on the product data table by adopting the cursor data to obtain a verification result of the product data table;
And the product target price acquisition module is used for taking the original cursor as a parameter entering cursor of the product data table if the verification result is that the verification is successful, generating a target script, and executing the target script to modify the product original price data to obtain the product target price.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the data modification method described above when the computer program is executed.
A computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the data modification method described above.
In the data modification method, the data modification device, the computer equipment and the storage medium, the product data table is firstly obtained so as to more conveniently carry out further operation on the product data table. And then generating cursors by using the original price data of the product and the product information fields, and extracting the data set by using the cursor index, so that the data modification operation is performed, the original price data of the product to be modified can be found more flexibly and conveniently, and meanwhile, the data modification operation performed by a user is reflected in the cursors. Then, performing traversing operation on the original cursor by using the cursor index to obtain cursor data so as to facilitate the subsequent processing of the cursor data and accelerate the data processing process. And then, carrying out product price logic verification on the product data table by adopting vernier data to obtain a verification result of the product data table. And finally, if the verification result is that the verification is successful, taking the original cursor as a parameter entering cursor of the product data table, generating a target script, executing the target script to modify the original price data of the product, obtaining the target price of the product, and improving the data modification efficiency.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an application environment of a data modification method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an exemplary method for modifying data according to an embodiment of the present invention;
FIG. 3 is another exemplary diagram of a data modification method provided by an embodiment of the present invention;
FIG. 4 is another exemplary diagram of a data modification method provided by an embodiment of the present invention;
FIG. 5 is another exemplary diagram of a data modification method provided by an embodiment of the present invention;
FIG. 6 is another exemplary diagram of a data modification method according to an embodiment of the present invention
FIG. 7 is a schematic diagram of a data modification apparatus according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The data modification method provided by the application can be applied to an application environment as shown in fig. 1, wherein a client communicates with a server through a network, the server receives a product data table sent by the client, generates an original cursor according to product original price data and product information fields in the product data table, then carries out traversal query operation on the original cursor to obtain cursor data, further verifies the cursor data, and modifies the product original price data in the product data table after verification is passed to obtain a product target price. The clients may be, but are not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server may be implemented by a stand-alone server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, the method is applied to the server in fig. 1, and the method includes the following steps:
s10: a product data table is obtained, wherein the product data table comprises product original price data and product information fields.
The product data table refers to a data table composed of data related to products, and the product data table comprises original price data of the products and product information fields. It will be appreciated that the product data table in this embodiment belongs to the data table of the database category. The product price data refers to the data in the product data table which needs to be modified, and is usually data related to the amount of money in the product data table. The product information field refers to a data item in a product data table for identifying attribute data of a product, such as: product number, order number, or product type, etc.
Illustratively, the product data table is a policy data table, the original price data of the product in the policy data table may be the insurance amount of a dangerous type (such as a car insurance), and the product information field may be a "policy number" field or a "dangerous type number" field. The product data table is used to manage information for counting products. And the operations such as inquiring or counting the product data are convenient for developers and the like. Specifically, the obtaining mode of the product data table may be a method of operating an SQL statement to perform data query, or an external importing method, that is, a method of importing the parsed page document element into the data table, or a method of manually creating. Preferably, the product data table is acquired from an external import method in this embodiment.
In this embodiment, a product data table is acquired, the product data table is stored in a temporary memory, and product raw price data and product information fields of the product data table are stored in a list manner. For subsequent further manipulation of the product data table.
S20: and generating an original cursor according to the original price data of the product and the product information field, wherein the original cursor comprises a cursor index.
Wherein a cursor (cursor) is a collection of data in a database, providing a flexible means of manipulating the data retrieved from the table. The cursor consists of a result set (which may be zero, one or multiple records retrieved by the associated select statement) and a cursor index in the result set pointing to a particular record. Specifically, the original cursors refer to a result set corresponding to original price data of a product, and a combination of cursor indexes of the result set corresponding to the product information field pointing to the original price data of the product.
The cursor index (index) is a pointer pointing to a data value of a specified product information field stored in the product data table, and is used for finding cursor content corresponding to the cursor index and product original price data corresponding to the cursor content according to the cursor index. The SQL statement corresponding to the product data table is made to execute faster, thereby quickly accessing specific information (e.g., product price data) in the product data table.
In this embodiment, the original cursor is generated by the original price data of the product and the product information field, and then the data set is extracted by the cursor index, so that the data modification operation is performed, so that the management and maintenance personnel of the product information system can find the original price data of the product to be modified more flexibly and conveniently, and the data modification operation performed by the user is reflected in the original cursor.
It should be noted that, when there are original cursors corresponding to a plurality of product information fields, the original cursors corresponding to the plurality of product information fields may be spliced by a unit function in the SQL statement, and examples are as follows:
the parameter c_parameters is the name of the original cursor, the parameter dual is the name of the product data table, the parameter p_poliyNo is indicated as the product information field, and the parameter p_old_current is indicated as the product original price data. It can be understood that the original cursors are scattered to influence the processing process of the product data table by splicing the units.
S30: and performing traversing operation on the original cursor by adopting the cursor index to obtain cursor data.
The Traversal (Traversal) refers to accessing all information in the original cursor, namely sequentially accessing original price data of each product in the product data table once. Traversing means include, but are not limited to: preamble traversal, midamble traversal, and postamble traversal, etc. Preferably, the traversal method used in the present embodiment is preamble traversal.
The cursor data is data obtained by inquiring and screening data corresponding to the cursor index, and is used for processing original price data of a plurality of products at the same time, so that the process of data modification is quickened.
It should be noted that, the data corresponding to the cursor index may be set according to actual needs, which is not limited herein. For example, the data corresponding to the cursor index may be a product variety (e.g. car insurance) or product original price data (e.g. insurance).
In this embodiment, the original cursor is traversed by using the cursor index to obtain the cursor data, so that the data processing process is accelerated by processing the cursor data later.
S40: and carrying out product price logic verification on the product data table by adopting vernier data to obtain a verification result of the product data table.
The product price logic refers to the logic of the quantity relation among cursor data and is used for verifying the cursor data. In one embodiment, the product price logic refers to the sum of the product price data and the total number of product information fields satisfying the equation: logic of the condition "sum of product price data=sum of product price data of product information fields". The verification result is a result obtained after the product price logic verification is performed on the product data table by adopting vernier data, and comprises verification results of verification success and verification failure. That is, when the equation is established, the verification result is verification passing, and when the equation is not established, the verification result is verification failure.
In this embodiment, when the verification result is that the verification fails, the second confirmation may be performed by the client, and then the verification result is returned. And feeding back the original price data of the product which does not accord with the price logic of the product to the client, processing the original price data of the product and uploading the processed original price data to the server again.
It can be understood that the verification operation in this step is a logic verification of the price of the product, if the price logic verification is performed on the original price data of each product in turn, a lot of time is necessarily consumed, and by performing the logic verification on the cursor data, only one verification is required, so that the verification time is greatly saved, and the efficiency of subsequent data modification is improved.
S50: and if the verification result is that the verification is successful, taking the original cursor as a parameter entering cursor of the product data table, generating a target script, and executing the target script to modify the original price data of the product to obtain the target price of the product.
The parameter-entering cursor refers to an incoming parameter of the product data table, and the incoming parameter can be stored in a cache form or stored in a database. Specifically, the reference cursor is the original cursor in this embodiment.
A script refers to a collection of statements used to create a database object. For example, store Procedure, transaction, index, trigger, function, etc. are all a script. Specifically, the target script in this embodiment is generated by using the original cursor as the parameter entering cursor of the product data table, so that the data access efficiency can be improved, and related data processing can be performed.
In a specific embodiment, taking the policy data table in step S10 as an example, the target script refers to a modification function of the policy data table, specifically, a modification function of the policy in the policy data table, that is, an update statement of the database, such as:
UPDATE ec_good SET click_count "= 'click_count" +1WHERE (' ec_id "= '(ID number)').
Specifically, according to the field in the parameter entering cursor, a corresponding product data table is obtained from the parameter entering cursor, a target script corresponding to the original price data of the product data table is executed, and after the target script is executed, the original price data of the product is modified, so that the target price of the product is obtained.
It can be understood that on the premise that the cursor data passes through the product price logic verification, the correctness of the cursor data is ensured, so that a correct target script is provided, and therefore, for the modification of the original price data of the product, only the normal filling of the parameter-entering cursor is ensured, and the data modification efficiency is improved.
In this embodiment, the product data table is first obtained, so that further operations can be more conveniently performed on the product data table. And then generating cursors by using the original price data of the product and the product information fields, and extracting the data set by using the cursor index, so that the data modification operation is performed, the original price data of the product to be modified can be found more flexibly and conveniently, and meanwhile, the data modification operation performed by a user is reflected in the cursors. Then, performing traversing operation on the original cursor by using the cursor index to obtain cursor data so as to facilitate the subsequent processing of the cursor data and accelerate the data processing process. And then, carrying out product price logic verification on the product data table by adopting vernier data to obtain a verification result of the product data table. And finally, if the verification result is that the verification is successful, taking the original cursor as a parameter entering cursor of the product data table, generating a target script, executing the target script to modify the original price data of the product, obtaining the target price of the product, and improving the data modification efficiency.
In one embodiment, as shown in fig. 3, in step S30, performing a traversing operation on an original cursor by using a cursor index to obtain cursor data includes:
s31: and sorting the cursor indexes according to the sequence of the cursor indexes from big to small, and storing the sorting result into an index set to obtain an index sequence containing n cursor indexes, wherein n is the total number of the cursor indexes.
Specifically, the cursor indexes are ordered according to the order of the cursor indexes from the big value to the small value, and the ordering result is stored in the index set, so that an index sequence containing n cursor indexes is obtained, the total number n of the cursor indexes is determined according to the actual situation, and the method is not particularly limited.
For example, four cursor indexes a1, a2, a3 and a4 are obtained, the value of a1 is 62532, the value of a2 is 62536, the value of a3 is 62500, the value of a4 is 62534, and the four cursor indexes are sorted from the big to the small in order of values 62536, 62534, 62532 and 62500, so that an index sequence { a2, a4, a1, a3} which contains 4 cursor indexes and is sorted according to the values of the cursor indexes is obtained.
S32: the first cursor index in the index sequence is obtained as the current index.
The current index is an index for participating in database query, and the cursor content corresponding to the current index can be obtained according to the current index for querying the original cursor. Specifically, from the index sequence acquired in step S31, the first cursor index is selected as the current index.
Taking the index sequence { a2, a4, a1, a3} obtained in step S31 as an example, the first cursor index a2in the index sequence is selected as the current index.
S33: and executing query operation on the original cursor according to the current index by using a preset cursor function to obtain cursor content corresponding to the current index.
The preset cursor function may be a FETCH function, or may be another cursor function used for cursor content query extraction, which is not specifically limited herein.
For example, the data content of the cursor index a2 is extracted using the statement "FETCH a2INTO record variable", which is the data content that needs to be extracted.
Specifically, by using a preset cursor function, according to the current index, a query operation is performed on the original cursor, so as to obtain the cursor content corresponding to the current index.
S34: and acquiring the next cursor index of the current index in the index set according to the sequence of the cursor index values from large to small, determining the next cursor index as the current index, returning to execute the operation of using the preset cursor function, and executing the query operation on the original cursor according to the current index to obtain the cursor content corresponding to the current index until the cursor content corresponding to each cursor index in the index set is acquired.
Specifically, after obtaining the cursor content corresponding to the current index, the cursor content corresponding to other cursor indexes needs to be obtained, in this embodiment, the next cursor index of the current index is determined as a new current index according to the order of the cursor index value in the index set from large to small, and the step of returning to step S33 is performed, and the query operation is continued until the cursor content corresponding to each cursor index in the index set is obtained.
Continuing taking the example of step S32 as an example, in the example of step S32, the current index is a2, after the query operation of step S33, the cursor content corresponding to a2 is obtained, then the next cursor index a4 of a2 is selected as the current index, and the query operation is returned to step S33 to execute, in this way, until all the 4 cursor indexes in the index sequences { a2, a4, a1, a3} obtain the corresponding cursor content, and the query operation is terminated.
S35: and determining the cursor content corresponding to each cursor index as cursor data.
Specifically, the cursor content corresponding to each obtained cursor index is determined as cursor data, and the cursor data is a set of cursor contents.
In this embodiment, the cursor indexes are ordered according to the order of the cursor index values from large to small, the ordering result is stored in the index set, an index sequence including n cursor indexes is obtained, the first cursor index in the index sequence is obtained and used as the current index, then a preset cursor function is used to perform query operation on the original cursor according to the current index, the cursor content corresponding to the current index is obtained, then the next cursor index of the current index is obtained in the index set according to the order of the cursor index values from large to small, the current index is determined, the query is continuously performed according to the query method until the cursor content corresponding to each cursor index in the index set is obtained, the combination of the cursor contents corresponding to each obtained cursor index is determined as the cursor data, and the efficiency of traversing the original cursor for query is improved.
In one embodiment, the product information field includes product variety data and product first side data, and the cursor data is specifically:
the product information field comprises product variety data and product first side data, and the cursor data comprises first cursor data C 1 Second cursor data C 2 And third cursor data C 3 Wherein the first cursor data C 1 Refers to each productProduct price data corresponding to the product variety data, second cursor data C 2 Refers to the sum of the original price data of the products corresponding to each product variety data, and the third cursor data C 3 Refers to the sum of the first data of the products corresponding to each product variety data, and C 1 、C 2 And C 3 Are all positive integers.
The product variety data refers to data related to the product variety, such as car insurance or unexpected health insurance in a policy data sheet. The first party data is the amount (share) of a certain product variety in the product data table, such as the number of insurance applicant (first party) participating in the insurance policy data table, and the cursor data comprises first cursor data C 1 Second cursor data C 2 And third cursor data C 3 Wherein the first cursor data C 1 Refers to the original price data of the product corresponding to each product variety data, and the second cursor data C 2 Refers to the sum of the original price data of the products corresponding to each product variety data, and the third cursor data C 3 The sum of the first party data of the products corresponding to each product variety data is referred. Taking the policy data table in step S10 as an example, the first cursor data C 1 The original price data of each product variety data is the insurance amount of the insurance policy data table, and the second cursor data C 2 The sum of the original price data of each product variety data is the total insurance corresponding to the same risk, and the third cursor data C 3 The sum of the first party data of the products corresponding to each product variety data is the sum of the number of the insured life.
In this embodiment, cursor data is used to facilitate the subsequent logical verification operation by the cursor data.
In one embodiment, as shown in fig. 4, in step S40, the product price logic verification is performed on the product data table by using the cursor data, so as to obtain a verification result of the product data table, which includes:
s41: using first cursor data C 1 Second cursor data C 2 And third cursor data C 3 Validating equation C 2 =C 1 *C 3 Whether or not it is.
Wherein equation C 2 =C 1 *C 3 The sum of the original price data of each product variety data is required to satisfy the relation of the product of the original price data of each product variety data and the sum of the first party data of each product variety data, namely the original price data of the product in the product data table can be correctly modified under the condition of satisfying the equation.
Specifically, first cursor data C is used 1 Second cursor data C 2 And third cursor data C 3 Go through verification equation C 2 =C 1 *C 3 Whether or not to be true, thereby according to the first cursor data C 1 Second cursor data C 2 And third cursor data C 3 Subsequent data modifications are made.
S42: if equation C 2 =C 1 *C 3 If not, the verification result is verification failure.
Specifically, continuing to take the policy data table in step S10 as an example, the equation is verified by the product price logic: the total insurance corresponding to the same risk is verified by the number of insured persons, i.e. the data expression of the equation is C 2 =C 1 *C 3 Inquiring whether the total insurance corresponding to the same risk exists or not according to the insurance policy number or the risk number of the insurance policy data table, if not, namely the total insurance policy value corresponding to the same risk in the equation is zero, and obviously, the equation is not established, so that the verification result is verification failure. It can be understood that the total insurance corresponding to the same risk obtains the insurance data corresponding to each risk by traversing the original cursor. I.e. the corresponding insurance amount of the same dangerous seed is accumulated in the traversal process.
If the total insurance corresponding to the same risk is inquired, inquiring whether at least one insured person exists in the insurance policy data table, if not, namely the number of the insured persons in the equation is zero, and obviously, the equation is not established, so that the verification result is verification failure.
It should be noted that, the policy number or the risk number of the policy data table inquires that the total policy corresponding to the same risk exists, i.e. the total policy is not zero, and the policy data table is thatIf at least one insured person exists, i.e. the number of insured persons is not zero, if equation C is not satisfied 2 =C 1 *C 3 C, i.e 2 ≠C 1 *C 3 And the verification result is verification failure.
S43: if equation C 2 =C 1 *C 3 If so, the verification result is that the verification is successful.
If the total insurance and the number of insured persons corresponding to the same risk are inquired, verifying an equation through insurance logic: the total insurance corresponding to the same risk is verified by the number of insured persons, i.e. the data expression of the equation is C 2 =C 1 *C 3 When the equation is established, the verification result is successful.
In the present embodiment, by the pair equation C 2 =C 1 *C 3 And judging, so as to realize the logic verification of the product price of the product data table, thereby ensuring that the original price data of the product is modified after the logic verification and improving the accuracy of data modification.
In one embodiment, as shown in fig. 5, in step S10, a product data table is obtained, including:
s11: and analyzing the xml configuration document in the service system to obtain document elements.
Wherein the service system is a system for performing actual service processing. Such as an insurance system for handling insurance-related services. xml refers to an extensible markup language, is a general data exchange format, and is used for structuring, storing and transmitting information, and the xml configuration document in the embodiment refers to the xml format product data obtained from a page after a business person fills out original price data and product information fields of the product in the product data table.
Wherein parsing refers to the process of converting an xml configuration document into structured data, since in this embodiment, an xml document is converted into a data table of a database, document elements are required in order to obtain fields and attributes of the data table. In this embodiment, a file object model (Document Object Model, DOM) is used to parse xml data into a tree in the memory, and xml is operated by operating on the tree to obtain document elements. Specifically, the parser of the DOM reads the entire document at a time, and stores all elements in the document in a tree structure in memory. Thus, the content and structure of the document can be read or modified using different functions provided by the DOM, and the modified content can also be written to the xml file.
In this embodiment, it should be noted that, since the product data is obtained from the xml file in which the product data is filled by the service person, it is understood that the product data table seen by the operator is in xml format.
S12: and separating the document elements according to the structure of the elements to obtain a first-stage element and a second-stage element.
Where the first level element refers to the type of data and the second level element refers to the size of the data, for example, an xml document element with an id (01, 02, 03), then id is the first level element and (01, 02, 03) is the second level element. The structure of an element refers to the structure of the element in the data table of the database, for example, the first level element in the present embodiment corresponds to the product information field in the product data table, and the second level element corresponds to the product price data in the product data table. Specifically, element separation is performed on the document elements obtained in step S11 according to the structure of the elements, so as to obtain first-level elements and second-level elements.
S13: and combining the first-level element and the second-level element to obtain a product data table.
In this embodiment, combining the first-level element and the second-level element refers to combining the first-level element as a field and the second-level element as a corresponding field element, so as to obtain a product data table. It can be appreciated that after the product data table is obtained, the original price data of the product can be obtained through SQL query sentences.
In this embodiment, document elements are obtained by analyzing xml configuration documents in a service system, the document elements are separated according to the structure of the elements to obtain first-level elements and second-level elements, and finally the first-level elements and the second-level elements are combined to obtain a product data table, so that the product original price data and the product information fields can be queried and counted through the product data table.
In one embodiment, as shown in fig. 6, after the step of executing the target script to modify the original price field of the product to obtain the target price of the product, the data modification method further includes:
s61: and verifying the target price of the product according to the preset regular expression, and if the target price of the product is matched with the preset regular expression, passing the verification and acquiring the target price of the product.
The preset regular expression may be a regular expression for searching for repeated data, or may be another regular expression for verifying data in the data table, which is not specifically limited herein.
Specifically, connection to a database is established, after data of a target price is obtained by adopting SQL search sentences, the data and the target price in a product data information table stored in a server in advance are verified through a preset regular expression, and when the data of the target price is queried, namely the target price of the product is matched with the preset regular expression, the original price data of the product is correctly modified. By verifying the target price of the product, the accuracy of data modification is further improved.
S62: if the target price of the product is not matched with the preset regular expression, verification is not passed, and the target price of the product is sent to the client for verification.
Specifically, verifying the data and a target price in a product data information table stored in a server in advance through a preset regular expression, and when the target price data is not queried, namely the target price of the product is not matched with the preset regular expression, indicating that the original price data of the product is modified incorrectly, namely the target price of the product is not verified.
In this embodiment, when the verification result is that the verification is not passed, the second verification may be performed by the client to modify the second verification, and then the second verification is performed. And feeding back the verified target price which does not pass through the product to the client, processing the target price of the product, and uploading the processed target price of the product to the server again. Ensuring the accuracy of data modification.
In the embodiment, the target price of the product is verified according to the preset regular expression, so that the accuracy of data modification is further improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
In an embodiment, a data modification apparatus is provided, which corresponds to the data modification method in the above embodiment one by one. As shown in fig. 7, the data modification apparatus includes a product data table acquisition module 10, an original cursor acquisition module 20, a cursor data acquisition module 30, a product price logic verification module 40, and a product target price acquisition module 50. The functional modules are described in detail as follows:
A product data table acquisition module 10, configured to acquire a product data table, where the product data table includes product original price data and product information fields;
the original cursor obtaining module 20 is configured to generate an original cursor according to the original price data of the product and the product information field, where the original cursor includes a cursor index;
the cursor data acquisition module 30 is configured to perform a traversing operation on the original cursor by using the cursor index to obtain cursor data;
the product price logic verification module 40 is configured to perform product price logic verification on the product data table by using vernier data to obtain a verification result of the product data table;
and the product target price acquisition module 50 is used for taking the original cursor as a parameter entering cursor of the product data table if the verification result is that the verification is successful, generating a target script, and executing the target script to modify the original price data of the product to obtain the product target price.
Specifically, the cursor data acquisition module 30 includes an index sequence acquisition unit 31, a current index acquisition unit 32, a cursor content acquisition unit 33, an entire cursor content acquisition unit 34, and a cursor data acquisition unit 35.
Specifically, the cursor data acquisition module 30 further includes an index sequence acquisition unit 31, a current index acquisition unit 32, a cursor content acquisition unit 33, an entire cursor content acquisition unit 34, and a cursor data acquisition unit 35.
An index sequence obtaining unit 31, configured to sort the cursor indexes according to the order of the cursor indexes from large to small, and store the sorting result into the index set, so as to obtain an index sequence containing n cursor indexes, where n is the total number of cursor indexes;
a current index obtaining unit 32, configured to obtain a first cursor index in the index sequence as a current index;
a cursor content obtaining unit 33, configured to perform a query operation on the original cursor according to the current index by using a preset cursor function, so as to obtain a cursor content corresponding to the current index;
the whole cursor content obtaining unit 34 is configured to obtain, in the index set, a next cursor index of the current index according to the order of the cursor index from the large value to the small value, determine the next cursor index as the current index, and return to execute the operation of using the preset cursor function, and execute the query operation on the original cursor according to the current index, so as to obtain the cursor content corresponding to the current index, until the cursor content corresponding to each cursor index in the index set is obtained;
the cursor data obtaining unit 35 is configured to determine the cursor content corresponding to each cursor index as cursor data.
Specifically, the product information field includes product variety data and product first party data, and the cursor data includes first cursor data C 1 Second cursor data C 2 And third cursor data C 3 Wherein the first cursor data C 1 Refers to the original price data of the product corresponding to each product variety data, and the second cursor data C 2 Refers to the sum of the original price data of the products corresponding to each product variety data, and the third cursor data C 3 Refers to the sum of the first data of the products corresponding to each product variety data, and C 1 、C 2 And C 3 Are all positive integers.
Specifically, the product price logic verification module 40 includes an equation verification unit, a first verification result acquisition unit, and a second verification result acquisition unit.
An equation verification unit for using the first cursor data C 1 Second cursor data C 2 And third cursor data C 3 Validating equation C 2 =C 1 *C 3 Whether or not to establish;
a first verification result acquisition unit for determining the following equation C 2 =C 1 *C 3 If not, the verification result is verification failure;
a second verification result acquisition unit for determining if equation C 2 =C 1 *C 3 If so, the verification result is that the verification is successful.
Specifically, the product data table acquisition module 10 includes a document element acquisition unit, a document element separation unit, and a product data table acquisition unit.
The document element acquisition unit is used for analyzing the xml configuration document in the service system to obtain a document element;
The document element separation unit is used for separating the document elements according to the structure of the elements to obtain first-stage elements and second-stage elements;
and the product data table acquisition unit is used for combining the first-stage elements and the second-stage elements to obtain a product data table.
Specifically, the data modification device further comprises a first verification result acquisition module and a second verification result acquisition module.
The first verification result acquisition module is used for verifying the target price of the product according to a preset regular expression, and if the target price of the product is matched with the preset regular expression, the verification is passed and the target price of the product is acquired;
and the second verification result acquisition module is used for verifying that the product target price is not passed if the product target price is not matched with the preset regular expression, and sending the product target price to the client for auditing.
For specific limitations of the data modification apparatus, reference may be made to the above limitation of the data modification method, and no further description is given here. The respective modules in the above-described data modification apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 8. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing a product data table. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a data modification method.
In one embodiment, a computer device is provided that includes a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the data modification method of the above embodiments when executing the computer program, such as steps S10 to S50 shown in fig. 2. Alternatively, the processor, when executing the computer program, implements the functions of the modules/units of the data modification apparatus of the above embodiment, such as the modules 10 to 50 shown in fig. 7. In order to avoid repetition, a description thereof is omitted.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, where the computer program when executed by a processor implements the steps of the method for modifying data in the foregoing embodiment, or where the computer program when executed by a processor implements the steps of the method for modifying data in the foregoing embodiment, which are not repeated herein.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions.
The above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (7)

1. A data modification method, characterized in that the data modification method comprises:
obtaining a product data table, wherein the product data table comprises product original price data and product information fields;
Generating an original cursor according to the original price data of the product and the product information field, wherein the original cursor comprises a cursor index;
performing traversal operation on the original cursor by adopting the cursor index to obtain cursor data;
carrying out product price logic verification on the product data table by adopting the cursor data to obtain a verification result of the product data table;
if the verification result is that the verification is successful, the original cursor is used as a parameter entering cursor of the product data table, a target script is generated, and the target script is executed to modify the original price data of the product, so that the target price of the product is obtained;
the step of performing a traversing operation on the original cursor by using the cursor index to obtain cursor data includes:
sorting the cursor indexes according to the sequence of the cursor indexes from big to small, and storing the sorting result into an index set to obtain an index sequence containing n cursor indexes, wherein n is the total number of the cursor indexes;
acquiring a first vernier index in the index sequence as a current index;
using a preset cursor function, and executing query operation on the original cursor according to the current index to obtain cursor content corresponding to the current index;
Acquiring a next cursor index of a current index in an index set according to the sequence of the cursor index values from large to small, determining the next cursor index as the current index, returning to execute the cursor function preset by the user, and executing query operation on the original cursor according to the current index to obtain cursor contents corresponding to the current index until the cursor contents corresponding to each cursor index in the index set are acquired;
determining the cursor content corresponding to each cursor index as the cursor data;
wherein the product information field comprises product variety data and product first party data, and the cursor data comprises first cursor data C 1 Second cursor data C 2 And third cursor data C 3 Wherein the first cursor data C 1 Refers to the original price data of the product corresponding to each product variety data, and the second cursor data C 2 Refers to the sum of the original price data of the products corresponding to each product variety data, and the third cursor data C 3 Refers to the sum of the first party data of the products corresponding to each product variety data, and C 1 、C 2 And C 3 Are all positive integers;
the step of verifying the product price logic of the product data table by adopting the cursor data to obtain a verification result of the product data table comprises the following steps:
Using the first cursor data C 1 Said second cursor data C 2 And the third cursor data C 3 Validating equation C 2 =C 1 *C 3 Whether or not to establish;
if equation C 2 =C 1 *C 3 If not, the verification result is verification failure;
if equation C 2 =C 1 *C 3 And if so, the verification result is that verification is successful.
2. The data modification method of claim 1, wherein the obtaining a product data table comprises:
analyzing an xml configuration document in a service system to obtain document elements;
separating the document elements according to the structure of the elements to obtain first-stage elements and second-stage elements;
and combining the first-level element and the second-level element to obtain the product data table.
3. The data modification method according to claim 1, wherein after the step of executing the target script to modify the product price data to obtain a product target price, the data modification method further comprises:
verifying the target price of the product according to a preset regular expression, if the target price of the product is matched with the preset regular expression, passing the verification, and acquiring the target price of the product;
if the target price of the product is not matched with the preset regular expression, verification is not passed, and the target price of the product is sent to a client for auditing.
4. A data modification apparatus, the data modification apparatus comprising:
the product data table acquisition module is used for acquiring a product data table, wherein the product data table comprises product original price data and product information fields;
the original cursor acquisition module is used for generating an original cursor according to the original price data of the product and the product information field, wherein the original cursor comprises a cursor index;
the cursor data acquisition module is used for performing traversal operation on the original cursor by adopting the cursor index to obtain cursor data;
the product price logic verification module is used for carrying out product price logic verification on the product data table by adopting the cursor data to obtain a verification result of the product data table;
the product target price acquisition module is used for taking the original cursor as a parameter entering cursor of the product data table if the verification result is that the verification is successful, generating a target script, and executing the target script to modify the product original price data to obtain a product target price;
the data modification means being for implementing the method of claim 1.
5. The data modification apparatus of claim 4, wherein the cursor data acquisition module comprises:
The index sequence acquisition unit is used for sequencing the cursor indexes according to the sequence of the cursor indexes from big to small, and storing the sequencing result into an index set to obtain an index sequence containing n cursor indexes, wherein n is the total number of the cursor indexes;
the current index obtaining unit is used for obtaining a first vernier index in the index sequence to serve as a current index;
the cursor content acquisition unit is used for executing query operation on the original cursor according to the current index by using a preset cursor function to obtain cursor content corresponding to the current index;
the whole cursor content acquisition unit is used for acquiring the next cursor index of the current index in the index set according to the sequence from the large value to the small value of the cursor index, determining the next cursor index as the current index, returning to execute the cursor function preset by the user, and executing query operation on the original cursor according to the current index to obtain the cursor content corresponding to the current index until the cursor content corresponding to each cursor index in the index set is acquired;
and the cursor data acquisition unit is used for determining the cursor content corresponding to each cursor index as the cursor data.
6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the data modification method according to any of claims 1 to 3 when executing the computer program.
7. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the data modification method according to any one of claims 1 to 3.
CN201811184393.0A 2018-10-11 2018-10-11 Data modification method, device, computer equipment and storage medium Active CN109542890B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811184393.0A CN109542890B (en) 2018-10-11 2018-10-11 Data modification method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811184393.0A CN109542890B (en) 2018-10-11 2018-10-11 Data modification method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109542890A CN109542890A (en) 2019-03-29
CN109542890B true CN109542890B (en) 2024-01-26

Family

ID=65843656

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811184393.0A Active CN109542890B (en) 2018-10-11 2018-10-11 Data modification method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109542890B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110308912A (en) * 2019-06-12 2019-10-08 平安科技(深圳)有限公司 A kind of information processing method and relevant apparatus
CN112581295B (en) * 2020-12-15 2023-09-26 平安养老保险股份有限公司 Product data processing method, device, equipment and medium based on field splitting

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH117586A (en) * 1997-06-18 1999-01-12 Tec Corp Commodity sales data register processing system and commodity unit price changing method in the system
CN1407492A (en) * 2001-09-10 2003-04-02 好利集团有限公司 Point to point price negotiating method and system
CN101639848A (en) * 2009-06-01 2010-02-03 北京四维图新科技股份有限公司 Spatial data engine and method applying management spatial data thereof
CN103314371A (en) * 2010-12-31 2013-09-18 肖岩 Retrieval method and system
CN108108493A (en) * 2018-01-17 2018-06-01 中国平安人寿保险股份有限公司 Algorithm process method, server and storage medium based on the demonstration of MIT interests
CN108427626A (en) * 2018-01-05 2018-08-21 平安科技(深圳)有限公司 Daily record text handling method, device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9779410B2 (en) * 2013-09-09 2017-10-03 Emil Bader Network-implemented methods and systems for providing dynamic product pricing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH117586A (en) * 1997-06-18 1999-01-12 Tec Corp Commodity sales data register processing system and commodity unit price changing method in the system
CN1407492A (en) * 2001-09-10 2003-04-02 好利集团有限公司 Point to point price negotiating method and system
CN101639848A (en) * 2009-06-01 2010-02-03 北京四维图新科技股份有限公司 Spatial data engine and method applying management spatial data thereof
CN103314371A (en) * 2010-12-31 2013-09-18 肖岩 Retrieval method and system
CN108427626A (en) * 2018-01-05 2018-08-21 平安科技(深圳)有限公司 Daily record text handling method, device and storage medium
CN108108493A (en) * 2018-01-17 2018-06-01 中国平安人寿保险股份有限公司 Algorithm process method, server and storage medium based on the demonstration of MIT interests

Also Published As

Publication number Publication date
CN109542890A (en) 2019-03-29

Similar Documents

Publication Publication Date Title
US20230126005A1 (en) Consistent filtering of machine learning data
US20220391763A1 (en) Machine learning service
US11182691B1 (en) Category-based sampling of machine learning data
US10366053B1 (en) Consistent randomized record-level splitting of machine learning data
US10713589B1 (en) Consistent sort-based record-level shuffling of machine learning data
US11100420B2 (en) Input processing for machine learning
US10339465B2 (en) Optimized decision tree based models
US9984428B2 (en) Systems and methods for structuring data from unstructured electronic data files
US9886670B2 (en) Feature processing recipes for machine learning
CA3033859C (en) Method and system for automatically extracting relevant tax terms from forms and instructions
US11341116B2 (en) Techniques for automated data analysis
US11755663B2 (en) Search activity prediction
CN109685668B (en) Order batch processing method, device, computer equipment and storage medium
WO2015065511A1 (en) Method and system for document data extraction template management
CN112286934A (en) Database table importing method, device, equipment and medium
CN109542890B (en) Data modification method, device, computer equipment and storage medium
US9104573B1 (en) Providing relevant diagnostic information using ontology rules
CN112418813A (en) AEO qualification intelligent rating management system and method based on intelligent analysis and identification and storage medium
CN114882965A (en) Single disease type data reporting method, terminal equipment and storage medium
CN113434734A (en) Method, device, equipment and storage medium for generating file and reading file
CN112860722A (en) Data checking method and device, electronic equipment and readable storage medium
CN110858214A (en) Recommendation model training and further auditing program recommendation method, device and equipment
CN113609407B (en) Regional consistency verification method and device
US20210382862A1 (en) Enterprise Data Flow Lineage from Enterprise Data Testing Metadata
CN115495483A (en) Data batch processing method, device, equipment and computer readable 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
GR01 Patent grant
GR01 Patent grant