Data fault tolerance method and apparatus

By using path constraint rules and attribute constraint rules to flexibly verify IoT data, the problem of fault tolerance processing for data of different formats is solved, the efficiency and flexibility of fault tolerance processing are improved, and bandwidth consumption is reduced.

CN114896089BActive Publication Date: 2026-01-02ARMOR ACADEMY OF CHINESE PEOPLES LIBERATION ARMY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210292136.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-23
Publication Date
2026-01-02
Estimated Expiration
2042-03-23

AI Technical Summary

Technical Problem

Existing technologies cannot effectively handle fault tolerance for IoT data in different formats, and the efficiency of fault tolerance handling is low.

Method used

The system employs path constraint rules and attribute constraint rules to flexibly validate the data to be run, and performs constraint validation on the path information and attribute information of the data respectively, which is suitable for fault tolerance processing in multi-data scenarios.

Benefits of technology

It improves the flexibility and efficiency of fault tolerance processing, reduces bandwidth consumption, and is suitable for high-throughput data verification processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114896089B_ABST
    Figure CN114896089B_ABST
Patent Text Reader

Abstract

The application provides a data fault-tolerant method and device, the method comprises the following steps: determining to-be-run data on a running platform; performing path constraint verification on the to-be-run data based on a path constraint rule to obtain a path constraint verification result; the path constraint rule is used for representing information of data item existence and attribute constraint existence of standard data, and the standard data refers to data meeting the running requirements of the running platform; in the case that the path constraint verification result is that the path information of the to-be-run data matches the path constraint rule, performing validity constraint verification on the to-be-run data based on an attribute constraint rule, and performing fault-tolerant processing on the to-be-run data based on the validity constraint verification result; the attribute constraint rule is used for representing attribute constraint information of the standard data. The application can flexibly perform fault-tolerant processing on data in different scenarios and has high fault-tolerant processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and in particular to a data fault-tolerant method and device. BACKGROUND

[0002] An important feature of Internet of Things big data is the multi-dimension, high frequency and super large scale of data. The multi-dimension refers to the high diversity of data dimensions. Internet of Things data is largely from various sensors, and the number and types of sensors are often large in real Internet of Things scenarios. For example, there are about 100 sensors on a smart vehicle, including knock sensors, water temperature sensors, intake air temperature sensors, air flow sensors, wheel speed sensors, oxygen sensors, camshaft position sensors, crankshaft position sensors, etc. Some sensors have a relatively high data dimension, such as inertial sensors (IMU sensors), which have 9 dimensions of data per sample. Some sensors have a relatively high data sampling frequency, such as IMU sensors, which have a working sampling frequency ranging from tens of Hz to thousands of Hz. As can be seen, the data collected by these sensors is of a large scale.

[0003] However, when these data are applied to software running, running errors may be caused by abnormal factors, and therefore error checking needs to be performed on the data and fault-tolerant processing needs to be performed according to the checking result. In the traditional method, fault-tolerant processing is performed through XML Schema constraints. However, XML Schema constraints are only applicable to XML format data and cannot perform fault-tolerant processing on different format data. In addition, XML Schema constraints are constraints defined on the whole data, lack flexibility for any subset of data, and therefore occupy bandwidth and storage space when performing fault-tolerant processing, reducing the fault-tolerant processing efficiency. In addition, the XML Schema data validity specification requires strict prior agreement between the sender and the receiver, resulting in a high deployment and maintenance cost. SUMMARY

[0004] The present application provides a data fault-tolerant method and device to solve the defects that different format data cannot be fault-tolerant processed and the fault-tolerant processing efficiency is low in the prior art.

[0005] The present application provides a data fault-tolerant method, comprising:

[0006] determining to-be-run data on a running platform;

[0007] performing path constraint checking on the to-be-run data based on a path constraint rule to obtain a path constraint checking result; the path constraint rule is used to represent information about the existence of data items of standard data and the existence of attribute constraints thereof; the standard data refers to data meeting the running requirements of the running platform;

[0008] In a case where the path constraint checking result is that the path information of the to-be-run data matches the path constraint rule, validity constraint checking is performed on the to-be-run data based on an attribute constraint rule, and fault tolerance processing is performed on the to-be-run data based on a validity constraint checking result; the attribute constraint rule is used to represent attribute constraint information of the standard data.

