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

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

Info

Publication number
CN117370281A
CN117370281A CN202311396434.3A CN202311396434A CN117370281A CN 117370281 A CN117370281 A CN 117370281A CN 202311396434 A CN202311396434 A CN 202311396434A CN 117370281 A CN117370281 A CN 117370281A
Authority
CN
China
Prior art keywords
file
user
data
template
file analysis
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
CN202311396434.3A
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.)
Zhongdian Jinxin Software Co Ltd
Original Assignee
Zhongdian Jinxin Software 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 Zhongdian Jinxin Software Co Ltd filed Critical Zhongdian Jinxin Software Co Ltd
Priority to CN202311396434.3A priority Critical patent/CN117370281A/en
Publication of CN117370281A publication Critical patent/CN117370281A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present application relates to a data maintenance method, apparatus, computer device, storage medium and computer program product. The method comprises the following steps: acquiring a file to be analyzed, and determining a target file analysis template corresponding to the format of the file to be analyzed in a file analysis template set; the file analysis template set comprises a plurality of file analysis templates in different formats; reading user data of each row of users in the file to be analyzed according to rows, and analyzing the user data according to the target file analysis template; and establishing a mapping relation between the user data and the data to be maintained after analysis through the user entity class, and maintaining the data to be maintained based on the mapping relation. By adopting the method, the efficiency of the data maintenance method can be improved.

Description

