Data conversion method and apparatus

By using a target data conversion rule library for validation and conversion during the JSON data conversion process, the problem of low efficiency in JSON data conversion is solved, achieving efficient data conversion and accuracy.

CN115080794BActive Publication Date: 2026-02-06TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110282575.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-16
Publication Date
2026-02-06
Estimated Expiration
2041-03-16

AI Technical Summary

Technical Problem

Existing JSON data conversion methods are inefficient, labor-intensive, and unable to efficiently handle data differences between different business units.

Method used

By obtaining the transformation category of the data to be transformed, the matching target data transformation rule is found from the data transformation rule library. Based on the target validation rule and the transformation rule, the JSON data is validated and transformed to generate the transformed JSON format data.

Benefits of technology

It improves the efficiency of JSON data conversion, reduces the workload of developers, and ensures the accuracy and efficiency of data conversion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115080794B_ABST
    Figure CN115080794B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data conversion method and device, and the present application relates to the field of cloud technology. The data conversion method in the embodiments of the present application comprises: obtaining to-be-converted data, the to-be-converted data being data in JSON format; based on a conversion category of the to-be-converted data, searching a data conversion rule library for a data conversion rule matched with the conversion category as a target data conversion rule for data conversion of the to-be-converted data; checking a field value in the to-be-converted data according to the target verification rule; if the field value in the to-be-converted data passes the check, performing conversion processing on the field value in the to-be-converted data based on the target conversion rule to generate converted data in JSON format. The technical scheme of the embodiments of the present application can effectively improve the conversion efficiency of data and reduce the workload of developers.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a data conversion method and device. BACKGROUND

[0002] JSON (JavaScript 0bject Notation) is a lightweight data exchange format, and the concise and clear hierarchy makes JSON an ideal data exchange language.

[0003] When data exchange is performed between different business parties in the Internet, data transmission is generally performed by using JSON data. Since different business parties have differentiated requirements for the same type of data, such as different field names or different data values of the same field name in the JSON data generated according to the data, the JSON data from the source object needs to be converted when data transmission is performed between different business parties.

[0004] The conversion method of the related art first parses the JSON data, and regenerates the JSON data according to the parsing result. In the case of a large number of data categories and a large number of business parties, the conversion method of the related art has the technical problems of low conversion efficiency and large workload. SUMMARY

[0005] The embodiments of the present application provide a data conversion method and device, which can solve the technical problems of low conversion efficiency and large workload of the conversion method of the related art.

[0006] Other characteristics and advantages of the present application will become apparent from the following detailed description, or will be learned by practice of the present application.

[0007] According to an aspect of an embodiment of the present application, a data conversion method is provided, comprising: obtaining to-be-converted data, the to-be-converted data being JSON format data; based on a conversion category of the to-be-converted data, searching a data conversion rule library to find a data conversion rule matched with the conversion category as a target data conversion rule for data conversion of the to-be-converted data, the conversion category being determined based on a data category of the to-be-converted data, a sender of the to-be-converted data and a receiver of the to-be-converted data, the target data conversion rule comprising a target verification rule and a target conversion rule; verifying a field value in the to-be-converted data according to the target verification rule; if the field value in the to-be-converted data passes the verification, performing conversion processing on the field value in the to-be-converted data based on the target conversion rule to generate converted JSON format data.

[0008] According to an aspect of some embodiments of the present application, a data conversion apparatus is provided, comprising: a first obtaining unit configured to obtain to-be-converted data, the to-be-converted data being in a JSON object representation format; a second obtaining unit configured to, based on a conversion category of the to-be-converted data, find, from a data conversion rule library, a data conversion rule matching the conversion category as a target data conversion rule for data conversion of the to-be-converted data, the conversion category being determined based on a field name contained in the to-be-converted data, a source object of the to-be-converted data, and a target object of the to-be-converted data, the target data conversion rule comprising a target verification rule and a target conversion rule; a verification unit configured to verify a field value in the to-be-converted data according to the target verification rule; and a conversion unit configured to, if the field value in the to-be-converted data passes verification, perform conversion processing on the field value in the to-be-converted data based on the target conversion rule, and generate converted JSON format data.

[0009] In some embodiments of the present application, based on the foregoing scheme, the verification unit is configured to: find, in the to-be-converted data, a first field having a same field name as a verification field, the verification field being a field defined in the target verification rule as needing to be verified; and verify a field value in the first field according to a field value verification rule defined by the target verification rule for the verification field.

[0010] In some embodiments of the present application, based on the foregoing scheme, the verification unit is configured to: if a data type corresponding to the field value in the first field is consistent with a data type defined by the field value verification rule for a field value in the verification field, determine that the field value verification in the to-be-converted data passes; and if the data type corresponding to the field value in the first field is inconsistent with the data type defined by the field value verification rule for the field value in the verification field, determine that the field value verification in the to-be-converted data fails.

[0011] In some embodiments of the present application, based on the foregoing scheme, the verification unit is configured to: a verification instruction, the verification instruction being an instruction for obtaining the field value in the first field; execute the verification instruction and obtain an execution result of the verification instruction after execution; if the execution result is that the field value is successfully obtained, determine that the field value verification in the to-be-converted data passes; and if the execution result is that the field value fails to be obtained, determine that the field value verification in the to-be-converted data fails.

[0012] In some embodiments of the present application, based on the foregoing scheme, the conversion unit is configured to: find a second field with the same field name as the conversion field in the data to be converted, the conversion field being a field that needs to be converted as defined by the target conversion rule; obtain field value generation information corresponding to the conversion field; generate a field value for updating the field value in the second field based on the field value generation information; and update the field value in the second field based on the generated field value to generate the converted JSON format data.