[0009] According to the data fault tolerance method provided in the application, the fault tolerance processing performed on the to-be-run data based on the validity constraint checking result comprises:

[0010] In a case where the validity constraint checking result is that the attribute information of the to-be-run data does not match the attribute constraint rule, fault tolerance processing is performed on the to-be-run data.

[0011] According to the data fault tolerance method provided in the application, the path constraint rule is determined based on the following steps:

[0012] Path constraint information of the standard data is determined based on a running stage of the to-be-run data on the running platform;

[0013] The path constraint rule is determined based on the path constraint information of the standard data.

[0014] According to the data fault tolerance method provided in the application, the attribute constraint rule is determined based on the following steps:

[0015] Attribute constraint information of the standard data is determined based on a running stage of the to-be-run data on the running platform;

[0016] The attribute constraint rule is determined based on the attribute constraint information of the standard data.

[0017] According to the data fault tolerance method provided in the application, the path constraint information comprises at least one of a path type constraint, a path relativity constraint, a path length field length constraint, a path length constraint and a path content constraint.

[0018] According to the data fault tolerance method provided in the application, the attribute constraint information comprises at least one of a data type constraint, an optional item constraint, a value range type constraint and a value range length constraint.

[0019] The application further provides a data fault tolerance device, comprising:

[0020] A determination unit is configured to determine to-be-run data on a running platform;

[0021] The checking unit is configured to perform path constraint checking on the to-be-run data based on a path constraint rule to obtain a path constraint checking result, wherein the path constraint rule is configured to represent information about existence of a data item of standard data and existence of attribute constraint of the data item, and the standard data refers to data meeting a running requirement of the running platform.

[0022] The fault tolerance unit is configured to, in a case where the path constraint checking result indicates that the path information of the to-be-run data matches the path constraint rule, perform validity constraint checking on the to-be-run data based on an attribute constraint rule, and perform fault tolerance processing on the to-be-run data based on a validity constraint checking result, wherein the attribute constraint rule is configured to represent attribute constraint information of the standard data.

[0023] The present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the data fault tolerance method according to any one of the above when executing the program.

[0024] The present application also provides a non-transitory computer readable storage medium, which stores a computer program, wherein the computer program is executable on a processor to implement the steps of the data fault tolerance method according to any one of the above.

[0025] The present application also provides a computer program product, comprising a computer program, wherein the computer program is executable on a processor to implement the steps of the data fault tolerance method according to any one of the above.

[0026] The data fault tolerance method and device provided by the present application perform constraint checking on to-be-run data based on a path constraint rule and an attribute constraint rule, so that the to-be-run data can be flexibly constrained and checked regardless of the format of the to-be-run data, and the method and device can be applied to multi-element data constraint checking in an Internet of Things data scenario. Meanwhile, the path constraint rule can perform constraint checking on path information of the to-be-run data, and the attribute constraint rule can perform constraint checking on validity of the to-be-run data, that is, the path constraint rule and the attribute constraint rule perform constraint checking on part of the to-be-run data respectively instead of performing constraint checking on the to-be-run data as a whole, so that the to-be-run data can be flexibly constrained and checked according to different running platform requirements, the bandwidth occupation is reduced, the data checking processing with large throughput is met, and the fault tolerance processing efficiency is improved. BRIEF DESCRIPTION OF DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings required by the embodiments or prior art description. Obviously, the drawings described below are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.

[0028] Figure 1 is a flowchart of the data fault-tolerant method provided by the present application;

[0029] Figure 2 is a structural diagram of the data fault-tolerant device provided by the present application;

[0030] Figure 3 is a structural diagram of the electronic device provided by the present application. DETAILED DESCRIPTION

[0031] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below in combination with the drawings in the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.

[0032] In the conventional method, the fault-tolerant processing is typically performed by XML Schema constraint. However, the XML Schema constraint is only applicable to the data in XML format, and cannot perform fault-tolerant processing on diversified data in different formats, that is, the XML Schema constraint is not applicable to the diversified data in the Internet of Things scenario.

