Disclosure of Invention
The embodiment of the invention provides a data management method, a data management device, electronic equipment and a storage medium, and aims to solve the problem that the existing data management mode is high in maintenance and management cost.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a data management method, including:
receiving a data management request, and searching mapping information associated with an identity according to the identity carried by the data management request, wherein the mapping information is information representing a mapping relation between any two data structures;
in response to the found mapping information associated with the identity identifier and the mapping information is in an available state, mapping conversion is carried out on the data corresponding to the data management request according to the mapping information;
carrying out format verification on the data subjected to mapping conversion to obtain a data verification result;
the format check comprises at least one of a characteristic check and a structure check, wherein the characteristic check is used for checking mapping conversion of characteristic information of the data, and the structure check is used for checking mapping conversion of structure-related information of the data.
Optionally, the method further comprises:
in response to a first condition, searching signature information of the data, and performing signature verification on the data based on the signature information;
if the signature information passes verification and the data meets the condition of omitting verification, the data verification result of the data is confirmed to be successful;
if the signature information is not verified, performing format verification on the data to obtain a data verification result;
the first condition comprises that the mapping information associated with the identity identifier is not found, or the mapping information associated with the identity identifier is found, and the mapping information is not in an available state; the omission checking condition comprises that the data structure and the version information of the data are not changed.
Optionally, the step of performing format check on the data after mapping conversion to obtain a data check result includes:
performing characteristic verification and structure verification on the data after mapping conversion;
responding to the data after mapping conversion and passing all format verification, confirming that the data verification result is successful in verification, and generating signature information of the data, wherein the signature information represents that the data verification is successful;
and in response to that the data after mapping conversion does not pass all format verification, confirming that the data verification result is verification failure.
Optionally, the method further comprises:
returning the data verification result to the initiator device of the data management request, so as to prompt the initiator device to send a notification to the receiver device of the data when the data verification result is successful;
wherein the receiver device obtains data and signature information of the data from a target storage area after receiving the notification; the target storage area is a storage area of data which is successfully verified.
Optionally, the method further comprises:
and in response to the data verification result being successful verification, returning the successfully verified data and the signature information of the data to the receiver equipment of the data, so as to perform signature verification on the data based on the signature information under the condition that a data management request of the receiver equipment for the data is received.
Optionally, the feature information includes at least one of a name, a type, a status, and a description of the data, and the structure-related information includes at least one of an attribute type, attribute information, a list, a fill-necessary, a default value, a constraint, a service status, and version information.
In a second aspect, an embodiment of the present invention provides a data management apparatus, including:
the system comprises a configuration module, a data management module and a mapping module, wherein the configuration module is used for configuring a data structure and mapping information and managing access requesters, and searching mapping information associated with an identity according to the identity carried by a data management request under the condition of receiving the data management request of any access requester, and the mapping information is information representing the mapping relation between any two data structures;
the verification module is used for mapping and converting the data corresponding to the data management request according to the mapping information under the condition that the mapping information configured by the identity identifier is found and the mapping information is in an available state; carrying out format verification on the data after mapping conversion to obtain a data verification result;
the format check comprises at least one of a characteristic check and a structure check, wherein the characteristic check is used for checking mapping conversion of characteristic information of the data, and the structure check is used for checking mapping conversion of structure-related information of the data.
Optionally, the verification module is further configured to:
in response to a first condition, searching signature information of the data, and performing signature verification on the data based on the signature information;
if the signature information passes verification and the data meets the condition of omitting verification, the data verification result of the data is confirmed to be successful;
if the signature information is not verified, performing format verification on the data to obtain a data verification result;
the first condition comprises that the mapping information associated with the identity identifier is not found, or the mapping information associated with the identity identifier is found, and the mapping information is not in an available state; the omission checking condition comprises that the data structure and the version information of the data are not changed.
Optionally, the verification module includes:
the verification processing submodule is used for carrying out characteristic verification and structure verification on the data after mapping conversion;
the signature information generation submodule is used for responding to the fact that the mapped and converted data pass all format verification, confirming that the data verification result is successful in verification and generating signature information of the data, wherein the signature information represents that the data verification is successful;
and in response to that the data after mapping conversion does not pass all format verification, confirming that the data verification result is verification failure.
Optionally, the apparatus further comprises:
a check result returning module, configured to return the data check result to the initiator device of the data management request, so as to prompt the initiator device to send a notification to a receiver device of the data when the data check result is a successful check;
wherein the receiver device obtains data and signature information of the data from a target storage area after receiving the notification; the target storage area is a storage area of data which is successfully verified.
Optionally, the apparatus further comprises:
and the data returning module is used for returning the successfully verified data and the signature information of the data to the receiver equipment of the data in response to the data verification result that the data is successfully verified, so that the signature verification is carried out on the data based on the signature information under the condition that a data management request of the receiver equipment for the data is received.
Optionally, the feature information includes at least one of a name, a type, a status, and a description of the data, and the structure-related information includes at least one of an attribute type, attribute information, a list, a fill-necessary, a default value, a constraint, a service status, and version information.
In a third aspect, an embodiment of the present invention additionally provides an electronic device, including: memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the data management method according to the first aspect.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the steps of the data management method according to the first aspect.
In the embodiment of the invention, the data structure and the related constraint are managed in real time through an independent device, so that the resource consumption required by data verification is reduced while the guarantee is provided for the specification of the upstream and downstream data structures. A complete life flow of data structures from creation, review, release, obsolete to decommissioning is provided. The method is suitable for various scene services upstream and downstream, and reduces the influence of dirty data on the system. Moreover, the unified management and control of the upstream and downstream data structures are realized, the increase of system complexity caused by dependence is avoided, and the maintenance cost is reduced.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart illustrating steps of a data management method according to an embodiment of the present invention is shown.
Step 110, receiving a data management request, and searching mapping information associated with an identity according to the identity carried by the data management request, wherein the mapping information is information representing a mapping relation between any two data structures;
step 120, in response to finding out the mapping information associated with the identity identifier, and when the mapping information is in an available state, mapping conversion is performed on the data corresponding to the data management request according to the mapping information;
step 130, performing format verification on the data subjected to mapping conversion to obtain a data verification result;
the format check comprises at least one of a characteristic check and a structure check, wherein the characteristic check is used for checking mapping conversion of characteristic information of the data, and the structure check is used for checking mapping conversion of structure-related information of the data.
In the embodiment of the invention, the data structure is managed, verified and converted to check and convert the data according to requirements, so that the development efficiency is improved, the development cost and the maintenance cost are reduced, the network cost for invalid data transmission is reduced, and the risk caused by the change of the data structure is reduced.
That is, in the embodiment of the present invention, a device may perform a data management operation, and different devices (e.g., a client, a server, a subscriber, a distributor, etc.) may perform a data management operation on their required data by accessing the device, for example, performing operations such as data structure conversion, data verification, etc. Moreover, the related procedures required in the data structure management and verification process can be divided into: the configuration management and the verification process are two parts. The configuration management may include managing data features, data structures, mapping relationships between different data structures, historical version information of configuration changes, and the like, and the verification processing may include conversion of information or data, feature extraction, feature verification, structure verification, and the like. Correspondingly, the device for user data management operation can be divided into two parts, namely a configuration management module and a verification processing module according to different processes. The configuration management module may perform the configuration management process, and the verification processing module may perform the verification processing process.
In addition, different devices can access corresponding devices according to own requirements, set own identity identifiers, configure data structures, mapping information and the like. In the embodiment of the present invention, the data structure and the mapping information may be configured in any available manner, which is not limited to this embodiment of the present invention. After the configuration is completed, the association relationship between the mapping information and the identity of the corresponding device can be established, so that the related mapping information can be called based on the identity in the following.
For example, characteristic information of data may be defined and managed, including: name, type, status (in use, obsolete, etc.), description of the data. And different characteristic information can be used as a reusable standard data information specification, and different options can be selected to set different characteristic information. Further, the related information of the data structure may be defined and managed, that is, the related information of the data structure is set for different data types in the feature information, and the related information includes, for example: attribute type (i.e., different data types in the feature information), attribute information, whether to list, whether to fill, default values, constraints, service state of the structure, version information, and so forth.
The mapping information may then include: mapping identification, mapping relationship (corresponding relationship between source ID and target ID, that is, corresponding relationship between ID of source data structure and ID of target data structure), version information, service state of mapping relationship (for example, creation state, audit state, release state, abandonment state, deactivation state, etc.).
The mapping identifier is used for distinguishing different mapping relations. And the service state can be used for marking whether the mapping relation provides services for the outside. The release state can provide service to the outside, the obsolete state does not access the new service (i.e. does not provide service to the new system), but still provides service to the historical system (i.e. the system that has been accessed), and when all the historical information (historical service system) using mapping is deactivated, the mapping relationship in the obsolete state can be changed from the obsolete state to the invalid state.
For the apparatus, after receiving a data management request initiated by any device, mapping information associated with an identity may be searched according to the identity carried in the data management request, where the mapping information is information representing a mapping relationship between any two data structures. The identity identifier may be understood as identification information that is allocated to the device by the corresponding apparatus and used for characterizing the identity of the device.
If the mapping information associated with the identity is found and the mapping information is in an available state, mapping conversion can be performed on the data corresponding to the data management request according to the corresponding mapping information. That is, the data can be automatically converted by the mapping relation included in the configured mapping information. The method comprises the following steps: attribute name changes, structural hierarchy changes, etc.
After the mapping conversion, since the data structure changes, in order to ensure that the mapping-converted data has no risk of errors, confusion, and the like, format verification can be further performed on the mapping-converted data to obtain a data verification result.
The format check may include at least one of a feature check for checking mapping conversion of feature information of the data and a structure check for checking mapping conversion of structure-related information of the data.
In the embodiment of the present invention, the feature checksum structure may be verified in any available manner, which is not limited in this embodiment of the present invention. And any one of the feature verification and the structure verification can be performed according to the requirement, or the feature verification and the structure verification can be performed simultaneously, and when the format verification is performed on the data, the sequence of the feature verification and the structure verification can be set by user according to the requirement, which is not limited in the embodiments of the present invention.
Referring to fig. 2, in the embodiment of the present invention, the method may further include:
step 140, in response to a first condition, searching signature information of the data, and performing signature verification on the data based on the signature information;
step 150, if the signature information passes verification and the data meets the condition of omitting verification, confirming that the data verification result of the data is successful;
step 160, if the signature information is not verified, performing format verification on the data to obtain a data verification result;
the first condition comprises that the mapping information associated with the identity identifier is not found, or the mapping information associated with the identity identifier is found, and the mapping information is not in an available state; the omission checking condition comprises that the data structure and the version information of the data are not changed.
In practical applications, the usage scenarios of the device for data management by the user may include, but are not limited to, the following:
1. accessing a client, wherein the client acquires standardized data as parameters through a device to initiate remote calling;
2. the server side is accessed, and after receiving the request of the client side and converting the request according to the convention, the server side executes the real service;
3. the message subscription end is accessed, and the risk brought by the change of the message structure provided by the service end is reduced.
4. The message issuing end is accessed to restrict each issuer to issue data according to the message specification.
5. And (4) double-end access, simultaneous access of the client and the server, and verification before sending a request and after receiving the request. The publishing terminal and the subscribing terminal are accessed simultaneously, and verification is carried out before the message is published and after the message is subscribed.
In addition, forced access may be performed, for example, a downstream system (e.g., a data receiver or a user such as a server or a subscriber) requires forced access by an upstream system (e.g., a data provider such as a client or a publisher) in order to ensure the data structure is correct. After the upstream access, the format of the data is checked by the device, and the returned data may have signature information for identifying that the data passes the relevant format check. The downstream system can directly confirm the validity of the data through the signature information without performing a duplicate check.
As can be seen from the above analysis, in the embodiment of the present invention, an initiator of the data management request may be a provider of data (e.g., a client, a publisher, etc.) and may also be a receiver of data (e.g., a server, a subscriber, etc.). Moreover, the upstream system may have actively accessed the device and performed format check on the corresponding data to return the check information, or in response to a request of the downstream system, the upstream system may have forcibly accessed the device and performed format check on the corresponding data to return the check information, and then the check information of the corresponding data may be acquired at this time.
If the mapping information associated with the identity identifier is not found, or the mapping information associated with the identity identifier is found, and the mapping information is not in an available state, it indicates that the data corresponding to the data management request may not be subjected to mapping conversion at this time, and then the verification information originally included in the data management request may represent whether the corresponding data passes verification. Therefore, the signature information of the corresponding data can be searched, the data is subjected to signature verification (namely, the authenticity of the signature information is verified) based on the signature information, and if the signature information passes the verification (namely, the signature information is true) and the data meets the condition of omitting verification, the data verification result of the corresponding data can be confirmed to be successful in verification; and if the signature information is not verified, format verification can be further carried out on the corresponding data to obtain a data verification result.
The omission verification condition includes that the data structure and the version information of the data are not changed, that is, the data structure and the version information of the data corresponding to the data management request are not changed, for example, the data structure and the version information are not subjected to mapping conversion.
Referring to fig. 2, in the embodiment of the present invention, a process of performing format check on the data after being subjected to mapping conversion to obtain a data check result further includes:
131, performing characteristic verification and structure verification on the data subjected to mapping conversion;
step 132, responding to that the mapped and converted data passes all format verification, confirming that the data verification result is verification success, and generating signature information of the data, wherein the signature information represents that the data verification is successful;
step 133, in response to that the mapped and converted data does not pass all format verification, determining that the data verification result is verification failure.
And (4) feature verification: and converting and checking the related data according to the type of the characteristic. The data transmitted by the requester are all data without type constraints. And the characteristic check is to apply constraint on the type conversion of the data. If errors occur in the conversion and verification processes, early warning can be performed, and specific rules, modes and the like of the early warning can be set in a user-defined mode according to requirements, so that the embodiment of the invention is not limited. If the error exists, the characteristic verification is not passed, and if the error does not exist, the characteristic verification is passed.
Structure verification: after the data is converted according to the characteristics, the structure-related information in the data can be further checked. For example, is data missing a mandatory item? And if the number of the chips is not large, early warning is performed. Is a default value added? Is structure changed? And checking a nested structure. Is the constraint satisfied? And (4) carrying out constraint condition checking (such as checking of relations of range values, enumerated values, prefixes, suffixes, inclusions, equivalence and the like). And returning the converted data if the constraint is met, otherwise, initiating early warning. The specific rules, modes and the like of the early warning can be set by self according to requirements, and the embodiment of the invention is not limited.
The specific verification contents of the feature verification and the structure verification can be set by self according to requirements, and the embodiment of the invention is not limited.
In addition, in the embodiment of the present invention, the specific process of performing format check on the data in thestep 160 to obtain the data check result is similar to the manner of performing format check on the data after mapping conversion in the step 131-133, and the step 131-133 may be specifically referred to, which is not described herein again.
Optionally, in an embodiment of the present invention, the method may further include:
step 170, returning the data verification result to the initiator device of the data management request, so as to prompt the initiator device to send a notification to the receiver device of the data when the data verification result is successful; wherein the receiver device obtains data and signature information of the data from a target storage area after receiving the notification; the target storage area is a storage area of data which is successfully verified.
In the embodiment of the present invention, after the data is verified, a data verification result may be returned to the initiator device of the data management request. For the initiator device, if it is necessary to send corresponding data to other devices, that is, the receiver device, after obtaining a data verification result of the corresponding data (if mapping information exists, the mapping information is data after mapping conversion, and if mapping information does not exist, the mapping information is data that is not subjected to mapping conversion), if the data verification result is successful, the initiator device may send a notification to the receiver device of the corresponding data.
For the receiver device, after receiving the notification, the receiver device may obtain the corresponding data and the signature information of the corresponding data from a target storage area, where the target storage area is preset to store the data that is successfully verified.
The target storage area can be set by self according to requirements, and the embodiment of the invention is not limited. For example, the target storage area may be set to a designated storage area in the above-described apparatus for data management, or the target storage area may be set to be located in a designated server, or the like.
In addition, for the device performing data management, after the data or the data after mapping conversion is verified, the corresponding data may be stored in the target storage area. Moreover, when the initiator device sends the notification to the receiver device, the address of the target storage area may be carried in the notification.
Of course, if the target storage area is located in the device for data management, the receiving device may directly request to obtain the corresponding data from the device for data management after receiving the notification, and the embodiment of the present invention is not limited thereto.
Optionally, in an embodiment of the present invention, the method may further include:
step 180, in response to that the data verification result is successful, returning the successfully verified data and the signature information of the data to the receiver device of the data, so as to perform signature verification on the data based on the signature information when receiving a data management request of the receiver device for the data.
In addition, in the embodiment of the present invention, when the data verification result is that the verification is successful, the successfully verified data and the signature information of the corresponding data may also be directly returned to the receiver device of the corresponding data, so that the signature verification may be performed on the corresponding data based on the signature information of the corresponding data when a data management request for the corresponding data is subsequently received by the corresponding receiver device.
If the receiver device of the data obtains the data in the manner described in step 180, the interaction with the data provider may be reduced compared to the manner described in step 170, that is, the data may be directly obtained from the device performing data management without obtaining the data through the data provider device.
In addition, if the data receiver checks the data by sending the data management request after receiving the data, or the data provider checks the data by sending the data management request before issuing the data, the data checking result and the related data may be directly returned to the requester at this time, which is not limited in the embodiment of the present invention.
For example, in the case of successful verification, if the data is not subjected to mapping conversion, information of successful verification, such as signature information, may be returned to the requesting party, and at this time, since the data is unchanged, the same data may not be repeatedly returned, and a prompt message that the data is unchanged may be directly returned; and if the data is subjected to mapping conversion, the data subjected to mapping conversion can be returned to the requester. And if the check fails, a failure identification and reason may be returned.
Optionally, in this embodiment of the present invention, the feature information includes at least one of a name, a type, a status, and a description of the data, and the structure-related information includes at least one of an attribute type, attribute information, whether to list, whether to fill, a default value, a constraint condition, a service status, and version information.
Referring to fig. 3, a schematic structural diagram of a data management apparatus in an embodiment of the present invention is shown.
The data management device of the embodiment of the invention comprises: a configuration module 210 and a verification module 220.
The functions of the modules and the interaction relationship between the modules are described in detail below.
A configuration module 210, configured to configure a data structure and mapping information, and manage access requesters, and search mapping information associated with an identity identifier according to the identity identifier carried in a data management request when receiving the data management request from any access requester, where the mapping information is information representing a mapping relationship between any two data structures;
the checking module 220 is configured to, when the mapping information configured by the identity identifier is found and the mapping information is in an available state, perform mapping conversion on data corresponding to the data management request according to the mapping information; carrying out format verification on the data after mapping conversion to obtain a data verification result;
the format check comprises at least one of a characteristic check and a structure check, wherein the characteristic check is used for checking mapping conversion of characteristic information of the data, and the structure check is used for checking mapping conversion of structure-related information of the data.
Optionally, in this embodiment of the present invention, the verification module may further be configured to:
in response to a first condition, searching signature information of the data, and performing signature verification on the data based on the signature information;
if the signature information passes verification and the data meets the condition of omitting verification, the data verification result of the data is confirmed to be successful;
if the signature information is not verified, performing format verification on the data to obtain a data verification result;
the first condition comprises that the mapping information associated with the identity identifier is not found, or the mapping information associated with the identity identifier is found, and the mapping information is not in an available state; the omission checking condition comprises that the data structure and the version information of the data are not changed.
Optionally, in an embodiment of the present invention, the verification module further includes:
the verification processing submodule is used for carrying out characteristic verification and structure verification on the data after mapping conversion;
the signature information generation submodule is used for responding to the fact that the mapped and converted data pass all format verification, confirming that the data verification result is successful in verification and generating signature information of the data, wherein the signature information represents that the data verification is successful;
and in response to that the data after mapping conversion does not pass all format verification, confirming that the data verification result is verification failure.
Optionally, in an embodiment of the present invention, the apparatus may further include:
a check result returning module, configured to return the data check result to the initiator device of the data management request, so as to prompt the initiator device to send a notification to a receiver device of the data when the data check result is a successful check;
wherein the receiver device obtains data and signature information of the data from a target storage area after receiving the notification; the target storage area is a storage area of data which is successfully verified.
Optionally, in an embodiment of the present invention, the apparatus may further include:
and the data returning module is used for returning the successfully verified data and the signature information of the data to the receiver equipment of the data in response to the data verification result that the data is successfully verified, so that the signature verification is carried out on the data based on the signature information under the condition that a data management request of the receiver equipment for the data is received.
Optionally, in this embodiment of the present invention, the feature information may include at least one of a name, a type, a status, and a description of the data, and the structure-related information includes at least one of an attribute type, attribute information, whether to list, whether to fill, a default value, a constraint condition, a service status, and version information.
The data management device provided in the embodiment of the present invention can implement each process implemented in the method embodiments of fig. 1 to fig. 2, and is not described herein again to avoid repetition.
Fig. 4 is a schematic diagram of an apparatus for performing data management, that is, a schematic diagram of a data management apparatus in an embodiment of the present invention. The relevant modules required in the data structure management and verification process can be divided into: the configuration module and the check module are two parts. The configuration module manages data characteristics, data structures, mapping relationships between different data structures, historical version information of configuration changes, and the like, and according to different management contents, the configuration module may further perform the following functions: and a subdivision function of version management of historical version information of configuration change, characteristic management of data characteristics, structure management of data structures, mapping management of mapping relations and the like. The checking module is responsible for information or data conversion, feature extraction, feature checking, structure checking and the like, and comprises the following steps: and the subdivision functions of signature verification, mapping conversion, feature verification, structure verification and the like. Moreover, each subdivision function in the configuration module and the check module may be an individual module element, and each module element may interact with each other according to a requirement, and of course, each subdivision function may not be split into individual module elements, which is not limited in the embodiment of the present invention.
The specific content of the subdivision function of each part can be described in detail as follows:
and (3) feature management: defining and managing characteristic information of data, including: name, type, status (in use, obsolete, etc.), description of the data. The characteristic information can be used as a reusable standard data information specification.
For example, the types of data may include: character string, integer, floating point number, boolean, byte, date, structure, etc., and the structure type may be used for conversion in the structure check link. The states can be divided into a creation state, an audit state, a release state, a discard state, a stop state and the like, the feature information of the creation state and the audit state can be adjusted and verified for many times, the feature information cannot be changed in the release state, and the discard state no longer provides support for a new structure.
In addition, in the embodiment of the present invention, in order to facilitate standardized management of the data name, a naming specification may be made and an audit process may be established, which is not limited in the embodiment of the present invention.
Structure management: related information defining and managing data structures, including: attribute type (feature type or structure type), attribute information (feature or structure), whether to list, whether to fill, default values (applicable to feature type), constraints (applicable to feature type), service state of structure (e.g., creation state, audit state, release state, obsolete state, decommissioning state), version information, and the like. Wherein verification services are generally not provided externally for disabled structures.
In addition, in the embodiment of the present invention, each interface or service with input has a corresponding data structure as a parameter, that is, each interface or service with input can set its own required data structure in the form of parameter. And for different versions of data structure information, the service can be provided externally at the same time until all offline data are really called and then the data structure information is stopped. The feature type may be understood as a type other than the structure type in the type of the data in the feature management, and the feature type may be understood as a structure type in the type of the data in the feature management.
In the embodiment of the present invention, when setting the data structure, the feature information may be referred to and subjected to structure management, so as to obtain a data structure, that is, it can be understood that the feature management is a preceding step of setting the data structure, and the structure information of one data structure includes the feature information. Of course, in the embodiment of the present invention, the data structure may not be hierarchically arranged, but one data structure may be directly arranged according to a requirement each time, and the data structure is not divided into two parts, namely, the feature management part and the structure management part, which is not limited in the embodiment of the present invention.
Mapping management: mapping management of attributes (i.e., data structures, or feature types or structure types, etc.). The method comprises the following steps: mapping identification, mapping relationship (corresponding relationship between source ID and target ID, that is, corresponding relationship between ID of source data structure and ID of target data structure), version information, service state of mapping relationship (for example, creation state, audit state, release state, abandonment state, deactivation state, etc.).
Wherein the mapping identity is used to distinguish between different mappings. And the service state can be used for marking whether the mapping relation provides services for the outside. The release state can provide service to the outside, the obsolete state does not access the new service (i.e. does not provide service to the new system), but still provides service to the historical system (i.e. the system that has been accessed), and when all the historical information (historical service system) using mapping is deactivated, the mapping relationship in the obsolete state can be changed from the obsolete state to the invalid state.
And (3) access management: the method comprises the following steps of allocating identification (such as key value) to the accessed systems (such as the accessed client, server, subscription terminal, issuing terminal and the like) to identify and distinguish the accessed different systems, identifying the identity of a requester and carrying out subsequent processes. Furthermore, it is also possible to perform an operation of associating information such as whether to enforce a signature (which may be set by a data receiver) and a mapping, structure, and the like of a corresponding version.
Mandatory signature verification requires that the data requested by the data recipient must have passed the verification made by the device. The access management has no version information, but has perfect log information to record the access record of each access. In addition, in the embodiment of the present invention, the auditing process may also be accessed according to requirements, which is not limited herein.
In the embodiment of the present invention, when performing the related operations on the above-described feature management, structure management, and mapping management, information such as related history information, an operator, and operation time may be stored as needed.
Signature verification: in the case that the upstream system (e.g., data distributor, client, etc.) has been mapping-converted and verified in the present apparatus, the present apparatus may assign a signature to the verified data to characterize that the verified data is verified. The amount of verification can be reduced by signature verification (i.e., verification of the signature of the requested data) if the downstream system (e.g., data receiver, server, etc.) still performs verification, thereby improving verification efficiency. Of course, the downstream system may also force the upstream system to check to improve downstream efficiency. In addition, for the existing signature without mapping relation, conversion is needed, and the data with the same data structure and version can reduce repeated verification so as to reduce resource consumption.
Mapping conversion: and under the condition that the data structure of the requester is inconsistent with the data structure of the receiver, the automatic conversion of the data can be carried out through the configured mapping relation. The method comprises the following steps: attribute name changes, structural hierarchy changes, etc.
For attribute name change, the following is exemplified: assuming that the requester has an attribute name indicating a telephone number as phoneNo and the attribute name corresponding to the receiver is mobile, in order to ensure that the receiver can receive data available to itself, the attribute name phoneNo in the original data structure can be adaptively changed into mobile through mapping conversion to obtain the data structure of the receiver. It can be seen that mapping conversion can enable different attribute names of a single-layer structure to be adapted.
For the structure level change, the following is exemplified: assuming that one attribute of the requester is an attribute name under a gather structure, and the attribute name corresponding to the receiver is the gather name, mapping conversion enables information of different structural levels to be adaptive. The mapping conversion is to generate new data meeting the requirements of the data structure of the receiving party according to the mapping relation between different data structures, and then to perform conversion and verification according to the characteristics and the structure.
And (4) feature verification: and converting the related data according to the type of the characteristic. The data transmitted by the requester are all data without type constraints. And the characteristic check is to apply constraint on the type conversion of the data. If an error occurs in the conversion process, early warning can be performed, and specific rules, modes and the like of the early warning can be set in a user-defined mode according to requirements, so that the embodiment of the invention is not limited.
Structure verification: is the data missing a mandatory item after conversion of the data by feature? And if the number of the chips is not large, early warning is performed. Is a default value added? Is structure changed? And checking a nested structure. And (4) checking whether the constraint condition is met or not (such as checking of relations of range values, enumerated values, prefixes, suffixes, inclusions, equivalence and the like). And returning the converted data if the constraint is met, otherwise, initiating early warning. The specific rules, modes and the like of the early warning can be set by self according to requirements, and the embodiment of the invention is not limited.
The check failure directly returns the failure identification and the reason. And if no mapping information exists and the verification is successful, if no data supplementary conversion occurs in the verification process, the verification passing and signature information can be directly returned, otherwise, the converted result and signature information which accord with the constraint are returned.
The structure information and the mapping information can only provide access service for the latest version, and the historical version is classified into a waste state to provide service but not provide new access.
In the embodiment of the invention, the data structure and the related constraint are managed in real time through an independent device, so that the resource consumption required by data verification is reduced while the guarantee is provided for the specification of the upstream and downstream data structures. A complete life flow of data structures from creation, review, release, obsolete to decommissioning is provided. The method is suitable for various scene services upstream and downstream, and reduces the influence of dirty data on the system. Moreover, the unified management and control of the upstream and downstream data structures are realized, the increase of system complexity caused by dependence is avoided, and the maintenance cost is reduced.
Preferably, an embodiment of the present invention further provides an electronic device, including: the processor, the memory, and the computer program stored in the memory and capable of running on the processor, when executed by the processor, implement the processes of the above-mentioned information processing method embodiments, and can achieve the same technical effects, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements each process of the information processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, the details are not repeated here. The computer-readable storage medium may be a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.