[0013] In some embodiments of the present application, based on the foregoing scheme, the conversion unit is configured to: if a second field with the same field name as the conversion field is not found in the data to be converted, add the conversion field as an added field in the data to be converted; generate an added field value based on the field value generation information corresponding to the added field; add the added field value to the field value of the added field; and add the added field with the added field value to the data to be converted to generate the converted JSON format data.

[0014] In some embodiments of the present application, based on the foregoing scheme, the conversion unit is configured to: select a field value from the field value in the second field based on the field value generation information; and generate a field value for updating the field value in the second field based on the selected field value.

[0015] In some embodiments of the present application, based on the foregoing scheme, the conversion unit is configured to: select a field value from the field value in a third field in the data to be converted based on the field value generation information, the third field being a field different from the second field in the data to be converted; and generate a field value for updating the field value in the second field based on the selected field value.

[0016] In some embodiments of the present application, based on the foregoing scheme, the data conversion rule is generated by an expression compiled by a structured query language.

[0017] According to an aspect of an embodiment of the present application, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements the data conversion method as described in the above embodiments.

[0018] According to an aspect of an embodiment of the present application, there is provided an electronic device comprising: one or more processors; and a storage device configured to store one or more programs, the one or more programs, when executed by the one or more processors, causing the one or more processors to implement the data conversion method as described in the above embodiments.

[0019] According to an aspect of some embodiments of the present application, a computer program product or computer program is provided, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the data conversion method provided in the various optional embodiments described above.

[0020] In the technical solutions provided in some embodiments of the present application, the data conversion rule matching the conversion category is found from the data conversion rule library as the target data conversion rule for the data conversion of the to-be-converted data based on the conversion category of the to-be-converted data, the conversion category is determined based on the data category of the to-be-converted data, the sender of the to-be-converted data and the receiver of the to-be-converted data, and the target data conversion rule includes a target verification rule and a target conversion rule; the field value in the to-be-converted data is verified according to the target verification rule; if the field value in the to-be-converted data passes the verification, the field value in the to-be-converted data is converted and processed based on the target conversion rule to generate the converted JSON format data. Since the field value in the to-be-converted data is converted and processed by the data conversion rule, it is not necessary to parse the to-be-converted data in JSON format, which can effectively improve the conversion efficiency of the data and reduce the workload of the developers.

[0021] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present application. BRIEF DESCRIPTION OF DRAWINGS

[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and serve to explain the principles of the present application. It is readily apparent to one of ordinary skill in the art that the accompanying drawings are merely some embodiments of the present application, and other drawings can be obtained by those of ordinary skill in the art without any creative effort, based on the accompanying drawings. In the drawings:

[0023] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied is shown.

[0024] Figure 2 A flowchart of a data conversion method according to an embodiment of the present application is shown.

[0025] Figure 3 A schematic diagram of JSON format data according to an embodiment of the present application is shown.

[0026] Figure 4 A schematic diagram of the data conversion process is shown. Figure 3A diagram of a data conversion rule for performing data conversion processing on the JSON format data shown.

[0027] Figure 5 A specific flow chart of step S230 of the data conversion method according to an embodiment of the present application is shown.

[0028] Figure 6 A specific flow chart of step S520 of the data conversion method according to an embodiment of the present application is shown.

[0029] Figure 7 A specific flow chart of step S830 of the data conversion method according to an embodiment of the present application is shown. Figure 4 The converted JSON format data obtained by performing data conversion processing on the data conversion rule shown. Figure 3 The converted JSON format data obtained by performing data conversion processing on the JSON format data shown.

[0030] Figure 8 A specific flow chart of step S240 of the data conversion method according to an embodiment of the present application is shown.

[0031] Figure 9 A specific flow chart of step S830 of the data conversion method according to an embodiment of the present application is shown.

[0032] Figure 10 A specific flow chart of step S830 of the data conversion method according to an embodiment of the present application is shown.

[0033] Figure 11 A specific flow chart of step S240 of the data conversion method according to an embodiment of the present application is shown.

[0034] Figure 12 A block diagram of a data conversion apparatus according to an embodiment of the present application is shown.

[0035] Figure 13 A structural schematic diagram of a computer system of an electronic device suitable for implementing an embodiment of the present application is shown. DETAILED DESCRIPTION

[0036] Example implementations will now be described more fully with reference to the accompanying drawings. Example implementations may, however, be implemented in many different forms and should not be construed as limited to the examples set forth herein; rather, these implementations are provided so that this disclosure will be thorough and complete, and will fully convey the scope of example implementations to those skilled in the art.

[0037] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.

[0038] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0039] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0040] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0041] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of this application can be applied is shown.

[0042] like Figure 1 As shown, the system architecture may include a content management platform 101, a data server 102, and a search server 103. The content management platform 101 is connected to the data server 102 and the search server 103 via a network 104, and data interaction is performed based on the network 104. This network may include various connection types, such as wired communication links, wireless communication links, etc.

[0043] It should be understood that Figure 1The number of the content management platform 101, the data server 102 and the search server 103 in the figure is only illustrative. According to the implementation needs, there can be any number of content management platforms 101, data servers 102 and search servers 103. The content management platform 101 can be a platform providing data conversion services between different data servers 102, data servers 102 can be servers providing the same or different service, and the search server 103 can be a server providing business data query in the data server 102.

[0044] Optionally, the data server 102 and the search server 103 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud database, cloud storage, network service and other basic cloud computing services.

[0045] The content management platform 101 obtains the data to be converted, which is JSON format data; based on the conversion category of the data to be converted, the data conversion rule library is searched for the data conversion rule matched with the conversion category as the target data conversion rule for data conversion of the data to be converted, the conversion category is determined based on the data category of the data to be converted, the sender of the data to be converted and the receiver of the data to be converted, and the target data conversion rule includes a target verification rule and a target conversion rule; the field value in the data to be converted is verified according to the target verification rule; if the field value in the data to be converted is verified, the field value in the data to be converted is converted based on the target conversion rule to generate converted JSON format data. Since the field value in the data to be converted is converted by the data conversion rule, the JSON format data to be converted does not need to be parsed, which can effectively improve the data conversion efficiency and reduce the workload of the developer.