[0033] Meanwhile, the XML Schema constraint is a constraint on the whole data, so that the fault-tolerant processing is centralized, which occupies the bandwidth and storage space, increases the burden of the central processing platform, increases the technical implementation and reliability risk of the central platform, and reduces the fault-tolerant processing efficiency. The XML Schema constraint form is a constraint on the whole data, and cannot perform fault-tolerant processing on a part of the subset of the data, that is, the fault-tolerant processing mode has low flexibility.

[0034] In addition, when the XML Schema constraint is adopted, the receiving end and the sending end of the data need to reach an agreement to perform verification and fault-tolerant processing on the data, that is, the fault-tolerant processing is limited by the strict pre-agreement of the receiving end and the sending end, and is not suitable for flexible deployment in the diversified and dynamic data terminal scenarios in the super-large-scale Internet of Things environment.

[0035] In view of this, the present application provides a data fault-tolerant method. Figure 1is a flowchart of a data fault-tolerant method provided by the present application, as shown in the figure, the method comprises the following steps: Figure 1

[0036] Step 110, determining the to-be-run data on the running platform.

[0037] Here, the to-be-run data is the data that needs to be fault-tolerant, which can be Internet of Things data, that is, the to-be-run data can be any type of multi-element data. The running platform refers to the running environment of the to-be-run data. If the to-be-run data is affected by some factors, errors may occur when running on the running platform. Therefore, the present application needs to verify the to-be-run data and perform fault-tolerant processing when it is confirmed that the to-be-run data has errors, so that the to-be-run data can run normally on the running platform.

[0038] Step 120, performing path constraint verification on the to-be-run data based on the path constraint rule to obtain a path constraint verification result; the path constraint rule is used to represent the information of the existence of the data item of the standard data and the existence of the attribute constraint; the standard data refers to the data that meets the running requirements of the running platform.

[0039] Specifically, the standard data refers to the data that meets the running requirements of the running platform, that is, the standard data can be understood as data that can run normally on the running platform. Since the running requirements of different running platforms are different, such as path constraints, attribute constraints, etc., in order to ensure that the to-be-run data can run normally on the running platform, it is necessary to perform constraint verification on the to-be-run data according to the path constraint information and attribute constraint information of the standard data. If the to-be-run data passes the constraint verification, it indicates that the path information and attribute information of the to-be-run data meet the running requirements of the running platform.

[0040] It should be noted that since the running platform usually has constraint requirements for data in certain specific paths, if the to-be-run data is subjected to path constraint verification and attribute constraint verification at the same time, it will waste verification resources, reduce verification efficiency, and further reduce fault-tolerant processing efficiency. For example, the running platform has attribute constraint conditions for data in path a, but has no attribute constraint conditions for data in path b. If the data in path b is verified at this time, it will waste verification resources.

[0041] ​To this end, the embodiment of the present application first performs path constraint verification on the to-be-run data based on the path constraint rule to determine whether the path of the to-be-run data is under the constraint condition of the path constraint rule. If yes, it indicates that the running platform has attribute constraints on the to-be-run data of the corresponding path, and further verification of the attribute information of the to-be-run data is needed, that is, the validity of the to-be-run data needs to be verified.

[0042] Therefore, based on the path constraint rule, the path constraint verification can be performed on the to-be-run data to obtain the path constraint verification result. It can be understood that if the running platform has no constraints on the data attributes of the path corresponding to the to-be-run data, the corresponding path constraint verification result is that the path information of the to-be-run data does not match the path constraint rule; if the running platform has constraints on the data attributes of the path corresponding to the to-be-run data, the corresponding path constraint verification result is that the path information of the to-be-run data matches the path constraint rule.

[0043] In step 130, in the case that the path constraint verification result is that the path information of the to-be-run data matches the path constraint rule, the validity constraint verification is performed on the to-be-run data based on the attribute constraint rule, and the fault-tolerant processing is performed on the to-be-run data based on the validity constraint verification result; the attribute constraint rule is used to represent the attribute constraint information of the standard data.

