Data verification method and device

By building a preset model library and setting verification rules for it, the inconsistency problem caused by data naming differences in different business systems is solved, and the consistency checksum processing of data is realized.

CN120337908APending Publication Date: 2025-07-18KE COM (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510235133.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In multiple business systems of different teams, there are differences in the naming methods of the same data, making it difficult to ensure data consistency.

Method used

Build a preset model library that contains multiple data models, each model including standard fields associated with each other, and sets verification rules for these fields to verify the fields to be processed through these rules.

Benefits of technology

It realizes the consistency of data in multiple business systems, ensures that the data complies with preset standards, and avoids error propagation caused by data inconsistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120337908A_ABST
    Figure CN120337908A_ABST
Patent Text Reader

Abstract

The invention relates to the field of data processing, in particular to a data verification method and device. The method comprises the following steps: acquiring first data in a first service system; the first data comprises n fields to be processed; the first service system is any one of p service systems; n and p are positive integers. Determining a first model corresponding to the first data from a preset model library; the preset model library comprises a plurality of data models, each data model comprises one or more standard fields associated with each other, and each data model is applied to a plurality of service systems in the p service systems; the first model is included in the plurality of data models. And verifying contents of the n to-be-processed fields by utilizing verification rules respectively corresponding to n standard fields included in the first model. The method is applied to verifying data in a service system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing, and in particular, to a data verification method and apparatus. Background Art

[0002] Currently, in data management, it is often necessary to apply the same data to multiple business systems of different teams.

[0003] Taking the home improvement field as an example, there may be multiple business systems for different teams. For example, a project management business system corresponding to the project management team, a plumbing business system corresponding to the plumbing team, a tiling business system corresponding to the tiling team, and so on. Among them, data such as customer information, product codes, and product dimensions may be applied in multiple business systems.

[0004] Among them, the naming methods of the same data by different teams may vary. For example, for the length of a certain product, there may be a situation where some teams use centimeters as the unit and some teams use meters as the unit.

[0005] Therefore, how to ensure the consistency of data in multiple business systems is a problem that needs to be solved currently. Summary of the Invention

[0006] To solve the above technical problems, the present disclosure provides a data verification method and apparatus.

[0007] In a first aspect, a data verification method is provided. The method includes: obtaining first data in a first business system; the first data includes n fields to be processed; the first business system is any one of p business systems; n and p are positive integers. Determining a first model corresponding to the first data from a preset model library; the preset model library includes multiple data models, and each of the data models includes one or more standard fields that are mutually related, and each of the data models is applied to multiple business systems among the p business systems; the first model is included in the multiple data models. Using the verification rules respectively corresponding to the n standard fields included in the first model to verify the content of the n fields to be processed.

[0008] In the technical solution provided by this application, in order to ensure the consistency of data in multiple business systems, a model library (i.e., "preset model library") is constructed. The preset model library includes multiple data models. Among them, each data model includes one or more standard fields that are interrelated, and these data models can be applied to multiple business systems among p business systems. In addition, each standard field in each data model corresponds to a verification rule. In this way, when it is necessary to verify the data (for the convenience of description, referred to as "first data") in any one of the p business systems, the model corresponding to the first data (referred to as the first model) can be determined from the preset model library first, and then the verification rules corresponding to the n standard fields included in the first model are used to verify the content of the n fields to be processed.

[0009] In some implementation manners, determining the first model corresponding to the first data from the preset model library includes: determining the first model corresponding to the first data from the preset model library according to the configuration information corresponding to the first data; the configuration information includes the identifier of the first model.

[0010] In some implementation manners, the configuration information is an annotation corresponding to the first data in the Spring framework.

[0011] In some implementation manners, a second model is further included in the multiple data models, and the second model is a sub-model of the first model; among the n standard fields included in the first model, there are m standard fields obtained from the second model, where m is a positive integer less than n.

[0012] In some implementation manners, the method further includes: after determining that the content of the n fields to be processed passes the verification, performing preset processing on the first data; the preset processing includes any one of the following: performing data processing on the first data in the first business system, persistently storing the first data in the first business system, and sending the first data from the first business system to the second business system among the p business systems.

[0013] In some implementation manners, the method further includes: judging the state of the first switch; in the case where the first switch is in the off state, in response to obtaining the first data, performing the preset processing on the n fields to be processed; the step of using the verification rules corresponding to the n standard fields included in the first model to verify the content of the n fields to be processed includes: in the case where the first switch is in the on state, using the verification rules corresponding to the n standard fields included in the first model to verify the content of the n fields to be processed.

[0014] In some implementations, the method further includes: determining the state of a second switch; in the case where the second switch is in an on state, after determining that the content of the n fields to be processed fails the verification, stopping the preset processing of the first data; in the case where the second switch is in an off state, after determining that the content of the n fields to be processed fails the verification, performing the preset processing on the first data and generating an error log; the error log is used to indicate the result of verifying the n fields to be processed.

[0015] In a second aspect, a data verification device is provided, including: an acquisition unit, configured to acquire first data in a first service system; the first data includes n fields to be processed; the first service system is any one of p service systems; n and p are positive integers; a processing unit, configured to determine a first model corresponding to the first data from a preset model library; the preset model library includes a plurality of data models, and each of the data models includes one or more standard fields that are correlated with each other, and each of the data models is applied to a plurality of service systems among the p service systems; the first model is included in the plurality of data models; the processing unit is further configured to verify the content of the n fields to be processed by using the verification rules respectively corresponding to the n standard fields included in the first model.

[0016] In some implementations, the processing unit is configured to determine a first model corresponding to the first data from a preset model library, including: the processing unit is configured to determine a first model corresponding to the first data from a preset model library according to the configuration information corresponding to the first data; the configuration information includes an identifier of the first model.

[0017] In some implementations, the configuration information is an annotation corresponding to the first data in the Spring framework.

[0018] In some implementations, a second model is further included in the plurality of data models, and the second model is a sub-model of the first model; among the n standard fields included in the first model, there are m standard fields obtained from the second model, and m is a positive integer less than n.

[0019] In some implementations, the processing unit is further configured to, after determining that the content of the n fields to be processed passes the verification, perform preset processing on the first data; the preset processing includes any one of the following: performing data processing on the first data in the first service system, persistently storing the first data in the first service system, and sending the first data from the first service system to a second service system among the p service systems.

[0020] In some implementations, the processing unit is further configured to determine the state of the first switch; the processing unit is further configured to, when the first switch is in the off state, in response to obtaining the first data, perform the preset processing on the n fields to be processed; the processing unit is further configured to use the verification rules respectively corresponding to the n standard fields included in the first model to verify the content of the n fields to be processed, including: the processing unit is further configured to, when the first switch is in the on state, use the verification rules respectively corresponding to the n standard fields included in the first model to verify the content of the n fields to be processed.

[0021] In some implementations, the processing unit is further configured to determine the state of the second switch; the processing unit is further configured to, when the second switch is in the on state, stop performing the preset processing on the first data after determining that the content of the n fields to be processed fails the verification; the processing unit is further configured to, when the second switch is in the off state, perform the preset processing on the first data after determining that the content of the n fields to be processed fails the verification, and generate an error log; the error log is used to indicate the result of verifying the n fields to be processed.

[0022] In a third aspect, a data verification device is provided, including: a memory and a processor, the memory is used to store a computer program, and the processor is configured to, when executing the computer program, enable the data verification device to implement the method described in the first aspect or any implementation manner of the first aspect as above.

[0023] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a computing device, the computing device is enabled to implement the method described in the first aspect or any implementation manner of the first aspect as above.

[0024] In a fifth aspect, a computer program product is provided. When the computer program product runs on a computer, the computer is enabled to implement the method described in the first aspect or any implementation manner of the first aspect as above.

[0025] In the technical solution provided by this application, in order to ensure data consistency in multiple business systems, a model library (i.e., "preset model library") is constructed. The preset model library includes multiple data models. Among them, each data model includes one or more standard fields that are interrelated, and these data models can be applied to multiple business systems among p business systems. In addition, each standard field in each data model corresponds to a verification rule. In this way, when it is necessary to verify the data (for ease of description, referred to as "first data". Among them, the first data includes n fields to be processed) in any one of the p business systems, it is possible to first determine the model corresponding to the first data (referred to as the first model) from the preset model library, and then use the verification rules corresponding to the n standard fields included in the first model to verify the content of the n fields to be processed. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure and, together with the specification, are used to explain the principles of the present disclosure.

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0028] Figure 1 It is a schematic structural diagram of a business platform provided by an embodiment of the present disclosure;