[0046] It should be noted that the data conversion method provided by the embodiments of the present application is generally executed by the content management platform 101, and correspondingly, the data conversion device is generally arranged in the content management platform 101. The implementation details of the technical solutions of the embodiments of the present application are described in detail below.

[0047] Figure 2 A flowchart of a data conversion method according to an embodiment of the present application is shown, as shown in Figure 2 The data conversion method at least includes steps S210 to S240, which are described in detail below.

[0048] In step S210, the data to be converted is obtained, which is JSON format data.

[0049] In one embodiment, the data to be converted is a data of a certain data category represented by a data server in a JSON (JavaScript Object Notation) format, which is a lightweight data exchange format and generally includes field names and field values in the field names.

[0050] In one embodiment, the data category refers to data containing different field names, which can be a business category, such as a driver's license, a lawyer's license, etc., or a professional category composed of different professions, such as medical personnel, police officers, and teachers, etc.

[0051] Figure 3 A JSON format data diagram according to one embodiment of the present application is shown as follows: Figure 3 As shown, when the data to be converted is medical personnel data, in the JSON format data, "drid", "name", "icon", "position", and "tag" are field names, which respectively represent "data identifier", "name", "image", "position", and "tag", and "1", "Xiaodong", "https: / / image / 0.jpg", "attending physician", and "[psychology, depression, psychologist]" are field values in the corresponding field names.

[0052] In one embodiment, different data servers have differences in representing data of the same data category in the JSON format, and converting the JSON format data refers to a process of converting the JSON format data transmitted by a sender to a receiver according to the data representation differences between the sender and the receiver. Specifically, it involves conversion processing such as adding or deleting processing of fields contained in the JSON format data, and conversion processing such as modifying field values in the fields contained in the JSON format data.

[0053] In step S220, based on the conversion category of the data to be converted, a data conversion rule matching the conversion category is searched from the data conversion rule library as a target data conversion rule for data conversion of the data to be converted, the conversion category is determined based on the data category of the data to be converted, the sender of the data to be converted, and the receiver of the data to be converted, and the target data conversion rule includes a target verification rule and a target conversion rule.

[0054] In one embodiment, different data servers can have differences in representing data of the same data category, which can be differences in some fields or some field values in the fields.

[0055] The data conversion rule refers to rule information for conversion processing of the JSON format data, which can include a verification rule and a conversion rule. The verification rule is rule information for verifying whether the JSON format data conforms to a preset standard, and the conversion rule is rule information for conversion processing of the JSON format data that passes the verification.

[0056] In one embodiment, in order to achieve data transmission of multiple data categories between different data servers, the corresponding data conversion rule needs to be determined for the transmitted data. Since the data category, sender, and receiver of the data all cause the data conversion rule to be different, in order to quickly determine the corresponding data conversion rule, a mapping relationship between the data category, sender, and receiver of the data and the conversion category can be established in advance, and a mapping relationship between the conversion category and the data conversion rule can be established.

[0057] Taking the sender of the data as the A data server, the receiver of the data as the B data server and the C data server, and the data of two data categories D and E that need to be transmitted as an example, when the A data server transmits the data of the two data categories D and E to the B data server and the C data server, the mapping relationship established can be as shown in Table 1.

[0058] Table 1

[0059]

[0060]

[0061] It should be noted that the B data server transmits the data of the two data categories D and E to the A data server and the C data server, and the C data server transmits the data of the two data categories D and E to the A data server and the B data server, and a mapping relationship similar to that shown in Table 1 can be established.

[0062] In one embodiment, the data conversion rule library is a rule library storing all pre-established data conversion rules, and in addition, the data conversion rule library further includes a mapping relationship between the conversion categories and the data conversion rules. After obtaining the conversion category corresponding to the to-be-converted data, the conversion category can be taken as an index to perform matching in the data conversion rule library, so as to find the data conversion rule matched with the conversion category as the target data conversion rule for data conversion of the to-be-converted data.

[0063] In step S230, the field value in the to-be-converted data is verified according to the target verification rule.

[0064] In one embodiment, the field value in the to-be-converted data is verified according to the target verification rule, and it can be determined whether the field value in the to-be-converted data meets the preset specification standard.

[0065] Figure 4 A schematic diagram of the data conversion rule for performing data conversion processing on the JSON format data is shown. Figure 3 A schematic diagram of the data conversion rule for performing data conversion processing on the JSON format data is shown.

[0066] Figure 5 A specific flowchart of step S230 of the data conversion method in one embodiment of the present application is shown. Figure 5 As shown in FIG. 5, step S230 can specifically include steps S510 to S520, which are described in detail below. Figures 3 to 5 Steps S510 to S520 are described in detail.

[0067] In step S510, a first field with the same field name as the verification field is found in the to-be-converted data, and the verification field is a field defined in the target verification rule and needs to be verified.

[0068] In one embodiment, the data conversion rule is pre-compiled rule information for performing conversion processing on the JSON format data.

[0069] In one embodiment, the data conversion rule can be rule information represented in the form of the JSON format. Representing the data conversion rule in the form of the JSON format can improve the compilation of the data conversion rule, and can also facilitate data processing on different fields in the JSON format data.

[0070] In one embodiment, the data conversion rule can be generated by a structured query language (SQL) compiled expression. The SQL compiled expression refers to a computable expression for obtaining a certain data item, such as an expression for obtaining a field value in a field.