[0044] Specifically, in the case that the path constraint verification result is that the path information of the to-be-run data matches the path constraint rule, it indicates that the running platform has constraints on the data attributes of the path corresponding to the to-be-run data, and therefore the attribute information of the to-be-run data needs to be further verified, that is, the validity constraint verification is performed on the to-be-run data, that is, the validity constraint verification is performed on the attribute information of the to-be-run data based on the attribute constraint rule. If the validity constraint verification result is that the attribute information of the to-be-run data matches the attribute constraint rule, it indicates that the to-be-run data meets the running requirements of the running platform and can normally run on the running platform; if the constraint verification result is that the attribute information of the to-be-run data does not match the attribute constraint rule, it indicates that the to-be-run data does not meet the running requirements of the running platform, and at this time, the fault-tolerant processing needs to be performed on the to-be-run data, such as processing or prompting the error information in the to-be-run data, so that the to-be-run data after the fault-tolerant processing can meet the running requirements of the running platform. The attribute constraint information includes data type, value range type, value range length, etc., which are not limited by the embodiment of the present application.

[0045] For example, the running platform requires that the integer value under path a, path b and path c must be less than 100 at runtime, and the path constraint rule can be determined as path a, path b and path c, and the attribute constraint rule is that the integer value is less than 100. Therefore, after the to-be-run data is determined, the to-be-run data can be first subjected to path constraint verification based on the path constraint rule to determine whether the path of the to-be-run data belongs to any one of path a, path b and path c, and if yes, it indicates that the to-be-run data needs to be subjected to attribute constraint verification, and at this time, the to-be-run data is subjected to attribute constraint verification based on the attribute constraint rule to determine whether the integer value of the to-be-run data is less than 100, and if yes, the verification passes, that is, it indicates that the to-be-run data meets the running requirement of the running platform. If not, it indicates that the to-be-run data does not meet the running requirement of the running platform, and at this time, the to-be-run data can be subjected to fault tolerance processing.

[0046] It can be seen that the data fault tolerance method provided in the embodiment of the present application improves the constraint verification of the to-be-run data based on the path constraint rule and the attribute constraint rule, so that the constraint verification of the to-be-run data of different formats can be flexibly performed without being limited by the format of the to-be-run data, and the multi-element data constraint verification in the Internet of Things data scene can be applied. At the same time, the path constraint rule in the embodiment of the present application can perform constraint verification on the path information of the to-be-run data, and the attribute constraint rule can perform validity constraint verification on the attribute information of the to-be-run data, that is, the path constraint rule and the attribute constraint rule in the embodiment of the present application perform constraint verification on part of the information of the to-be-run data, rather than the whole to-be-run data. Not only can the to-be-run data be flexibly subjected to constraint verification according to different running platform requirements, but also the bandwidth occupation is reduced, the data verification processing with large throughput is met, and the fault tolerance processing efficiency is improved.

[0047] Based on the above embodiment, the fault tolerance processing of the to-be-run data based on the validity constraint verification result includes:

[0048] In the case that the validity constraint verification result is that the attribute information of the to-be-run data does not match the attribute constraint rule, the to-be-run data is subjected to fault tolerance processing.

[0049] Specifically, after the attribute information of the to-be-run data is subjected to validity constraint verification based on the attribute constraint rule, a validity constraint verification result is obtained. If the validity constraint verification result is that the attribute information of the to-be-run data matches the attribute constraint rule, it indicates that the to-be-run data meets the running requirement of the running platform and can normally run on the running platform. If the constraint verification result is that the attribute information of the to-be-run data does not match the attribute constraint rule, it indicates that there is error information in the to-be-run data, that is, the to-be-run data does not meet the running requirement of the running platform, and at this time, the to-be-run data needs to be subjected to fault-tolerant processing, such as processing or prompting the error information in the to-be-run data, so that the to-be-run data after fault-tolerant processing can meet the running requirement of the running platform.

[0050] Based on any of the above embodiments, the path constraint rule is determined based on the following steps:

[0051] Determine the path constraint information of the standard data based on the running stage of the to-be-run data on the running platform;

[0052] Determine the path constraint rule based on the path constraint information of the standard data.