[0029] Figure 2 It is one of the schematic diagrams of the data model in the preset model library provided by an embodiment of the present disclosure;

[0030] Figure 3 It is a schematic diagram of the corresponding relationship between the standard fields and the verification rules in the data model in the preset model library provided by an embodiment of the present disclosure;

[0031] Figure 4 It is the second schematic diagram of the data model in the preset database provided by an embodiment of the present disclosure;

[0032] Figure 5 It is one of the schematic flowcharts of a data verification method provided by an embodiment of the present disclosure;

[0033] Figure 6 It is the second schematic flowchart of a data verification method provided by an embodiment of the present disclosure;

[0034] Figure 7 It is the third schematic flowchart of a data verification method provided by an embodiment of the present disclosure;

[0035] Figure 8 The fourth flowchart of a data verification method provided by an embodiment of the present disclosure;

[0036] Figure 9 The fifth flowchart of a data verification method provided by an embodiment of the present disclosure;

[0037] Figure 10 The sixth flowchart of a data verification method provided by an embodiment of the present disclosure;

[0038] Figure 11 The first structural schematic diagram of a data verification device provided by an embodiment of the present disclosure;

[0039] Figure 12 The second structural schematic diagram of a data verification device provided by an embodiment of the present disclosure;

[0040] Figure 13 The third structural schematic diagram of a data verification device provided by an embodiment of the present disclosure. Detailed implementation manners