[0071] In one embodiment, the data transformation rules may include validation rules and transformation rules. Regarding validation rules, a validation field refers to a field that needs to be validated as predefined in the validation rule; it can be one or more, and this is not limited here.

[0072] When determining validation fields in data transformation rules, it can be determined whether the fields in the data transformation rules contain specific subfields. If they do, the field is considered a validation field; if they do not, the field is considered not a validation field.

[0073] by Figure 4 The data transformation rules shown are for Figure 3 Taking the conversion of JSON format data as an example, in the data conversion rules, a specific subfield can be either "type" or "check_function". That is, if a field contains either of these subfields, it is considered a validation field. Figure 4 As can be seen from the data transformation rules shown, “drid”, “name”, “icon”, and “tag” are all validation fields.

[0074] When performing validation on the data to be converted, the validation fields defined in the validation rules can be compared one by one with each field contained in the data to be converted. The first field in the data to be converted that has the same field name as the validation field is the field in the data to be converted that needs to be validated.

[0075] In step S520, the field value in the first field is validated according to the field value validation rules defined for the validation field by the target validation rules.

[0076] In one embodiment, the validation rules include predefined field value validation rules for different validation fields. The field value validation rules refer to the validation rules for a single validation field. The field value validation rules for each validation field are used to perform validation processing on a first field with the same field name. Specifically, they are used to verify whether the field value in the first field conforms to the specification standard defined by the field value validation rules.

[0077] The field value validation rules can be used to determine whether the data type corresponding to the field value in the first field conforms to the defined standard data type rules, and to determine whether the field value in the first field is real.

[0078] Different field value validation rules can be represented by different subfields, and the field values ​​in the subfields provide validation description information that specifically describes the field value validation rules. Figure 4As shown in the data conversion rule, "type" represents rule information for determining whether the data type of the field value in the first field conforms to the defined data type, and "check_function" represents rule information for determining whether the field value in the first field is authentic. Of course, the field value check rule can also include rule information for checking other attributes, which is not limited herein.

[0079] In one embodiment, the step S520 of checking the field value in the first field according to the field value check rule defined for the check field according to the target check rule can specifically include: if the data type corresponding to the field value in the first field is consistent with the data type defined by the field value check rule for the field value in the check field, it is determined that the field value in the to-be-converted data passes the check; if the data type corresponding to the field value in the first field is inconsistent with the data type defined by the field value check rule for the field value in the check field, it is determined that the field value in the to-be-converted data fails the check.

[0080] In one embodiment, the field value check rule can define a data type for the field value in the check field in advance, and the data type can include a basic data type and a reference data type.

[0081] The basic data type can be an int integer type, a boolean Boolean object, etc., and the reference data type can be a String string class, a stringarray string array class, etc., which is not limited herein.

[0082] In one embodiment, when checking the field value in the to-be-converted data, the data type corresponding to the field value in the first field can be compared with the data type defined by the field value check rule for the field value in the check field. If the two are consistent, it is determined that the field value in the first field passes the check; if the two are inconsistent, it is determined that the field value in the first field fails the check.

[0083] It can be understood that since the check field that needs to be checked for the data type can be multiple, correspondingly, the first field in the to-be-converted data that needs to be checked can also be multiple. In the multiple first fields, when the data type corresponding to the field value in one of the first fields is inconsistent with the data type defined by the field value check rule for the field value in the check field, it is considered that the field value in the to-be-converted data fails the check; when the data types corresponding to the field values in the multiple first fields are all consistent with the data type defined by the field value check rule for the field value in the check field, it is considered that the field value in the to-be-converted data passes the check.

[0084] Figure 5The technical scheme of the embodiment shown can effectively filter out the to-be-converted data that does not conform to the standard, and improve the efficiency of effective data conversion.

[0085] Figure 6 A specific flowchart of step S520 of the data conversion method according to one embodiment of the present application is shown as follows. Figure 6 As shown, step S520 can specifically include steps S610 to S650, which are described in detail as follows.

[0086] In step S610, in the field value checking rule, the checking description information corresponding to the checking field is obtained.

[0087] In one embodiment, when the to-be-converted data is checked, for some or all of the checking fields, it is necessary to check whether the field value in the first field is real. Therefore, in the field value checking rule, for the checking field that needs to be checked, the checking description information can be defined in advance, which contains the description information of how to check the field value in the first field.

[0088] In step S620, based on the checking description information, a checking instruction for checking the field value in the first field is generated, and the checking instruction is an instruction for obtaining the field value in the first field.

[0089] In one embodiment, after obtaining the checking description information corresponding to the checking field, based on the checking description information, a checking instruction for checking the field value in the first field is generated, and the checking instruction is an instruction for obtaining the field value in the first field. The instruction can be a query instruction for querying the field value according to a custom function or a built-in function, or an acquisition instruction for acquiring a picture according to a picture-text link address.

[0090] In step S630, the checking instruction is executed, and an execution result of the checking instruction after execution is obtained.

[0091] In one embodiment, the generated checking instruction is executed, and an execution result of the checking instruction after execution is obtained. When the checking instruction is executed, if the corresponding field value can be obtained according to the checking instruction, it can be determined that the field value in the first field is real, and the execution result can be that the field value is successfully obtained. If the corresponding field value cannot be obtained according to the checking instruction, it can be determined that the field value in the first field is not real, and the execution result can be that the field value is failed to be obtained.

[0092] In step S640, if the execution result is that the field value is successfully obtained, it is determined that the field value in the to-be-converted data passes the check.

[0093] In one embodiment, if the execution result indicates that the field value was successfully retrieved, then the field value in the first field is determined to have passed the validation.

[0094] It's understandable that since there can be multiple fields requiring verification of their values, there can also be multiple first fields in the data to be converted. If all the values ​​in these multiple first fields are verified to be true, then the field values ​​in the data to be converted are considered to have passed verification.