[0053] Specifically, for different running stages, the path constraint information of the standard data on the running platform is different. Therefore, before the path constraint rule is determined, the path constraint information of the standard data needs to be determined based on the running stage of the to-be-run data on the running platform. For example, when the running stage is stage 1, the object of the path constraint information of the standard data on the running platform is path a; when the running stage is stage 2, the object of the path constraint information of the standard data on the running platform is path b.

[0054] After the path constraint information of the standard data is determined, the corresponding path constraint rule can be generated according to the path constraint information. For example, the corresponding C language code can be generated based on the path constraint information of the standard data, and then the corresponding path constraint rule is obtained, so as to implement path constraint verification on the to-be-run data.

[0055] As can be seen, the embodiments of the present application can flexibly determine the path constraint information of the corresponding standard data according to different running stages on the running platform, and then can flexibly determine the path constraint rule based on the path constraint information of the standard data, that is, the path constraint rule in the embodiments of the present application is dynamically adjustable and can be flexibly applied to different scenarios.

[0056] Based on any of the above embodiments, the attribute constraint rule is determined based on the following steps:

[0057] Determine the attribute constraint information of the standard data based on the running stage of the to-be-run data on the running platform;

[0058] Determine the attribute constraint rule based on the attribute constraint information of the standard data.

[0059] Specifically, for different running stages, the running platform has different attribute constraint information of the standard data. Therefore, before determining the attribute constraint rule, it is necessary to determine the attribute constraint information of the standard data based on the running stage of the to-be-run data on the running platform. For example, in the running stage 1, the object of the attribute constraint information of the standard data on the running platform is an integer value; in the running stage 2, the object of the attribute constraint information of the standard data on the running platform is a real value.

[0060] After the attribute constraint information of the standard data is determined, the corresponding attribute constraint rule can be generated according to the attribute constraint information. For example, the corresponding C language code can be generated based on the attribute constraint information of the standard data, and then the corresponding attribute constraint rule is obtained, so as to realize the validity constraint check on the to-be-run data.

[0061] Therefore, the embodiment of the present application can flexibly determine the attribute constraint information of the corresponding standard data according to different running stages on the running platform, and then can flexibly determine the attribute constraint rule based on the attribute constraint information of the standard data, that is, the attribute constraint rule in the embodiment of the present application is dynamically adjustable, and can be flexibly applied to different scenes.

[0062] Based on any of the above embodiments, the path constraint information includes at least one of path type constraint, path relativity constraint, path length field length constraint, path length constraint and path content constraint.

[0063] Specifically, the path constraint information includes at least one of path type constraint, path relativity constraint, path length field length constraint, path length constraint and path content constraint. Table 1 is a path constraint information comparison table, as shown in Table 1, the path constraint information includes path type constraint T, path relativity constraint A, path length field length constraint M, path length constraint L and path content constraint P.

[0064] Table 1

[0065]

[0066] Wherein, the path type includes Offset, XPath, OID, JQ and the like. Table 2 is a path type code representation comparison table, as shown in Table 2, when the path type is Offset, the corresponding code representation is 0. It should be noted that the path type in Table 2 is an example, but is not limited to the path type in Table 2, and other path types can also be included, and the embodiment of the present application does not make specific limitation thereto.

[0067] Table 2

[0068]

[0069] According to any of the above embodiments, the attribute constraint information comprises at least one of a data type constraint, an optional item constraint, a value range type constraint, and a value range length constraint.

[0070] Specifically, the attribute constraint information comprises at least one of a data type constraint, an optional item constraint, a value range type constraint, and a value range length constraint. Table 3 is a table of attribute constraint information, as shown in Table 3, the attribute constraint information comprises a path type constraint T, a path relativity constraint A, a path length field length constraint M, a path length constraint L, and a path content constraint P.

[0071] Table 3

[0072]

[0073] The data type comprises an integer value, a real value, a logical value, a literal value, etc. Table 4 is a table of data type code representation, as shown in Table 4, when the data type is an integer value, the corresponding code representation is 1.

[0074] Table 4

[0075] Code representation Data type Meaning 0 Undefined Undefined value 1 Int Integer value 2 Real Real value 3 Boolean Logical value 4 Text Text value 5 List List value 6 Union Union value

[0076] The data fault-tolerant device provided by the application is described below, and the data fault-tolerant device described below can be referred to each other corresponding to the data fault-tolerant method described above.