[0041] In order to more clearly understand the above objects, features, and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments may be combined with each other.

[0042] Many specific details are set forth in the following description to facilitate a thorough understanding of the present disclosure, but the present disclosure may be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all the embodiments.

[0043] First, the application scenarios of the embodiments of the present application are introduced. As Figure 1 shown, it is a structural schematic diagram of a service platform provided by an embodiment of the present application. The service platform 10 includes: a plurality of service systems ( Figure 1 taking service system 101, service system 102,..., service system 10p as examples, where p is a positive integer) and a database 111.

[0044] Among them, the plurality of service systems can provide services for different teams. Exemplarily, taking the application of the service platform 10 in the home improvement field as an example, the plurality of service systems may include: a project management service system corresponding to the project management team, a water and electricity service system corresponding to the water and electricity workers team, a bricklaying service system corresponding to the bricklaying team, and so on.

[0045] In practical applications, on the one hand, users can send data to each business system through an Application Programming Interface (API). In addition, data generated by other systems can also be sent to the business system. For example, a Listener can be used to send the data generated in the Kafka server to each business system.

[0046] On the other hand, after each business system receives data from users or other systems, it can process the data. For example, perform operations on the data to obtain new data. In addition, each business system can send the received data or the processed data to Database 111 for persistent storage.

[0047] On the other hand, between multiple business systems, data can be transmitted through methods such as API. For example, data can be transmitted between Business System 101 and Business System 102 through the API.

[0048] Among them, when a user sends data to a business system through the API or other systems send the generated data to the business system, the data verification method provided by the embodiments of the present application can be used to verify the data input into the business system (i.e., Figure 1 "submission verification" in ). In addition, when the business system performs persistent storage on the data, the data verification method provided by the embodiments of the present application can be used to verify the data to be written into Database 111 (i.e., Figure 1 "writing verification" in ). In addition, the data verification method provided by the embodiments of the present application can also be used to perform periodic spot checks on the data already stored in Database 111 (i.e., Figure 1 "post - event data inspection" in ). In addition, when data is transmitted between multiple business systems, the data verification method provided by the embodiments of the present application can also be used to perform periodic spot checks on the transmitted data (i.e., Figure 1 "post - event data inspection" in ).

[0049] Next, combined with examples, the technical solutions provided by the embodiments of the present application will be introduced in detail.

[0050] In the embodiments of the present application, it is considered that: in order to ensure the consistency of data in multiple business systems, a model library (hereinafter referred to as "preset model library") can be constructed. The preset model includes multiple data models. Among them, each data model includes one or more standard fields that are interrelated, and these data models can be applied to multiple business systems among p business systems.

[0051] Taking the home improvement field as an example, user information may be used in multiple business systems, and the user information may include: user name, phone number, ID number, and other information. Therefore, a customer portrait model as shown in (a) of Figure 2 can be constructed. The customer portrait model may include standard fields such as "customer name", "phone number", and "ID number". For another example, house information may be used in multiple business systems, and the house information may include: the community where the house belongs, house type, area, and other information. Therefore, a house model including standard fields such as "belonging community", "house type", and "area" as shown in (b) of Figure 2 can be constructed. For another example, a service provider model including standard fields such as "employee name", "position", and "permissions" can also be constructed as shown in (c) of Figure 2 . For another example, a contract model including standard fields such as "contract number", "amount", and "payment method" can also be constructed as shown in (d) of Figure 2 .