[0095] In step S650, if the execution result is that the field value acquisition fails, it is determined that the field value verification in the data to be converted has failed.

[0096] In one embodiment, if the execution result is that the field value retrieval fails, it is determined that the field value in the first field has passed the validation.

[0097] It's understandable that since there can be multiple fields requiring verification of their values, there can also be multiple first fields in the data to be converted. If, among these multiple first fields, there exists a situation where all values ​​in one of the first fields fail verification, then the field value verification in the data to be converted is considered to have failed.

[0098] Please continue to refer to this. Figure 2 In step S240, if the field values ​​in the data to be converted pass the verification, the field values ​​in the data to be converted are converted based on the target conversion rules to generate the converted JSON format data.

[0099] In one embodiment, if the field values ​​in the data to be converted pass the validation, the field values ​​in the data to be converted can be converted based on the target conversion rules to generate the converted JSON format data.

[0100] It is understandable that if the field values ​​in the data to be converted fail the validation, then there is no need to convert the field values ​​in the data to be converted.

[0101] Figure 7 It shows the way Figure 4 The data transformation rules shown are for Figure 3 The JSON data shown is transformed into JSON data through data conversion processing. Figure 7 As can be seen, compared with the original JSON data, the values ​​of some fields in the converted JSON data have changed, and some fields have been added.

[0102] Figure 8 A detailed flowchart of step S240 of the data conversion method according to one embodiment of this application is shown, as follows:Figure 8 As shown in FIG. 8, step S240 can specifically include steps S810-S840, which are described in detail below in combination with Figure 3 、 Figure 4 and Figure 8 .

[0103] In step S810, a second field with the same field name as the conversion field is found in the data to be converted, the conversion field being a field defined by the target conversion rule as needing conversion.

[0104] In one embodiment, since the data conversion rule can include a check rule and a conversion rule, the conversion rule is used to perform conversion processing on the field value in the data to be converted, which is actually used to modify the field value in the field contained in the data to be converted, etc. The conversion field refers to a field defined by the check rule as needing checking, which can be one or more, without limitation.

[0105] When determining the check field in the data conversion rule, it can be determined whether the field in the data conversion rule contains a specific subfield. If it does, the field is considered to be a conversion field. If it does not, the field is not considered to be a conversion field.

[0106] As shown in the data conversion rule in Figure 4 , the specific subfield can be "value" and "default", i.e., if one of them is contained, the field containing the subfield is a conversion field. As shown in the data conversion rule in Figure 4 , "drid", "name", "icon", and "tag" are all conversion fields.

[0107] When determining the conversion field in the data conversion rule, it can also be determined whether the data conversion rule contains a specific field. If it does, the specific field is considered to be a conversion field. As shown in the data conversion rule in Figure 4 , the conversion field is "other".

[0108] In one embodiment, when performing conversion processing on the data to be converted, the conversion field defined by the conversion rule can be compared with each field contained in the data to be converted one by one. A second field with the same field name as the conversion field is found in the data to be converted. The first field found is the field in the data to be converted that needs conversion processing.

[0109] In step S820, the field value generation information corresponding to the conversion field is obtained.

[0110] In one embodiment, the conversion rule includes field value generation information predefined for different check fields, and the field value generation information corresponding to the conversion field is a rule information for a single conversion field, and is used for conversion processing of a second field having the same field name as the conversion field, and specifically, is used for generating a field value for updating a field value in the second field. The field value generation information corresponding to the conversion field can be a description information indicating how to obtain the field value, such as an instruction for obtaining the field value.

[0111] As shown in the data conversion rule shown in Figure 4 , the field value "substr(root.name, 1, 2)" in the subfield "value" included in "name" is the field value generation information corresponding to the conversion field.

[0112] In step S830, a field value for updating a field value in the second field is generated based on the field value generation information.

[0113] In one embodiment, after the field value generation information corresponding to the conversion field is obtained, the corresponding field value is generated through the field value generation information, and the generated field value can be used as the field value for updating the field value in the second field.

[0114] Figure 9 A specific flowchart of step S830 of the data conversion method according to one embodiment of the present application is shown in Figure 9 , and step S830 can specifically include steps S910 to S920, which are described in detail below in connection with Figure 3 , Figure 4 , Figure 7 and Figure 9 .

[0115] In step S910, a field value is selected from a field value in the second field based on the field value generation information.

[0116] In one embodiment, in the process of converting the field value in the to-be-converted data, for some conversion fields, the field value in the conversion field is part or all of the field values in the second field having the same field name as the conversion field. Therefore, the field value generation information can be a description information indicating that the field value is selected from the field value in the second field, and the field value can be selected from the field value in the second field according to the description information.

[0117] In step S920, a field value for updating a field value in the second field is generated based on the selected field value.

[0118] In one embodiment, after selecting the field value in the second field, a field value for updating the field value in the second field can be generated according to the selected field value.

[0119] Taking Figure 4 the data conversion rule shown as an example for converting the JSON-formatted data shown in Figure 3 In the data conversion rule, the field value generation information for the conversion field "name" includes "substr(root.name, 1, 2)", which means extracting the second and third characters from the field value "Chen Xiaodong" in the corresponding second field "name" as the selected field value, that is, "Xiaodong" is the selected field value. Therefore, in Figure 7 the converted JSON-formatted data shown, for the field "name", its corresponding field value is "Xiaodong".

[0120] Figure 10 FIG. shows a specific flowchart of step S830 of the data conversion method according to an embodiment of the present application. As Figure 10 shown, step S830 may specifically include steps S1010 to step S1020. The following will describe steps S1010 to step S1020 in detail in combination with Figure 3 , Figure 4 , Figure 7 and Figure 10 .