[0077] According to any of the above embodiments, the application further provides a data fault-tolerant device, as shown in the figure, the device comprises: Figure 2 A determination unit 210 is configured to determine to-be-run data on a running platform;

[0078] A verification unit 220 is configured to perform path constraint verification on the to-be-run data based on a path constraint rule to obtain a path constraint verification result; the path constraint rule is used to represent information about data item existence and attribute constraint existence of standard data, and the standard data refers to data meeting running requirements of the running platform;

[0079] A fault-tolerant unit 230 is configured to, in a case where the path constraint verification result is that path information of the to-be-run data matches the path constraint rule, perform validity constraint verification on the to-be-run data based on an attribute constraint rule, and perform fault-tolerant processing on the to-be-run data based on a validity constraint verification result; the attribute constraint rule is used to represent attribute constraint information of the standard data.

[0080] According to any of the above embodiments, the fault-tolerant unit 230 is configured to:

[0081]

[0082] ​In a case where the validity constraint checking result is that the attribute information of the to-be-run data does not match the attribute constraint rule, the to-be-run data is subjected to fault tolerance processing.

[0083] According to any one of the above embodiments, the apparatus further comprises:

[0084] The first information determination unit is configured to determine path constraint information of the standard data based on a running stage of the to-be-run data on the running platform.

[0085] The first rule determination unit is configured to determine the path constraint rule based on the path constraint information of the standard data.

[0086] According to any one of the above embodiments, the apparatus further comprises:

[0087] The second information determination unit is configured to determine attribute constraint information of the standard data based on a running stage of the to-be-run data on the running platform.

[0088] The second rule determination unit is configured to determine the attribute constraint rule based on the attribute constraint information of the standard data.

[0089] According to any one of the above embodiments, the path constraint information comprises at least one of a path type constraint, a path relativity constraint, a path length field length constraint, a path length constraint, and a path content constraint.

[0090] According to any one of the above embodiments, the attribute constraint information comprises at least one of a data type constraint, an optional item constraint, a value range type constraint, and a value range length constraint.

[0091] Figure 3 is a structural schematic diagram of an electronic device provided by the present application, as Figure 3As shown, the electronic device can include a processor 310, a memory 320, a communications interface 330, and a communications bus 340, wherein the processor 310, the memory 320, and the communications interface 330 complete mutual communication through the communications bus 340. The processor 310 can invoke a logical instruction in the memory 320 to execute a data fault-tolerant method, which includes determining to-be-run data on a running platform, performing path constraint verification on the to-be-run data based on a path constraint rule to obtain a path constraint verification result, the path constraint rule being used to represent information of data item existence and attribute constraint existence of standard data, the standard data referring to data meeting running requirements of the running platform, in a case where the path constraint verification result is path information of the to-be-run data matching the path constraint rule, performing validity constraint verification on the to-be-run data based on an attribute constraint rule, and performing fault-tolerant processing on the to-be-run data based on a validity constraint verification result, the attribute constraint rule being used to represent attribute constraint information of the standard data.

[0092] In addition, the logical instruction in the memory 320 described above can be implemented in the form of a software functional unit and sold or used as an independent product, and can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application essentially or in part or parts of the technical solutions that make contributions to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0093] In another aspect, the present application also provides a computer program product, which comprises a computer program stored on a non-transitory computer-readable storage medium, and the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer can execute the data fault-tolerant method provided by the above method, which comprises: determining to-be-run data on a running platform; performing path constraint verification on the to-be-run data based on a path constraint rule to obtain a path constraint verification result; the path constraint rule is used to represent information of data item existence and attribute constraint existence of standard data, and the standard data refers to data meeting running requirements of the running platform; in a case where the path constraint verification result is that path information of the to-be-run data matches the path constraint rule, performing validity constraint verification on the to-be-run data based on an attribute constraint rule, and performing fault-tolerant processing on the to-be-run data based on a validity constraint verification result; and the attribute constraint rule is used to represent attribute constraint information of the standard data.