[0052] Among them, each standard field in each data model corresponds to a verification rule. For example, the verification rule corresponding to the "user name" standard field in the customer portrait model: the content is Chinese characters and the number of characters is less than 5; for another example, the verification rule corresponding to the "phone number" standard field in the customer portrait model: the content is 11 digits starting with 1; for another example, the verification rule corresponding to the "area" in the house model: ends with "㎡", and so on.

[0053] Exemplarily, as shown in Figure 3 , a rule library can be constructed, and the rule library includes the verification rules corresponding to each field. In the preset model library, each standard field in each data model can be mapped to the corresponding verification rule in the rule library through annotations and other means.

[0054] In this way, when it is necessary to verify the data in any one of the p business systems (for the convenience of description, it is called "first data". Among them, the first data includes n fields to be processed), it is possible to first determine the model corresponding to the first data (called the first model) from the preset model library, and then use the verification rules corresponding to the n standard fields included in the first model to verify the content of the n fields to be processed.

[0055] For example, when the first data includes three fields to be processed, namely, user name, phone number, and ID card number, the first model corresponding to the first data can be determined from the preset model library as a customer portrait model. Then, the verification rules of the three standard fields, namely, "customer name", "phone number", and "ID card number", included in the customer portrait model are used to verify the three fields to be processed in the first data. In this way, for the data in any one of the p business systems, the data that does not conform to the verification rules can be verified by using the above method, which helps to maintain the data consistency in the p business systems.

[0056] In addition, in some implementation manners, in the preset model library, when a model (referred to as the first model) includes the standard fields in another model (referred to as the second model), the model structure can also be simplified by taking the second model as a sub-model of the first model. For example, the preset model library may also include Figure 4 the customer domain model shown in Figure 2 the customer portrait model shown in (a) of Figure 2 the house model shown in (b) of Figure 2 the service provider model shown in (c) of , and in addition, the customer domain model may further include the standard fields "project number" and "responsible department".

[0057] Next, the implementation process of the data verification method provided in the embodiments of the present application will be introduced in combination with examples.

[0058] Specifically, the execution subject of the method provided in the embodiments of the present application may be a data verification device. When the data verification device runs, it can be used to execute all or part of the steps in the method provided in the embodiments of the present application. Among them, in the actual application process, the functions of the data verification device can be implemented by an electronic device such as a personal computer (including a desktop computer, a laptop computer, a handheld computer, and a notebook computer), an ultra-mobile personal computer (UMPC), a smart phone, a server, etc.; or, the functions of the above data verification device can also be implemented by some hardware / software devices in the above electronic devices. The embodiments of the present application do not make special restrictions on the specific form of the data verification device.

[0059] As Figure 5 shown, the data verification method provided in the embodiments of the present application may include the following steps:

[0060] S201. The data verification device obtains first data in a first business system.

[0061] Among them, the first data includes n fields to be processed.

[0062] Among them, the first service system is any one of the p service systems. N and p are positive integers respectively.

[0063] Exemplarily, when the first service system is Figure 1 any service system in, the first data may be data sent by the user to the first service system through the API; or, the first data may be data in the first service system that is about to be sent to the database 111 for persistent storage; or, the first data may be data in the first service system that is about to be sent to the second service system among the p service systems.

[0064] S202. The data verification device determines the first model corresponding to the first data from the preset model library.

[0065] Among them, the preset model library includes multiple data models, and each data model includes one or more standard fields that are interrelated. Among them, each data model is applied to multiple service systems among the p service systems. The first model is included in the multiple data models.

[0066] Taking the home improvement field as an example, the multiple data models in the preset model library may include Figure 2 and Figure 4 each data model in.

[0067] In some implementation manners, the identifier of the model may be carried in the configuration information of the data to be processed. In this way, after reading the configuration information of the data to be processed, the model corresponding to the data to be processed can be determined according to the identifier of the model carried in the configuration information. Specifically, S202 may include:

[0068] S2021. The data verification device determines the first model corresponding to the first data from the preset model library according to the configuration information corresponding to the first data.

[0069] Among them, the configuration information corresponding to the first data includes the identifier of the first model.

[0070] In some designs, the configuration information corresponding to the first data may be the annotation corresponding to the first data in the Spring framework.

[0071] S203. The data verification device uses the verification rules corresponding to the n standard fields included in the first model to verify the content of the n fields to be processed.