[0121] In step S1010, based on the field value generation information, a field value is selected from the field value in the third field of the data to be converted. The third field refers to a field in the data to be converted that is different from the second field.

[0122] In one embodiment, during the process of converting the field values in the data to be converted, for some conversion fields, the field value in the conversion field can be a partial field value or all field values in a field in the data to be converted that is different from the second field, that is, a partial field value or all field values in the third field that is different from the field name of the conversion field. Therefore, the field value generation information can be a description information indicating to select a field value from the field value in the third field, and based on this description information, a field value can be selected from the field value in the third field.

[0123] In step S1020, based on the selected field value, a field value for updating the field value in the second field is generated.

[0124] Taking Figure 4 the data conversion rule shown as an example for Figure 3Taking the conversion process of the data in the JSON format shown as an example, in the data conversion rule, the information for generating the field value of the conversion field "tag" further includes "root.name", which means that the field value "Chen Xiaodong" in the corresponding third field "name" is used as the selected field value, that is, "Chen Xiaodong" is the field value for updating the field value in the second field. Therefore, in Figure 7 In the converted JSON format data shown, for the field "tag", in addition to including the two field values "depression" and "psychiatrist", its corresponding field value also includes the field value "Chen Xiaodong".

[0125] In one embodiment, after selecting the corresponding field value in the third field, the field value for updating the field value in the second field can be generated according to the selected field value.

[0126] Please continue to refer to Figure 8 , in step S840, based on the generated field value, update the field value in the second field to generate the converted JSON format data.

[0127] In one embodiment, after generating the field value for updating the field value in the second field, the field value in the second field can be updated based on the generated field value to generate the converted JSON format data.

[0128] Figure 11 Shows the specific flowchart of step S240 in the data conversion method according to an embodiment of the present application. As Figure 11 shown, step S240 may specifically include steps S1110 to S1140. The following will describe steps S1110 to S1140 in detail in combination with Figure 3 , Figure 4 , Figure 7 and Figure 11 .

[0129] In step S1110, if the second field with the same field name as the conversion field is not found in the data to be converted, the conversion field is used as the added field to be added to the data to be converted.

[0130] In one embodiment, when the field value in the data to be converted is converted, the converted data can include a field not contained in the data to be converted, that is, when the data to be converted is converted, a new field can be added to the data to be converted and a corresponding field value can be added to the new field. Thus, the check field can include a field that does not exist in the data to be converted, and the check field defined by the check rule is compared with each field contained in the data to be converted one by one, and if a second field with the same field name as the conversion field is not found in the data to be converted, the conversion field is added as an added field in the data to be converted.

[0131] In step S1120, the added field value is generated based on the field value generation information corresponding to the added field.

[0132] In one embodiment, the conversion rule includes field value generation information defined in advance for different check fields, and thus includes field value generation information defined in advance for added fields. The field value generation information corresponding to the added field is a rule information for generating a field value in the added field, which can be a description information indicating how to obtain the field value, such as an instruction for obtaining the field value. The field value generated by the field value generation information corresponding to the added field is the added field value, that is, the field value in the added field.

[0133] In step S1130, the added field value is added to the field value of the added field.

[0134] In one embodiment, after the field value for addition is determined, the added field value is added to the field value of the added field.

[0135] In step S1140, the added field with the added field value is added to the data to be converted, and the converted JSON format data is generated.

[0136] In one embodiment, the added field with the added field value is added to the data to be converted, that is, the new field is added to the data to be converted, and thus the converted JSON format data is generated.

[0137] As shown in the data conversion rule, the JSON format data shown in FIG. 10 is converted as an example. In the data conversion rule, since a second field with the same field name as the conversion field "other" is not found in the data to be converted, the conversion field "other" is added as an added field in the data to be converted. The field value generation information corresponding to the conversion field "other" is "root.tag[0]", that is, the first string "psychology professor" in the field "tag" of the data to be converted is the added field value, and thus, in the data to be converted, the field "other" is added and the field value "psychology professor" is added to the field "other". Figure 4 Figure 3 As shown in the data conversion rule, the JSON format data shown in FIG. 10 is converted as an example. In the data conversion rule, since a second field with the same field name as the conversion field "other" is not found in the data to be converted, the conversion field "other" is added as an added field in the data to be converted. The field value generation information corresponding to the conversion field "other" is "root.tag[0]", that is, the first string "psychology professor" in the field "tag" of the data to be converted is the added field value, and thus, in the data to be converted, the field "other" is added and the field value "psychology professor" is added to the field "other".​Figure 7 The converted JSON format data is shown. For the field "other", the corresponding field value is "psychology professor".

[0138] As can be seen above, based on the conversion category of the to-be-converted data, a data conversion rule library is searched for a data conversion rule matching the conversion category, as a target data conversion rule for data conversion of the to-be-converted data, the conversion category is determined based on a data category of the to-be-converted data, a sender of the to-be-converted data, and a receiver of the to-be-converted data, the target data conversion rule includes a target verification rule and a target conversion rule; the field value in the to-be-converted data is verified according to the target verification rule; if the field value in the to-be-converted data passes the verification, the field value in the to-be-converted data is converted and processed based on the target conversion rule, to generate converted JSON format data. Since the field value in the to-be-converted data is converted and processed by the data conversion rule, the JSON format to-be-converted data does not need to be parsed, which can effectively improve the data conversion efficiency and reduce the workload of the developer.

[0139] The device embodiment of the present application is introduced below, which can be used to execute the data conversion method in the above-mentioned embodiments of the present application. For details not disclosed in the device embodiment of the present application, refer to the above-mentioned embodiments of the data conversion method of the present application.

[0140] Figure 12 A block diagram of a data conversion device according to one embodiment of the present application is shown.