[0094] In another aspect, the present application also provides a non-transitory computer-readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the data fault-tolerant method provided by the above method, which comprises: determining to-be-run data on a running platform; performing path constraint verification on the to-be-run data based on a path constraint rule to obtain a path constraint verification result; the path constraint rule is used to represent information of data item existence and attribute constraint existence of standard data, and the standard data refers to data meeting running requirements of the running platform; in a case where the path constraint verification result is that path information of the to-be-run data matches the path constraint rule, performing validity constraint verification on the to-be-run data based on an attribute constraint rule, and performing fault-tolerant processing on the to-be-run data based on a validity constraint verification result; and the attribute constraint rule is used to represent attribute constraint information of the standard data.

[0095] The device embodiments described above are only schematic, wherein the units shown as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment. Those skilled in the art can understand and implement without creative labor.

[0096] Those skilled in the art can clearly understand the technical solutions of the various embodiments from the above description of the embodiments, and the various embodiments can be implemented by means of software with the necessary general hardware platforms, and of course, can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part of the prior art that makes a contribution, can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0097] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A data fault tolerance method, characterized in that, include: Determine the data to be run on the operating platform; the data to be run is multi-dimensional data of any type and is not subject to format restrictions; Based on path constraint rules, path constraint verification is performed on the data to be run to obtain path constraint verification results; the path constraint rules are used to characterize the existence of data items and attribute constraints of standard data, and the standard data refers to data that meets the running requirements of the running platform. If the path constraint verification result shows that the path information of the data to be run matches the path constraint rule, then based on the attribute constraint rule, the attribute information of the data to be run is validated for validity constraints, and fault tolerance processing is performed on the data to be run based on the validity constraint verification result; the attribute constraint rule is used to characterize the attribute constraint information of the standard data. The path constraint rules are determined based on the following steps: Based on the running stage of the data to be run on the running platform, determine the path constraint information of the standard data; Based on the path constraint information of the standard data, the path constraint rules are determined. The attribute constraint rules are determined based on the following steps: Based on the running stage of the data to be run on the running platform, determine the attribute constraint information of the standard data; The attribute constraint rules are determined based on the attribute constraint information of the standard data.

2. The data fault tolerance method according to claim 1, characterized in that, The fault-tolerant processing of the data to be run based on the validity constraint verification results includes: If the validity constraint verification result indicates that the attribute information of the data to be run does not match the attribute constraint rules, the data to be run will be subjected to fault tolerance processing.

3. The data fault tolerance method according to any one of claims 1 to 2, characterized in that, The path constraint information includes at least one of the following: path type constraint, path relativity constraint, path length field length constraint, path length constraint, and path content constraint.

4. The data fault tolerance method according to any one of claims 1 to 2, characterized in that, The attribute constraint information includes at least one of the following: data type constraint, optional constraint, value range type constraint, and value range length constraint.

5. A data fault-tolerant device, characterized in that, include: The determining unit is used to determine the data to be run on the operating platform; The data to be processed can be of any type of multi-dimensional data and is not subject to format restrictions; The verification unit is used to perform path constraint verification on the data to be run based on path constraint rules, and obtain path constraint verification results; the path constraint rules are used to characterize the existence of data items and attribute constraints of standard data, and the standard data refers to data that meets the running requirements of the running platform. The fault-tolerant unit is used to perform validity constraint verification on the attribute information of the data to be run based on the attribute constraint rules when the path constraint verification result shows that the path information of the data to be run matches the path constraint rules, and to perform fault-tolerant processing on the data to be run based on the validity constraint verification result; the attribute constraint rules are used to characterize the attribute constraint information of the standard data. The path constraint rules are determined based on the following steps: Based on the running stage of the data to be run on the running platform, determine the path constraint information of the standard data; Based on the path constraint information of the standard data, the path constraint rules are determined. The attribute constraint rules are determined based on the following steps: Based on the running stage of the data to be run on the running platform, determine the attribute constraint information of the standard data; The attribute constraint rules are determined based on the attribute constraint information of the standard data.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the data fault tolerance method as described in any one of claims 1 to 4.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the data fault tolerance method as described in any one of claims 1 to 4.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the data fault tolerance method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Data verification method, data fault-tolerance method and device

    CN107102908A

  • XML file verification method and device

    CN110688823A