Data maintenance method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing technology, and in particular, to a data maintenance method, apparatus, computer device, storage medium, and computer program product.
Background
With the development of data processing technology, the demand of data maintenance is higher and higher, and a data maintenance technology appears, so that the data of a user can be rapidly maintained through the data maintenance technology, and the correctness and reliability of the data of the user are ensured.
Current data maintenance methods generally update user data in a batch file. Specifically, for each file, a file analysis interface corresponding to the file is called, and the data of each user in the file is analyzed through the file analysis service of the file analysis interface, so that the analysis data of each user is obtained. User data of the client is then maintained based on the parsed data.
However, in the current data maintenance method, the number of files is huge, and file analysis services corresponding to different file analysis interfaces need to be called to analyze the files. When the file analysis service corresponding to the file does not exist, the file analysis service needs to be written immediately, the writing time is long, the scene response is slow, and the efficiency of the data maintenance method is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a data maintenance method, apparatus, computer device, computer readable storage medium, and computer program product.
In a first aspect, the present application provides a data maintenance method, including:
acquiring a file to be analyzed, and determining a target file analysis template corresponding to the format of the file to be analyzed in a file analysis template set; the file analysis template set comprises a plurality of file analysis templates in different formats;
reading user data of each row of users in the file to be analyzed according to rows, and analyzing the user data according to the target file analysis template;
and establishing a mapping relation between the user data and the data to be maintained after analysis through the user entity class, and maintaining the data to be maintained based on the mapping relation.
In one embodiment, before the file to be parsed is obtained, the method further includes:
responding to the input operation of the template configuration information, and displaying an initial file analysis template containing the configuration information;
responding to the generation operation of the initial file analysis template to construct a file analysis template;
and constructing a file analysis template set based on each file analysis template.
In one embodiment, the template configuration information includes a segmentation condition and a field identifier, and the presenting an initial file parsing template including configuration information in response to an input operation of the template configuration information includes:
responding to a request of newly-built file analysis templates, and displaying initial file analysis templates; the initial file analysis template comprises initial segmentation conditions and initial field identifiers;
and responding to the input operation of the segmentation condition and the field identification, and displaying an initial file analysis template containing the segmentation condition and the field identification.
In one embodiment, the determining, in the file parsing template set, a target file parsing template corresponding to the format of the file to be parsed includes:
determining keywords of the query according to the content in the file to be analyzed;
determining an initial file analysis template set containing the keywords in the file analysis template set based on the keywords;
and determining a target template identifier corresponding to the format of the file to be analyzed according to the template identifier of each file analysis template in the initial file analysis template set, and determining a target file analysis template corresponding to the target template identifier.
In one embodiment, the parsing the user data according to the target file parsing template includes:
traversing the user data of the user aiming at each segmentation condition in the target file analysis template set, and judging whether the user data meets the segmentation conditions or not;
dividing the user data based on the dividing conditions under the condition that the user data meets the dividing conditions, so as to obtain the divided user data;
and determining a target field corresponding to the segmented user data according to the field identification corresponding to the segmentation condition.
In one embodiment, the parsed user data includes data of each target field of the user, the mapping relationship between the parsed user data and the data to be maintained is established through a user entity class, and the data to be maintained is maintained based on the mapping relationship, including:
assigning the data of each target field of the user to the user entity class according to the mapping relation between the user entity class and each target field of the user to obtain the user entity class of the user; the user entity class contains the full field of the user;
transmitting the user entity class of the user as a parameter to a user information maintenance micro-service;
and maintaining the data to be maintained through the user information maintenance micro service and the mapping relation between each field in the user entity class of the user and the data to be maintained.
In a second aspect, the present application further provides a data maintenance apparatus, including:
the determining module is used for acquiring the file to be analyzed, and determining a target file analysis template corresponding to the format of the file to be analyzed in the file analysis template set; the file analysis template set comprises a plurality of file analysis templates in different formats;
the analysis module is used for reading the user data of each row of users in the file to be analyzed according to the row, and analyzing the user data according to the target file analysis template;
and the maintenance module is used for establishing the mapping relation between the user data and the data to be maintained after analysis through the user entity class, and maintaining the data to be maintained based on the mapping relation.
In a third aspect, the present application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a file to be analyzed, and determining a target file analysis template corresponding to the format of the file to be analyzed in a file analysis template set; the file analysis template set comprises a plurality of file analysis templates in different formats;
reading user data of each row of users in the file to be analyzed according to rows, and analyzing the user data according to the target file analysis template;
and establishing a mapping relation between the user data and the data to be maintained after analysis through the user entity class, and maintaining the data to be maintained based on the mapping relation.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring a file to be analyzed, and determining a target file analysis template corresponding to the format of the file to be analyzed in a file analysis template set; the file analysis template set comprises a plurality of file analysis templates in different formats;
reading user data of each row of users in the file to be analyzed according to rows, and analyzing the user data according to the target file analysis template;
and establishing a mapping relation between the user data and the data to be maintained after analysis through the user entity class, and maintaining the data to be maintained based on the mapping relation.
In a fifth aspect, the present application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of:
acquiring a file to be analyzed, and determining a target file analysis template corresponding to the format of the file to be analyzed in a file analysis template set; the file analysis template set comprises a plurality of file analysis templates in different formats;
reading user data of each row of users in the file to be analyzed according to rows, and analyzing the user data according to the target file analysis template;
and establishing a mapping relation between the user data and the data to be maintained after analysis through the user entity class, and maintaining the data to be maintained based on the mapping relation.
The data maintenance method, the data maintenance device, the computer equipment, the storage medium and the computer program product are used for acquiring the file to be analyzed, and determining a target file analysis template corresponding to the format of the file to be analyzed in a file analysis template set; the file analysis template set comprises a plurality of file analysis templates in different formats; reading user data of each row of users in the file to be analyzed according to rows, and analyzing the user data according to the target file analysis template; and establishing a mapping relation between the user data and the data to be maintained after analysis through the user entity class, and maintaining the data to be maintained based on the mapping relation. By adopting the method, the target file analysis template corresponding to the file is determined in the file analysis template set, the data of each user in the file to be analyzed is analyzed through the target file analysis template, the user data can be rapidly analyzed, the data to be maintained is maintained based on the mapping relation between the analyzed user data and the data to be maintained, and the efficiency of the data maintenance method is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for a person having ordinary skill in the art.
FIG. 1 is a flow diagram of a method of data maintenance in one embodiment;
FIG. 2 is a flow chart of a process for constructing a set of file parsing templates in one embodiment;
FIG. 3 is a flowchart illustrating the steps of parsing an initial file template in one embodiment;
FIG. 4 is a flowchart illustrating a step of determining a target file parsing template in one embodiment;
FIG. 5 is a flow chart illustrating steps for parsing user data in one embodiment;
FIG. 6 is a flow chart of a maintenance procedure in one embodiment;
FIG. 7 is a flow chart of a method of data maintenance in another embodiment;
FIG. 8 is a block diagram of a data maintenance device in one embodiment;
fig. 9 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
In one embodiment, as shown in fig. 1, a data maintenance method is provided, and the embodiment of the present application is described by taking application of the method to a computer device as an example, and the embodiment of the present application does not limit an execution device of the data maintenance method, and includes the following steps 102 to 106:
step 102, obtaining a file to be analyzed, and determining a target file analysis template corresponding to the format of the file to be analyzed in a file analysis template set.
The file analysis templates are concentrated to contain a plurality of file analysis templates with different formats. The file to be parsed contains user data of at least one user. The format of the file to be parsed corresponds to the content of the user data in the file to be parsed.
In an implementation, a computer device obtains a file to be parsed. The computer device determines a format of the file to be parsed based on content of user data in the file to be parsed. Then, the computer equipment determines a target file analysis template corresponding to the format of the file to be analyzed in the file analysis template set.
And 104, reading the user data of each row of users in the file to be analyzed according to the rows, and analyzing the user data according to the target file analysis template.
The file to be analyzed contains at least one line of user data, and each line of user data is the user data of one user. The target file analysis template comprises each segmentation condition and field identifiers corresponding to each segmentation condition.
In an implementation, the computer device reads the user data of each row of users in the file to be parsed according to rows. Then, the computer device parses the user data for each row of user data based on the respective segmentation conditions in the target file parsing template, and determines target fields of the parsed user data.
And step 106, establishing a mapping relation between the parsed user data and the data to be maintained through the user entity class, and maintaining the data to be maintained based on the mapping relation.
In an implementation, the computer device maintains the data to be maintained according to a mapping relationship between the user entity class and the parsed user data and a mapping relationship between the user entity class and the data to be maintained.
In the data maintenance method, the target file analysis template corresponding to the file is determined in the file analysis template set, the data of each user in the file to be analyzed is analyzed through the target file analysis template, the user data can be analyzed rapidly, the data to be maintained is maintained based on the mapping relation between the analyzed user data and the data to be maintained, and the efficiency of the data maintenance method is improved.
In one exemplary embodiment, a set of file parsing templates needs to be established before querying the set of file parsing templates. As shown in fig. 2, the specific processing procedure of the data maintenance method further includes steps 202 to 206. Wherein:
step 202, responding to the input operation of the template configuration information, and displaying an initial file analysis template containing the configuration information.
The initial file analysis template comprises initial configuration information.
In practice, a set of file templates needs to be constructed based on each file parsing template prior to querying the set of file parsing templates. Each file parsing template needs to be constructed before the file parsing template set is constructed. The following is an example of constructing a file parsing template. An initial file analysis template is preset in the computer equipment. The computer device presents an initial file parsing template that contains initial configuration information. The user inputs template configuration information based on the initial configuration information to cause the computer device to obtain an initial file parsing template containing the configuration information. The computer device then exposes an initial file parsing template that contains the configuration information.
Step 204, in response to the generation operation of the initial file parsing template, the file parsing template is constructed.
In an implementation, in the case where the user determines the configuration information, the target user clicks a generate key on a page containing the initial file resolution template, determining that the computer device needs to generate the file resolution template. The computer device constructs a file parsing template based on the configuration information in response to a generating operation of the initial file parsing template.
Step 206, constructing a file analysis template set based on each file analysis template.
In practice, the computer device repeatedly executes steps 202 to 204 to obtain a plurality of file parsing templates. Then, the computer device constructs a file analysis template set according to each file analysis template.
In this embodiment, the file analysis template is constructed by the initial file analysis template including the configuration information, so that the efficiency of constructing the file analysis template is improved, and the file analysis template set is constructed according to each file analysis template, so that the file to be analyzed is conveniently analyzed based on the file analysis template set.
In an exemplary embodiment, the template configuration information contains segmentation conditions and field identifications, and the specific process of step 202 includes steps 302 through 304, as shown in FIG. 3. Wherein:
step 302, responding to a request of newly creating a file analysis template, and displaying an initial file analysis template.
The initial file analysis template comprises initial segmentation conditions and initial field identifiers.
In an implementation, an initial file parsing template is preset in the computer device. And under the condition that the file analysis template needs to be established, the user sends a request for newly establishing the file analysis template to the computer equipment by operating the computer equipment. The computer device responds to the request of the newly built file analysis template and displays the initial file analysis template.
Step 304, in response to the input operation of the segmentation condition and the field identifier, an initial file parsing template containing the segmentation condition and the field identifier is presented.
The initial segmentation condition is an example of a segmentation condition, and the initial field identifier is an example of a field identifier corresponding to the initial segmentation condition. The initial file parsing template contains at least one segmentation condition and a field identification.
In an implementation, a user inputs a segmentation condition based on an initial segmentation condition and inputs a field identification corresponding to the segmentation condition based on an initial field identification. Then, the user continues to input the segmentation conditions and the field identifications until the segmentation conditions and the field identifications in the initial file analysis template meet the file analysis requirement, and the user stops inputting the segmentation conditions and the field identifications, so that the computer equipment obtains the initial file analysis template containing the segmentation conditions and the field identifications. The computer device exposes an initial file parsing template that contains segmentation conditions and field identifications.
In this embodiment, the configuration information is determined based on the initial segmentation condition and the initial field identifier in the initial file analysis template, so that the configuration information can be determined quickly, the subsequent file analysis module construction based on the configuration information is facilitated, and the efficiency of constructing the file analysis template is improved. And by flexibly configuring batch file formats, the method can be suitable for any batch maintenance scene and improves the agility of scene response.
In an exemplary embodiment, as shown in fig. 4, the specific process of determining a target file parsing template corresponding to the format of the file to be parsed in the file parsing template set in step 102 includes steps 402 to 406. Wherein:
step 402, determining keywords of the query according to the content in the file to be parsed.
The file to be analyzed contains user data of at least one user. The keywords contain some or all of the features of the user data.
In implementations, a computer device determines keywords of a query based on user data in a file to be parsed.
In an alternative embodiment, if the user data in the file to be parsed includes a user identification, a user name, and a user phone number. The computer device determines, based on the user data in the file to be parsed, that the keyword of the query may be a name plus a telephone number or a telephone number. The embodiment of the application does not limit the specific content of the keywords.
Step 404, determining an initial set of file parsing templates containing the keywords in the set of file parsing templates based on the keywords.
In an implementation, the computer device queries each initial file parsing template containing a keyword in a set of file parsing templates based on the keywords, resulting in a set of initial file parsing templates.
Step 406, determining a target template identifier corresponding to the format of the file to be parsed according to the template identifiers of the file parsing templates in the initial file parsing template set, and determining a target file parsing template corresponding to the target template identifier.
Wherein the template identifier is the name of the file parsing template. The template identification of the file parsing template is determined based on the field identifications in the file parsing template.
In implementation, the computer device determines, according to the format of the file to be parsed, a target name corresponding to each format of the file to be parsed in the template identification of each file parsing template in the initial file parsing template set. The computer device then determines a target file resolution template corresponding to the target name.
In an alternative embodiment, in the case that the target file parsing template corresponding to the format of the file to be parsed does not exist in the file parsing template set, the computer device performs the steps 202 to 204 described above, to obtain the target file parsing template corresponding to the format of the file to be parsed.
In the embodiment, the initial file analysis template set is determined based on the keywords, and the target file analysis template is determined in the initial file analysis template set, so that the target file analysis template can be obtained quickly, and the efficiency of determining the target file analysis template is improved.
In an exemplary embodiment, as shown in fig. 5, the specific process of parsing the user data according to the target file parsing template in step 104 includes steps 502 to 506. Wherein:
step 502, traversing user data of the user aiming at each segmentation condition in the target file analysis template set, and judging whether the user data meets the segmentation conditions.
In implementation, the computer device parses each segmentation condition in the template for the target file, traverses user data for one user, and determines whether the user data satisfies the segmentation condition.
In step 504, when the user data satisfies the segmentation condition, the user data is segmented based on the segmentation condition, and the segmented user data is obtained.
In an implementation, the computer device segments the user data according to the segmentation conditions to obtain segmented user data when the user data satisfies the segmentation conditions.
Alternatively, the segmentation condition may be a fixed length or a segmenter. I.e. the computer device divides the fields by a fixed length or a segmenter for each row of user data. Each field maps to a table and field of client metadata. The mapping relation forms a file analysis template. The embodiment of the present application does not limit the segmentation conditions.
Step 506, determining the target field corresponding to the segmented user data according to the field identification corresponding to the segmentation condition.
In an implementation, the computer device determines the field identifier as a target field corresponding to the segmented user data according to the field identifier corresponding to the segmentation condition.
In an alternative embodiment, the user data is "2023100901 to three". The segmentation condition is segmentation after the tenth character, and the field identifier corresponding to the segmentation condition is the user identifier. The computer device divides the user data into "2023100901" and "Zhang Sano" based on the division condition. The computer device then determines the user identification as the target field corresponding to "2023100901".
In the embodiment, the data of each user in the file to be analyzed is analyzed through the file analysis template, so that the user data can be analyzed quickly, the analyzed user data can be obtained, the subsequent maintenance of the data to be maintained based on the analyzed user data is facilitated, and the efficiency of the data maintenance method is improved.
In an exemplary embodiment, the parsed user data contains data for each target field of the user, as shown in FIG. 6, and the specific process in step 106 includes steps 602 through 606. Wherein:
step 602, according to the mapping relation between the user entity class and each target field of the user, assigning the data of each target field of the user to the user entity class, so as to obtain the user entity class of the user.
Wherein the user entity class contains the user's full field. The user entity class is a class in Java (a one-door object-oriented programming language).
In implementation, a user entity class is preset in the computer device. And the computer equipment assigns the data of each target field of the user to each corresponding attribute in the user entity class according to the mapping relation between the user entity class and the data of each target field of the user, so as to obtain the user entity class of the user.
Step 604, transmitting the user entity class of the user as a parameter to the user information maintenance micro-service.
In an implementation, a computer device transmits a user entity class of a user as a parameter to a user information maintenance micro-service. The user information maintenance micro-service comprises various functions for maintaining user information.
In step 606, the data to be maintained is maintained by maintaining the mapping relationship between the fields in the micro service and the user entity class of the user and the data to be maintained.
In an implementation, the computer device maintains the data to be maintained through the user information to maintain the mapping relationship between each field in the micro service and the user entity class of the user and the data to be maintained.
In the embodiment, the micro-service batch maintenance service is maintained based on unified user information, so that development work and operation and maintenance work are reduced, and the efficiency of the data maintenance method is improved. And after the file to be analyzed is analyzed, a single maintenance service flow is used, so that the multiplexing of service logic can be realized.
In one exemplary embodiment, FIG. 7 is a flow chart of a method of data maintenance in another embodiment. And loading the file by the computer equipment to obtain the file to be analyzed. Then, the computer device determines a target file parsing template in a preset file parsing template set. And the computer equipment reads the user data of each row of users in the file to be analyzed according to the row by row, and analyzes the user data according to the target file analysis template. The computer device assigns the parsed user data to the business entity. And then, the computer equipment calls a customer maintenance service interface (an interface of the user information maintenance micro-service), takes the assigned business entity as a parameter to be transmitted into the customer information maintenance micro-service, and maintains the customer information (data to be maintained) through the customer information maintenance micro-service and the mapping relation between the assigned business entity and the data to be maintained.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a data maintenance device for realizing the above related data maintenance method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in one or more embodiments of the data maintenance device provided below may refer to the limitation of the data maintenance method hereinabove, and will not be repeated herein.
In one exemplary embodiment, as shown in fig. 8, there is provided a data maintenance apparatus 800 comprising: a determination module 801, a parsing module 802, and a maintenance module 803, wherein:
a determining module 801, configured to obtain a file to be parsed, and determine a target file parsing template corresponding to a format of the file to be parsed in a file parsing template set; the file analysis template set comprises a plurality of file analysis templates in different formats.
And the parsing module 802 is configured to read user data of each row of users in the file to be parsed according to the row, and parse the user data according to the target file parsing template.
And the maintenance module 803 is configured to establish a mapping relationship between the parsed user data and the data to be maintained through a user entity class, and maintain the data to be maintained based on the mapping relationship.
In an exemplary embodiment, the data maintenance apparatus 800 further includes:
and the first display module is used for responding to the input operation of the template configuration information and displaying an initial file analysis template containing the configuration information.
The first construction module is used for responding to the generation operation of the initial file analysis template and constructing the file analysis template.
And the second construction module is used for constructing a file analysis template set based on each file analysis template.
In an exemplary embodiment, the template configuration information includes segmentation conditions and field identifications. The first display module includes:
the first display sub-module is used for responding to the request of the newly-built file analysis template and displaying the initial file analysis template; the initial file parsing template comprises initial segmentation conditions and initial field identifiers.
And the second display sub-module is used for responding to the input operation of the segmentation conditions and the field identifications and displaying an initial file analysis template containing the segmentation conditions and the field identifications.
In an exemplary embodiment, the determination module 801 includes a first acquisition sub-module and a first determination sub-module. Wherein the first determination submodule includes:
and the second determining submodule is used for determining keywords of the query according to the content in the file to be analyzed.
And the third determining submodule is used for determining an initial file analysis template set containing the keywords in the file analysis template set based on the keywords.
And the fourth determining submodule is used for determining a target template identifier corresponding to the format of the file to be analyzed according to the template identifier of each file analysis template in the initial file analysis template set and determining a target file analysis template corresponding to the target template identifier.
In an exemplary embodiment, the parsing module 802 includes a reading sub-module and a first parsing sub-module.
Wherein the first parsing submodule includes:
and the first judging sub-module is used for traversing the user data of the user aiming at each segmentation condition in the target file analysis template set and judging whether the user data meets the segmentation conditions.
And the segmentation sub-module is used for segmenting the user data based on the segmentation conditions to obtain segmented user data under the condition that the user data meets the segmentation conditions.
And a fifth determining submodule, configured to determine a target field corresponding to the user data after segmentation according to the field identifier corresponding to the segmentation condition.
In an exemplary embodiment, the parsed user data contains data for each target field of the user. The maintenance module 803 includes:
the assignment sub-module is used for assigning the data of each target field of the user to the user entity class according to the mapping relation between the user entity class and each target field of the user to obtain the user entity class of the user; the user entity class contains the user's full field.
And the transmission sub-module is used for transmitting the user entity class of the user as a parameter to the user information maintenance micro-service.
And the maintenance sub-module is used for maintaining the mapping relation between each field in the user entity class of the user and the data to be maintained through the user information and maintaining the data to be maintained.
The respective modules in the above-described data maintenance 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 an exemplary embodiment, a computer device, which may be a terminal, is provided, and an internal structure thereof may be as shown in fig. 9. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. 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 and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a data maintenance method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 9 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the computer device to which the present application applies, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use, and processing of the related data are required to meet the related regulations.
Those skilled in the art will appreciate that implementing all or part of the above described methods 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, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A method of data maintenance, the method comprising:
acquiring a file to be analyzed, and determining a target file analysis template corresponding to the format of the file to be analyzed in a file analysis template set; the file analysis template set comprises a plurality of file analysis templates in different formats;
reading user data of each row of users in the file to be analyzed according to rows, and analyzing the user data according to the target file analysis template;
and establishing a mapping relation between the user data and the data to be maintained after analysis through the user entity class, and maintaining the data to be maintained based on the mapping relation.
2. The method of claim 1, wherein prior to the obtaining the file to be parsed, the method further comprises:
responding to the input operation of the template configuration information, and displaying an initial file analysis template containing the configuration information;
responding to the generation operation of the initial file analysis template to construct a file analysis template;
and constructing a file analysis template set based on each file analysis template.
3. The method of claim 2, wherein the template configuration information includes segmentation conditions and field identifications, and wherein the exposing an initial file parsing template including configuration information in response to an input operation of the template configuration information comprises:
responding to a request of newly-built file analysis templates, and displaying initial file analysis templates; the initial file analysis template comprises initial segmentation conditions and initial field identifiers;
and responding to the input operation of the segmentation condition and the field identification, and displaying an initial file analysis template containing the segmentation condition and the field identification.
4. The method of claim 1, wherein determining a target file parsing template corresponding to the format of the file to be parsed in the set of file parsing templates comprises:
determining keywords of the query according to the content in the file to be analyzed;
determining an initial file analysis template set containing the keywords in the file analysis template set based on the keywords;
and determining a target template identifier corresponding to the format of the file to be analyzed according to the template identifier of each file analysis template in the initial file analysis template set, and determining a target file analysis template corresponding to the target template identifier.
5. The method of claim 1, wherein parsing the user data according to the target file parsing template comprises:
traversing the user data of the user aiming at each segmentation condition in the target file analysis template set, and judging whether the user data meets the segmentation conditions or not;
dividing the user data based on the dividing conditions under the condition that the user data meets the dividing conditions, so as to obtain the divided user data;
and determining a target field corresponding to the segmented user data according to the field identification corresponding to the segmentation condition.
6. The method according to claim 1, wherein the parsed user data includes data of each target field of the user, the mapping relationship between the parsed user data and data to be maintained is established by a user entity class, and the data to be maintained is maintained based on the mapping relationship, including:
assigning the data of each target field of the user to the user entity class according to the mapping relation between the user entity class and each target field of the user to obtain the user entity class of the user; the user entity class contains the full field of the user;
transmitting the user entity class of the user as a parameter to a user information maintenance micro-service;
and maintaining the data to be maintained through the user information maintenance micro service and the mapping relation between each field in the user entity class of the user and the data to be maintained.
7. A data maintenance device, the device comprising:
the determining module is used for acquiring the file to be analyzed, and determining a target file analysis template corresponding to the format of the file to be analyzed in the file analysis template set; the file analysis template set comprises a plurality of file analysis templates in different formats;
the analysis module is used for reading the user data of each row of users in the file to be analyzed according to the row, and analyzing the user data according to the target file analysis template;
and the maintenance module is used for establishing the mapping relation between the user data and the data to be maintained after analysis through the user entity class, and maintaining the data to be maintained based on the mapping relation.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202311396434.3A 2023-10-26 2023-10-26 Data maintenance method, device, computer equipment and storage medium Pending CN117370281A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311396434.3A CN117370281A (en) 2023-10-26 2023-10-26 Data maintenance method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311396434.3A CN117370281A (en) 2023-10-26 2023-10-26 Data maintenance method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117370281A true CN117370281A (en) 2024-01-09