[0141] Reference Figure 12 As shown, the data conversion device 1200 according to one embodiment of the present application includes a first acquisition unit 1210, a second acquisition unit 1220, a verification unit 1230, and a conversion unit 1240. The first acquisition unit 1210 is configured to acquire to-be-converted data, which is JSON object notation format data. The second acquisition unit 1220 is configured to search, based on a conversion category of the to-be-converted data, a data conversion rule library for a data conversion rule matching the conversion category, as a target data conversion rule for data conversion of the to-be-converted data, the conversion category being determined based on a field name contained in the to-be-converted data, a source object of the to-be-converted data, and a target object of the to-be-converted data, the target data conversion rule including a target verification rule and a target conversion rule. The verification unit 1230 is configured to verify a field value in the to-be-converted data according to the target verification rule. The conversion unit 1240 is configured to, if the field value in the to-be-converted data passes the verification, convert and process the field value in the to-be-converted data based on the target conversion rule, to generate converted JSON format data.

[0142] In some embodiments of the present application, based on the foregoing scheme, the checking unit 1230 is configured to: find a first field with a same field name as a checking field in the data to be converted, the checking field being a field defined in the target checking rule and needing to be checked; and check a field value in the first field according to a field value checking rule defined by the target checking rule for the checking field.

[0143] In some embodiments of the present application, based on the foregoing scheme, the checking unit 1230 is configured to: if the data type corresponding to the field value in the first field is consistent with the data type defined by the field value checking rule for the field value in the checking field, determine that the field value checking in the data to be converted is passed; and if the data type corresponding to the field value in the first field is inconsistent with the data type defined by the field value checking rule for the field value in the checking field, determine that the field value checking in the data to be converted is failed.

[0144] In some embodiments of the present application, based on the foregoing scheme, the checking unit 1230 is configured to: a checking instruction, the checking instruction being an instruction for acquiring the field value in the first field; execute the checking instruction and acquire an execution result of the checking instruction after execution; if the execution result is that the field value acquisition is successful, determine that the field value checking in the data to be converted is passed; and if the execution result is that the field value acquisition is failed, determine that the field value checking in the data to be converted is failed.

[0145] In some embodiments of the present application, based on the foregoing scheme, the conversion unit 1240 is configured to: find a second field with a same field name as a conversion field in the data to be converted, the conversion field being a field defined in the target conversion rule and needing to be converted; acquire field value generation information corresponding to the conversion field; generate a field value for updating the field value in the second field based on the field value generation information; and update the field value in the second field based on the generated field value, to generate the converted JSON format data.

[0146] In some embodiments of the present application, based on the foregoing scheme, the conversion unit 1240 is configured to: if the second field with the same field name as the conversion field is not found in the data to be converted, add the conversion field as an added field in the data to be converted; generate an added field value based on the field value generation information corresponding to the added field; add the added field value to the field value of the added field; and add the added field with the added field value to the data to be converted, to generate the converted JSON format data.

[0147] In some embodiments of the present application, based on the foregoing scheme, the conversion unit 1240 is configured to: generate information based on the field value, select a field value from the field value in the second field; based on the selected field value, generate a field value that updates the field value in the second field.

[0148] In some embodiments of the present application, based on the foregoing scheme, the conversion unit 1240 is configured to: generate information based on the field value, select a field value from the field value in the third field in the data to be converted, the third field referring to a field in the data to be converted different from the second field; based on the selected field value, generate a field value that updates the field value in the second field.

[0149] In some embodiments of the present application, based on the foregoing scheme, the data conversion rule is generated by an expression compiled by a structured query language.

[0150] Figure 13 A structural diagram of a computer system of an electronic device suitable for implementing embodiments of the present application is shown.

[0151] It should be noted that, Figure 13 The computer system 1300 of the electronic device shown is only an example and should not impose any limitation on the functions and use range of embodiments of the present application.

[0152] As Figure 13 shown, the computer system 1300 includes a central processing unit (CPU) 1301, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1302 or programs loaded from a storage portion 1308 into a random access memory (RAM) 1303, such as performing the methods described in the above embodiments. In the RAM 1303, various programs and data required for system operation are also stored. The CPU 1301, the ROM 1302, and the RAM 1303 are connected to each other through a bus 1304. An input / output (I / O) interface 1305 is also connected to the bus 1304.

[0153] The following components are connected to the I / O interface 1305: an input part 1306 including a keyboard, a mouse, etc.; an output part 1307 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc., and a speaker, etc.; a storage part 1308 including a hard disk, etc.; and a communication part 1309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication part 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to the I / O interface 1305 as necessary. A removable medium 1311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 1310 as necessary, so that a computer program read out therefrom is installed in the storage part 1308 as necessary.

[0154] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present application. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing a computer program for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication part 1309, and / or installed from the removable medium 1311. When the computer program is executed by the central processing unit (CPU) 1301, various functions defined in the system of the present application are executed.

[0155] It should be noted that the computer-readable medium in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus. In the present application, the computer-readable signal medium can include a data signal carrying computer-readable computer programs in a baseband or as a part of a carrier wave. Such a propagated data signal can take various forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate or transmit programs for use by or in conjunction with an instruction execution system, device or apparatus. The computer programs contained in the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, or the like, or any suitable combination thereof.

[0156] The flowcharts and block diagrams in the drawings illustrate the possible implementation architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In the flowcharts or block diagrams, each block can represent a module, a program segment or a part of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different orders than that shown in the drawings. For example, two blocks represented in succession can actually be executed substantially in parallel, and sometimes in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams or flowcharts, and the combination of blocks in the block diagrams or flowcharts, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0157] The units described in the embodiments of the present application can be implemented by software, or by hardware, or by a combination of software and hardware. The units described can also be located in a single processor. In some cases, the names of the units do not limit the units themselves.

[0158] As another aspect, the present application provides a computer readable medium, which can be included in the electronic device described in the above embodiments, or can exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to implement the method described in the above embodiments.