[0072] For example, taking the first data including: user name, phone number, and ID card number, and the 3 fields to be processed as: if according to the configuration information corresponding to the first data, it is determined that the first model corresponding to the first data is Figure 2The "customer portrait model" in (a). Then, the verification rules of the three standard fields in the customer portrait model are sequentially used to verify the three fields to be processed in the first data respectively.

[0073] In some implementation manners, when the first model includes a sub-model (hereinafter referred to as the second model), among the n standard fields included in the first model, it includes: m standard fields obtained from the second model, where m is a positive integer less than n.

[0074] For example, when the first model is Figure 4 the "customer domain model" as shown, then at this time, the first model includes 11 standard fields (that is, n is 11 at this time). Among them, the 11 standard fields include 3 standard fields in the "customer portrait model", 3 standard fields in the "house model", 3 standard fields in the "service provider model", and the standard fields "project number" and "responsible part".

[0075] Furthermore, the verification rules corresponding to the above 11 standard fields can be used to verify the 11 fields to be processed in the first data.

[0076] For example, the first data is shown in Table 1 below:

[0077] Table 1

[0078] Customer Name Li Si Customer Phone 1301234**** ID Number 610113************ Residential Community Community A House Type Two Bedrooms and One Living Room Area <![CDATA[100m 2 > Employee Name Zhang San Position Project Administrator Permissions Level 3 Project Number 123456 Responsible Department Home Improvement Department

[0079] Among them, when verifying the 11 fields to be processed in Table 1, the contents of "project number" and "responsible department" in Table 1 can be first matched and verified with the verification rules of the two standard fields "project number" and "responsible department" in the "customer domain model". Then, the verification rules of the standard fields in each sub-model in the "customer domain model" are recursively called level by level. For example, the "customer name", "customer phone number" and "ID number" in Table 1 are matched and verified with the verification rules of the three standard fields in the "customer portrait model"; the "subordinate community", "house type" and "area" in Table 1 are matched and verified with the verification rules of the three standard fields in the "house model"; the "employee name", "position" and "authority" in Table 1 are matched and verified with the verification rules of the three standard fields in the "service provider model".

[0080] In some implementation manners, the method may further include:

[0081] S204. After the data verification device determines that the contents of the n fields to be processed pass the verification, perform preset processing on the first data.

[0082] Among them, the preset processing may include: performing data processing on the first data in the first service system. Among them, data processing may include: various mathematical operations performed on the data to obtain the required new data.

[0083] For example, if the first data is the data sent by the user to the first service system through the API, then after determining that the content of the n to-be-processed fields passes the verification through the content of S203, data processing is performed on the first data in the first service system.

[0084] In addition, the preset processing may also include: performing persistent storage of the first data in the first service system.

[0085] For example, if the first data is the data sent by the user to the first service system through the API, then after determining that the content of the n to-be-processed fields passes the verification through the content of S203, the first data is written into the database 111 for persistent storage.

[0086] In addition, the preset processing may also include: sending the first data from the first service system to the second service system among the p service systems.

[0087] For example, if the first data is the data that needs to be sent from the first service system to the second service system, then after determining that the content of the n to-be-processed fields passes the verification through the content of S203, the first data is sent from the first service system to the second service system.

[0088] In some designs, as Figure 7 shown, the method may further include:

[0089] S205. The data verification device determines the state of the first switch.

[0090] Among them, the first switch may be a switch for controlling whether to perform verification.

[0091] In some possible designs, the first switch is used to control whether to perform verification in the service platform to which the p service systems belong. Among them, when the first switch is in the on state, the data verification device performs the verification process of S201 - S204 on the data in any service system in the obtained service platform; when the first switch is in the off state, the data verification device does not perform the verification process (i.e., S202 - S203), but after obtaining the data (i.e., S201), performs preset processing on each to-be-processed field in the data (i.e., S206).

[0092] In some other possible designs, the first switch is used to control whether to perform verification in the first service system. At this time, when the first switch is in the on state, for the data in the first service system, the data verification device performs the verification process of S202 - S203 above; when the first switch is in the off state, for the data in the first service system, the data verification device does not perform the verification process (i.e., S202 - S203), but after obtaining the data (i.e., S201), performs preset processing on each to-be-processed field in the data (i.e., S206).

[0093] S206. When the first switch is in the off state, in response to obtaining the first data, the data verification device performs preset processing on n to-be-processed fields.

[0094] In addition, S203 may specifically include:

[0095] S203a. When the first switch is in the on state, the data verification device uses the verification rules corresponding to the n standard fields included in the first model to verify the content of the n to-be-processed fields.

[0096] In the above design of the embodiments of the present application, by setting the first switch, it is possible to control whether to perform verification on the obtained data (i.e., S202 - S203) by controlling the state of the first switch.

[0097] In another design, as Figure 8 shown, the method may further include:

[0098] S207. The data verification device determines the states of the first platform switch and the first system switch.

[0099] Among them, the first platform switch is used to control whether to perform verification in the service platform to which p service systems belong; the first system switch is used to control whether to perform verification in the first service system. In other words, when both the first platform switch and the first system switch are in the on state, the data verification device performs the verification process of S202 - S203 on the data obtained from the first service system; when at least one of the first platform switch and the first system switch is in the off state, the data verification device, after obtaining the data from the first service system (i.e., S201), performs preset processing on each to-be-processed field in the data (i.e., S208).

[0100] S208. When at least one of the first platform switch and the first system switch is in the off state, in response to obtaining the first data, the data verification device performs preset processing on n to-be-processed fields.

[0101] In addition, S203 may specifically include:

[0102] S203b. When both the first platform switch and the first system switch are in the on state, the data verification device verifies the content of the n fields to be processed by using the verification rules corresponding to the n standard fields included in the first model.

[0103] In the above design of the embodiments of the present application, by setting the first platform switch and the first system switch, it is possible to control whether to perform verification on the acquired data in the service platform and each service system (i.e., S202 - S203) by controlling the states of the first platform switch and the first system switch.

[0104] In some designs, such as Figure 9 shown, the method may further include:

[0105] S209. The data verification device determines the state of the second switch.

[0106] S210. When the second switch is in the on state, after the data verification device determines that the content of the n fields to be processed fails the verification, it stops the preset processing of the first data.

[0107] S211. When the second switch is in the off state, after the data verification device determines that the content of the n fields to be processed fails the verification, it performs the preset processing on the first data and generates an error log.

[0108] Wherein, the error log is used to indicate the result of verifying the n fields to be processed.

[0109] Wherein, the second switch can be used to select the processing method for the fields to be processed after the content of the fields to be processed fails the verification.

[0110] Specifically, on the one hand, when the second switch is in the on state, after determining that the content of the n fields to be processed fails the verification, the preset processing of the first data is stopped (i.e., S210). That is to say, at this time, by stopping the continuous processing of the incorrect data, it is possible to avoid data contamination caused by incorrect data entering the system; on the other hand, when the second switch is in the off state, after determining that the content of the n fields to be processed fails the verification, the preset processing is performed on the first data and an error log is generated (i.e., S211). That is to say, on the one hand, the preset processing can continue to be performed on the first data to ensure the continuous operation of the service, and on the other hand, the verification result can be recorded by generating an error log.

[0111] In another design, such as Figure 10 shown, the method may further include:

[0112] S212. The data verification device determines the states of the second system switch and the second field switch.

[0113] Among them, the second system switch is used to select a processing method for a field to be processed in the first service system after the content of the field to be processed fails the verification. The second field switch is used to select a processing method for a specified field to be processed (such as the n fields to be processed in this embodiment) in the first service system after the content of the specified field to be processed fails the verification.

[0114] S213. When both the second system switch and the second field switch are in the on state, after the data verification device determines that the content of the n fields to be processed fails the verification, it stops the preset processing of the first data.

[0115] S214. When at least one of the second system switch and the second field switch is in the off state, after the data verification device determines that the content of the n fields to be processed fails the verification, it performs preset processing on the first data and generates an error log.

[0116] Among them, the error log is used to indicate the result of verifying the n fields to be processed.

[0117] Based on the same inventive concept, as an implementation of the above method, an embodiment of the present application further provides a data verification device. This embodiment corresponds to the foregoing method embodiment. For the convenience of reading, the details in the foregoing method embodiment will not be described one by one in this embodiment. However, it should be clear that the data verification device in this embodiment can correspondingly implement all the content in the foregoing method embodiment.

[0118] As Figure 11 shown, it is a schematic structural diagram of a data verification device for executing the data verification method provided by the embodiment of the present application. The data verification device 30 may specifically include three underlying modules: a preset model library 306, a rule library 307, and a model background 308.

[0119] Among them, the preset model library 306 includes multiple data models. Exemplarily, the preset model library 306 may include data models as Figure 2-4 shown. Among them, each data model in the preset model library 306 may be jointly defined by business experts and production and research.

[0120] The rule library 307 is used to record verification rules. Exemplarily, the verification rules in the rule library 307 may be as Figure 3 shown in the rule library in

[0121] The model background 308 is used to record the execution results of data inspection tasks. For example, after obtaining the verification result of the data to be verified through S203 above, the verification result can be recorded in the model background 308. In addition, the model background 308 is also used to manage model definitions. For example, operations such as adding, deleting, and modifying data models in the preset model library 306 can be performed through the model background 308.

[0122] In addition, the data verification device 30 further includes 5 core components: a verifier 301, an inspection scheduler 302, a function switch 303, a mapping configuration 304, and a collection and reporting 305.

[0123] Among them, the verifier 301 is used to verify the fields in the data to be verified according to the above data verification method of the embodiments of the present application by scheduling the function switch 303, the mapping configuration 304, and the collection and reporting 305.

[0124] The inspection scheduler 302 can be understood as a trigger for a timed data verification task, and is used to be responsible for obtaining the data to be verified and sending the data to be verified to the verifier 301 for verification.

[0125] The function switch 303 includes one or more of the first switch, the second switch, the first platform switch, the first system switch, the second system switch, and the second field switch in the above data verification method. The function switch 303 is responsible for flexibly meeting the data verification requirements of the service, so that the data verification device 30 can be smoothly and flexibly connected to each service system.

[0126] The mapping configuration 304 is used to determine the data model corresponding to the field to be verified and the verification rules corresponding to each standard field in the data model from the preset model library 306 and the rule library 307.

[0127] The collection and reporting 305 is responsible for notifying the service system or the model background 308 of the data verification result in the form of a message or an interface call.

[0128] As Figure 12 shown, it is another structural schematic diagram of the data verification device provided by the embodiments of the present application. The data verification device 40 includes:

[0129] An acquisition unit 401, configured to acquire first data in a first service system; the first data includes n fields to be processed; the first service system is any one of p service systems; n and p are positive integers.

[0130] A processing unit 402 is configured to determine a first model corresponding to first data from a preset model library. The preset model library includes multiple data models, and each of the data models includes one or more standard fields that are interrelated. Each of the data models is applied to multiple ones of the p business systems. The first model is included in the multiple data models.

[0131] The processing unit 402 is further configured to use verification rules respectively corresponding to n standard fields included in the first model to verify the content of the n fields to be processed.

[0132] In some implementation manners, the processing unit 402 is configured to determine a first model corresponding to first data from a preset model library, including:

[0133] The processing unit 402 is configured to determine a first model corresponding to first data from a preset model library according to configuration information corresponding to the first data. The configuration information includes an identifier of the first model.

[0134] In some implementation manners, the configuration information is an annotation corresponding to the first data in the Spring framework.

[0135] In some implementation manners, a second model is further included in the multiple data models, and the second model is a sub-model of the first model.

[0136] Among the n standard fields included in the first model, there are m standard fields obtained from the second model, where m is a positive integer less than n.

[0137] In some implementation manners, the processing unit 402 is further configured to perform a preset process on the first data after determining that the content of the n fields to be processed passes the verification. The preset process includes any one of the following: performing data processing on the first data in the first business system, persistently storing the first data in the first business system, or sending the first data from the first business system to a second business system among the p business systems.

[0138] In some implementation manners, the processing unit 402 is further configured to determine the state of a first switch.

[0139] The processing unit 402 is further configured to, when the first switch is in a closed state, in response to obtaining the first data, perform the preset process on the n fields to be processed.

[0140] The processing unit 402 is further configured to use the verification rules corresponding to the n standard fields included in the first model to verify the contents of the n fields to be processed, including: the processing unit is further configured to, when the first switch is in the on state, use the verification rules corresponding to the n standard fields included in the first model to verify the contents of the n fields to be processed.

[0141] In some implementation manners, the processing unit 402 is further configured to determine the state of the second switch;

[0142] The processing unit 402 is further configured to, when the second switch is in the on state, stop the preset processing of the first data after determining that the contents of the n fields to be processed fail the verification;

[0143] The processing unit 402 is further configured to, when the second switch is in the off state, perform the preset processing on the first data and generate an error log after determining that the contents of the n fields to be processed fail the verification; the error log is used to indicate the result of verifying the n fields to be processed.

[0144] The data verification device 30 and the data verification device 40 provided in the embodiments of the present application can execute the method of S201-S214, and their implementation principles and technical effects are similar, which will not be elaborated here.

[0145] Based on the same inventive concept, the embodiments of the present application further provide another data verification device. Figure 13 For the structural schematic diagram of the data verification device provided in the embodiments of the present application, as Figure 13 shown, the data verification device provided in this embodiment includes: a memory 601 and a processor 602. The memory 601 is used to store a computer program, and the processor 602 is used to make the data verification device execute any method provided in the above embodiments when executing the computer program.

[0146] Based on the same inventive concept, the embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the computing device is enabled to implement the method provided in the above embodiments.

[0147] Based on the same inventive concept, the embodiments of the present application further provide a computer program product. When the computer program product runs on a computer, the computing device is enabled to implement the method provided in the above embodiments.

[0148] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media that contain computer-usable program code.

[0149] The processor can be a central processing unit (CPU), or can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0150] The memory may include non-permanent memory in the computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0151] Computer-readable media include permanent and non-permanent, removable and non-removable storage media. The storage media can implement information storage by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information accessible by a computing device. As defined herein, computer-readable media do not include transitory computer-readable media, such as modulated data signals and carrier waves.