Family

ID=89396176

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311396434.3A Pending CN117370281A (en) 2023-10-26 2023-10-26 Data maintenance method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117370281A (en)

Similar Documents

Publication Publication Date Title
CN112433712B (en) Report display method, report display device, computer equipment and storage medium
CN115544183B (en) Data visualization method, device, computer equipment and storage medium
CN109814863A (en) A kind of processing method, device, computer equipment and computer storage medium for requesting returned data
CN117390011A (en) Report data processing method, device, computer equipment and storage medium
CN116303657A (en) Group image generation method, group image generation device, computer device, and storage medium
CN116258597A (en) Document processing method, device, computer equipment and storage medium
CN117370281A (en) Data maintenance method, device, computer equipment and storage medium
CN112685678B (en) Page configuration method, page configuration device, computer equipment and storage medium
CN113961110B (en) User operation response method, device, computer equipment and storage medium
CN118132656A (en) Knowledge graph construction method, knowledge graph construction device, computer equipment and storage medium
CN116893811A (en) Processing method and device of man-machine interaction event, computer equipment and storage medium
CN117130606A (en) Front-end page configuration method, front-end page configuration device, computer equipment and storage medium
CN116860576A (en) Method, device, computer equipment and storage medium for recording operation log
CN118761466A (en) Flink jar packet-based data blood margin extraction method and device
CN118245699A (en) Page acquisition method, device, equipment, storage medium and computer program product
CN117612192A (en) Electronic drawing information identification method, system, electronic equipment and storage medium
CN118193396A (en) Test method, test apparatus, computer device, storage medium, and program product
CN117193924A (en) Page display method and device and computer equipment
CN116431260A (en) Interface rendering method and device based on data model driving and computer equipment
CN117033452A (en) Database processing method, device, computer equipment and storage medium
CN116881154A (en) Pressure testing method, pressure testing device, computer equipment and storage medium
CN118332002A (en) Data query method, device, computer equipment and storage medium
CN116400922A (en) Interface guide schematic diagram generation method, device, computer equipment and storage medium
CN116187286A (en) Method, device, platform, storage medium and product for generating potential perception report
CN118690057A (en) Service data processing method, device, equipment, storage medium and program product

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