[0159] It should be noted that although several modules or units for performing actions are mentioned in the above detailed description, the division into the modules or units is not mandatory. In fact, according to the embodiments of the present application, features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, features and functions of one module or unit described above can be further divided into a plurality of modules or units.

[0160] From the above description of the embodiments, those skilled in the art will readily appreciate that the example embodiments described herein can be implemented by software and / or by hardware coupled with software. Accordingly, the technical solutions of the embodiments of the present application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, or the like) or on a network, and includes a number of instructions for causing a computing device (which can be a personal computer, a server, a terminal, or a network device, etc.) to perform the methods according to the embodiments of the present application.

[0161] Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such

[0162] It should be understood that the present application is not limited to the precise construction that has been described above and illustrated in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the present application. The scope of the present application is limited only by the appended claims.

Claims

1. A data conversion method, characterized in that, include: Obtain the data to be converted, which is in JSON format; Based on the transformation category of the data to be transformed, a data transformation rule matching the transformation category is searched from the data transformation rule base, which serves as the target data transformation rule for transforming the data to be transformed. The data transformation rule is generated by an expression compiled from a structured query language. The transformation category is determined based on the data category of the data to be transformed, the sender of the data to be transformed, and the receiver of the data to be transformed. The target data transformation rule includes target validation rules and target transformation rules. The field values ​​in the data to be converted are validated according to the target validation rules. If the field value in the data to be converted passes the verification, then a second field with the same field name as the field to be converted is found in the data to be converted. The field to be converted is the field that needs to be converted as defined by the target conversion rule. Obtain the field value generation information corresponding to the transformation field, wherein the field value generation information refers to the generation expression of the field value; Execute the generation expression to generate a field value that updates the field value in the second field; The field value in the second field is updated based on the generated field value to obtain the converted JSON format data.

2. The data conversion method according to claim 1, characterized in that, The field values ​​in the data to be converted are validated according to the target validation rules, including: In the data to be converted, find the first field with the same field name as the verification field, where the verification field is the field that needs to be verified as defined in the target verification rule; According to the field value verification rules defined for the verification field in the target verification rules, the field values ​​in the first field are verified.

3. The data conversion method according to claim 2, characterized in that, According to the target validation rule and the field value validation rule defined for the validation field, the field value in the first field is validated, including: If the data type corresponding to the field value in the first field is consistent with the data type defined by the field value verification rule for the field value in the verification field, then the field value in the data to be converted is determined to have passed the verification. If the data type corresponding to the field value in the first field is inconsistent with the data type defined by the field value verification rule for the field value in the verification field, then it is determined that the field value verification in the data to be converted has failed.

4. The data conversion method according to claim 2, characterized in that, According to the target validation rule and the field value validation rule defined for the validation field, the field value in the first field is validated, including: In the field value validation rules, obtain the validation description information corresponding to the validation field; Based on the verification description information, a verification instruction is generated for verifying the field value in the first field. The verification instruction is an instruction for obtaining the field value in the first field. Execute the verification instruction and obtain the execution result of the verification instruction after execution; If the execution result indicates that the field value was successfully retrieved, then the field value in the data to be converted has passed the verification. If the execution result is that the field value retrieval failed, it is determined that the field value verification in the data to be converted failed.

5. The data conversion method according to claim 1, characterized in that, Based on the target transformation rules, the field values ​​in the data to be transformed are transformed to generate transformed JSON format data, including: If no second field with the same name as the conversion field is found in the data to be converted, then the conversion field will be added as an additional field in the data to be converted. Generate the added field value based on the field value generation information corresponding to the added field; Add the added field value to the field value of the added field; The added field, which already has a value, is added to the data to be converted, generating the converted JSON format data.

6. The data conversion method according to claim 1, characterized in that, Based on the field value generation information, generate field values ​​that update the field values ​​in the second field, including: Information is generated based on the field values, and a field value is selected from the field values ​​in the second field; Based on the selected field value, generate a field value that updates the field value in the second field.

7. The data conversion method according to claim 1, characterized in that, Based on the field value generation information, generate field values ​​that update the field values ​​in the second field, including: Based on the field value, generate information and select a field value from the field value of the third field in the data to be converted. The third field refers to a field in the data to be converted that is different from the second field. Based on the selected field value, generate a field value that updates the field value in the second field.

8. A data conversion device, characterized in that, include: The first acquisition unit is used to acquire data to be converted, wherein the data to be converted refers to data in JSON object representation format; The second acquisition unit is used to search for data conversion rules that match the conversion category in the data conversion rule base based on the conversion category of the data to be converted, and use them as target data conversion rules for data conversion of the data to be converted. The data conversion rules are generated by expressions compiled from a structured query language. The conversion category is determined based on the field names contained in the data to be converted, the source object of the data to be converted, and the target object of the data to be converted. The target data conversion rules include target validation rules and target conversion rules. The verification unit is used to verify the field values ​​in the data to be converted according to the target verification rules; The conversion unit is configured to, if the field value in the data to be converted passes the verification, search for a second field in the data to be converted that has the same field name as the field to be converted, wherein the field to be converted is a field defined by the target conversion rule that needs to be converted; obtain field value generation information corresponding to the field to be converted, wherein the field value generation information refers to the field value generation expression; and execute the generation expression to generate a field value that updates the field value in the second field. The field value in the second field is updated based on the generated field value to obtain the converted JSON format data.

9. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by the electronic device, cause the electronic device to perform the data conversion method as described in any one of claims 1 to 7.

10. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the data conversion method as described in any one of claims 1 to 7.

11. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the data conversion method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method, device, electronic device and storage medium for verifying and processing

    CN108256074A

  • Message conversion method and device, storage medium and server

    CN111064716A