[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than limiting them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A data verification method, characterized in that, The method includes: Obtaining first data in a first business system; the first data includes n fields to be processed; the first business system is any one of p business systems; n and p are positive integers; Determining a first model corresponding to the first data from a preset model library; the preset model library includes multiple data models, each of the data models includes one or more standard fields that are correlated with each other, and each of the data models is applied to multiple business systems among the p business systems; the first model is included in the multiple data models; Using the verification rules respectively corresponding to the n standard fields included in the first model to verify the content of the n fields to be processed.

2. The method according to claim 1, characterized in that, The determining the first model corresponding to the first data from the preset model library includes: Determining the first model corresponding to the first data from the preset model library according to the configuration information corresponding to the first data; the configuration information includes an identifier of the first model.

3. The method according to claim 2, characterized in that, The configuration information is an annotation corresponding to the first data in the Spring framework.

4. The method according to claim 1, wherein Among the multiple data models, there is also a second model, and the second model is a sub-model of the first model; Among the n standard fields included in the first model, there are m standard fields obtained from the second model, and m is a positive integer less than n.

5. The method according to claim 1, wherein The method further includes: After determining that the content of the n fields to be processed passes the verification, performing a preset process on the first data; the preset process includes any one of the following: performing data processing on the first data in the first business system, performing persistent storage on the first data in the first business system, or sending the first data from the first business system to a second business system among the p business systems.

6. The method according to claim 5, characterized in that, The method further includes: Judging the state of a first switch; When the first switch is in the off state, in response to obtaining the first data, performing the preset process on the n fields to be processed; The using the verification rules respectively corresponding to the n standard fields included in the first model to verify the content of the n fields to be processed includes: when the first switch is in the on state, using the verification rules respectively corresponding to the n standard fields included in the first model to verify the content of the n fields to be processed.

7. The method according to claim 5, characterized in that, The method further includes: Judging the state of a second switch; When the second switch is in the on state, after determining that the content of the n fields to be processed fails to pass the verification, stopping performing the preset process on the first data; When the second switch is in the off state, after determining that the content of the n fields to be processed fails to pass the verification, performing the preset process on the first data and generating an error log; the error log is used to indicate the result of verifying the n fields to be processed.

8. A data verification device, characterized in that, It includes: An obtaining unit, configured to obtain first data in a first business system; The first data includes n fields to be processed; The first business system is any one of p business systems; n and p are positive integers; A processing unit, configured to determine a first model corresponding to first data from a preset model library; the preset model library includes a plurality of data models, and each of the data models includes one or more standard fields that are interrelated, and each of the data models is applied to a plurality of business systems among the p business systems; the first model is included in the plurality of data models; The processing unit is further configured to use the verification rules respectively corresponding to the n standard fields included in the first model to verify the content of the n fields to be processed.

9. A data verification device, characterized in that, Comprising: A memory and a processor, the memory is configured to store a computer program, and the processor is configured to, when executing the computer program, enable the data verification device to implement the method according to any one of claims 1-18.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a computing device, the computing device is enabled to implement the method according to any one of claims 1-7.

11. A computer program product, characterized in that, When the computer program product runs on a computer, the computer is enabled to implement the method according to any one of claims 1-7.

Citation Information

Cited By

  • Contract receipt identification and verification method based on large model

    CN120911482A