Data processing method and device, electronic equipment and readable storage medium

CN117632310BActive Publication Date: 2026-10-16WEBANK (CHINA)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311609678.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-28
Publication Date
2026-10-16
Estimated Expiration
2043-11-28

AI Technical Summary

Technical Problem

[0005]有鉴于此,本申请提供一种数据处理方法、装置、电子设备及可读存储介质,旨在解决如何提高从json串中获取到出入参变量的值的速度的技术问题

Benefits of technology

[0040] In this embodiment, after obtaining the JSON string, instead of using the `get_json_object` function and passing in the corresponding name to retrieve the value, a preset mapping table is used to convert the names of some input and output parameters. This ensures that all names are either pre-defined historical or latest names. Therefore, when retrieving the values ​​of the corresponding input and output parameters via a data retrieval command, the user can use these pre-defined historical or latest names. It can be understood that because the names of the input and output parameters are pre-defined historical or latest names, and the target name in the data retrieval command is also a pre-defined historical or latest name, the user can directly retrieve the values ​​using the pre-defined historical or latest names without needing to consider whether the names in the input and output parameters are historical or latest. This improves the speed of retrieving the values ​​of input and output parameters from the JSON string.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117632310B_ABST
    Figure CN117632310B_ABST
Patent Text Reader

Abstract

The application discloses a data processing method and device, electronic equipment and a readable storage medium. The method comprises the following steps: obtaining a json string, wherein the json string comprises the names of input and output parameters and the values corresponding to the names; the names are historical names or latest names; performing a conversion operation on part of the names of the input and output parameters based on a preset mapping table, so that all the names of the input and output parameters are the historical names or the latest names; the preset mapping table records the mapping relationship between the historical names and the latest names of any input and output parameter; in response to the input of a data acquisition instruction, based on the target name of the target input and output parameter in the data acquisition instruction, the target value corresponding to the target name is obtained; the target name is a converted name. The application improves the speed of obtaining the values of the input and output parameters from the json string.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of big data technology, and in particular to a data processing method, apparatus, electronic device and readable storage medium. Background Technology

[0002] When building and iteratively updating artificial intelligence models, a large number of input parameters are often required for calculation, while a large number of output parameters are also generated. In offline data analysis of big data, it is often necessary to analyze these input and output parameters (either input or output). The names and values ​​of these input and output parameters are stored as JSON strings in a field of a database table.

[0003] Currently, the `get_json_object` function is used to retrieve the value of a specific input / output variable from a JSON string for analysis. When using this function, the names of the input / output variables must be passed in. However, during model iteration, the names of some input / output variables may change; for example, the name "age" might change from the old "age" to the new "years_old". This makes it difficult for relevant personnel to quickly retrieve the value corresponding to a given name because they cannot accurately pass in the variable's name.

[0004] Therefore, in practical applications, a solution is needed to improve the speed of retrieving input and output parameter values ​​from JSON strings. Summary of the Invention

[0005] In view of this, this application provides a data processing method, apparatus, electronic device, and readable storage medium, aiming to solve the technical problem of how to improve the speed of obtaining the values ​​of input and output parameters from a JSON string.

[0006] To achieve the above objectives, this application provides a data processing method, which includes the following steps:

[0007] Obtain a JSON string, which includes the names of the input and output parameters and the values ​​corresponding to those names; the names can be historical names or the latest names.

[0008] Based on a preset mapping table, the names of some of the input and output parameters are transformed so that the names of all the input and output parameters are either the agreed-upon historical names or the agreed-upon latest names; the preset mapping table records the mapping relationship between the historical name and the latest name of any input or output parameter.

[0009] In response to the input of a data acquisition command, the target value corresponding to the target name is obtained based on the target name of the target input / output parameter variable in the data acquisition command; the target name is the converted name.

[0010] For example, before performing the name conversion operation on some of the input and output parameter variables based on the preset mapping table, the following steps are included:

[0011] Extract the name and the corresponding value from the JSON string, and store the name as the first column and the value as the second column in the database;

[0012] The operation of converting the names of some of the input and output parameter variables based on a preset mapping table includes:

[0013] In response to the input of an operation command, based on the SQL statement corresponding to the operation command and a preset mapping table, the historical name in the column containing the name is converted into the corresponding latest name, or the latest name in the column containing the name is converted into the corresponding historical name.

[0014] For example, after storing the name as the first column and the value as the second column in the database, the method further includes:

[0015] Based on the lower function, convert the uppercase letters in the name to lowercase letters;

[0016] or,

[0017] Based on the upper function, the lowercase letters in the name are converted to uppercase letters.

[0018] For example, the method further includes:

[0019] The names in the first column and the values ​​in the second column stored in the database are stored in a map structure.

[0020] Furthermore, to achieve the above objectives, this application also provides a data processing method, which includes the following steps:

[0021] The data processing method includes the following steps:

[0022] Obtain a JSON string, which includes the names of the input and output parameters and the values ​​corresponding to those names; the names can be historical names or the latest names.

[0023] In response to the input of a data acquisition instruction, the target value corresponding to the target name of the target input / output parameter variable in the data acquisition instruction is acquired;

[0024] If obtaining the target value fails, the target historical name or the target latest name corresponding to the target name is matched in the preset mapping table; the preset mapping table records the mapping relationship between the historical name and the latest name of any of the input and output parameters.

[0025] Retrieve the target value corresponding to the historical name or the latest name of the target in response to the input of the data retrieval command.

[0026] For example, matching the target name in a preset mapping table to obtain the target's historical name or the target's latest name includes:

[0027] When the target name is the latest target name and there are multiple historical target names corresponding to the latest target name:

[0028] The target's historical name, determined when most recently responding to the data retrieval instruction corresponding to the latest name of the target, is obtained from the preset mapping table; or...

[0029] The most frequently used historical name within a preset time period is matched in the preset mapping table.

[0030] Furthermore, to achieve the above objectives, this application also provides a data processing method, which includes the following steps:

[0031] Generate a configuration command and send the configuration command to the front-end device; the configuration command is used to configure the front-end device to uniformly determine the names of input and output parameters as agreed historical names or latest names;

[0032] Obtain a JSON string, which includes the names of the input and output parameters and the values ​​corresponding to those names; the names are the agreed-upon historical names or the latest names; the JSON string is provided by the front-end device.

[0033] In response to the input of a data acquisition command, the target value corresponding to the target name of the target input / output parameter variable in the data acquisition command is acquired; the target name is a pre-agreed historical name or the latest name.

[0034] To achieve the above objectives, this application also provides a data processing apparatus, the data processing apparatus comprising:

[0035] The first acquisition module is used to acquire a JSON string, which includes the names of the input and output parameter variables and the values ​​corresponding to those names; the names are either historical names or the latest names.

[0036] The first conversion module is used to convert the names of some of the input and output parameters based on a preset mapping table, so that the names of all the input and output parameters are either the historical names or the latest names; the preset mapping table records the mapping relationship between the historical name and the latest name of any input or output parameter.

[0037] The second acquisition module is used to respond to the input of a data acquisition instruction and acquire the target value corresponding to the target name based on the target name of the target input / output parameter variable in the data acquisition instruction; the target name is the converted name.

[0038] To achieve the above objectives, this application also provides an electronic device, the device comprising: a memory, a processor, and a data processing program stored in the memory and executable on the processor, the data processing program being configured to implement the steps of the data processing method described above.

[0039] To achieve the above objectives, this application also provides a computer-readable storage medium storing a data processing program, which, when executed by a processor, implements the steps of the data processing method described above.

[0040] In this embodiment, after obtaining the JSON string, instead of using the `get_json_object` function and passing in the corresponding name to retrieve the value, a preset mapping table is used to convert the names of some input and output parameters. This ensures that all names are either pre-defined historical or latest names. Therefore, when retrieving the values ​​of the corresponding input and output parameters via a data retrieval command, the user can use these pre-defined historical or latest names. It can be understood that because the names of the input and output parameters are pre-defined historical or latest names, and the target name in the data retrieval command is also a pre-defined historical or latest name, the user can directly retrieve the values ​​using the pre-defined historical or latest names without needing to consider whether the names in the input and output parameters are historical or latest. This improves the speed of retrieving the values ​​of input and output parameters from the JSON string. Attached Figure Description

[0041] Figure 1 This is a flowchart illustrating the first embodiment of the data processing method of this application;

[0042] Figure 2 This is a flowchart illustrating the second embodiment of the data processing method of this application;

[0043] Figure 3 This is a schematic diagram illustrating the principle of converting a JSON string into two columns of data, as described in the embodiments of the data processing method of this application.

[0044] Figure 4 This is a schematic diagram illustrating the principle of the conversion operation involved in the data processing method embodiments of this application;

[0045] Figure 5This is a flowchart illustrating the third embodiment of the data processing method of this application;

[0046] Figure 6 This is a schematic diagram illustrating the principle of converting two columns of data into a map structure, as described in the embodiments of the data processing method of this application.

[0047] Figure 7 This is a flowchart illustrating the fourth embodiment of the data processing method of this application;

[0048] Figure 8 This is a flowchart illustrating the fifth embodiment of the data processing method of this application;

[0049] Figure 9 This is a schematic diagram of the hardware operating environment involved in the embodiments of this application.

[0050] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0051] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0052] This application provides a data processing method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the data processing method of this application.

[0053] It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here. This data processing method can be applied to electronic devices and includes:

[0054] Step S110: Obtain a JSON string, which includes the names of the input and output parameters and the values ​​corresponding to those names; the names are either historical names or the latest names.

[0055] In the process of building an artificial intelligence model, an initial model needs to be trained to obtain a target model with a certain accuracy. This training process involves a large number of input parameters, and correspondingly, the model outputs its prediction results, i.e., the output parameters. For example, in the fintech field, it is necessary to predict a user's loan amount or credit rating, and then conduct corresponding business based on the prediction results. Taking the prediction of a user's loan amount as an example, during the training of the corresponding model, the input parameters include, but are not limited to, name, age, and occupation; correspondingly, the output parameter is the loan amount.

[0056] For these input and output parameters, the industry still needs to analyze them to extract valuable data from a large amount of data. This analysis involves parameter passing. Currently, parameters are passed in JSON format, specifically as JSON strings. Taking the input parameters as the aforementioned name, age, and occupation as an example, the JSON string would be {name:"Zhang San", age:30, position:"Engineer"}. The input parameter names include "name", "age", and "position". The value corresponding to "name" is "Zhang San", the value corresponding to "age" is "30", and the value corresponding to "position" is "Engineer". The rules for the names and corresponding values ​​of output parameters are basically the same as those for input parameters, and will not be repeated here.

[0057] For the names of input and output parameter variables, there are historical names or latest names. This is because the training process of the model has a certain time span. During the training process, for different versions of intermediate models (that is, between the initial model and the target model), the names are changed due to different personnel providing data, different data sources and other reasons, that is, names with the same meaning corresponding to different intermediate models have different designations. For example, for age, there may be designations such as "age" and "years_old". It can be understood that if "age" is the designation of the latest version of the model, then "age" is the latest name of age, and "years_old" is the historical name of age. Of course, there may be one or more historical names, for example, the designation of age may also be "years_of_age" and so on. Correspondingly, "synonyms in multiple words" may appear in multiple JSON strings, for example, there are two JSON strings, which are {name:"Zhang San",age:30,position:"Engineer"} and {name:"Li Si",years_old:25,position:"Cook"} respectively. It can be understood that both "age" and "years_old" refer to age. When the relevant personnel obtain the value corresponding to age from the JSON string through the get_json_object function, the acquisition may fail. For example, when they pass in the parameter "age" through the get_json_object function, only one of the values, that is, "30", can be obtained, but the value "25" cannot be obtained. At this time, the relevant personnel need to be familiar with the naming rule or obtain the naming rule by manually consulting the preset mapping table, that is, to understand that "years_old" also refers to age, and they need to pass in the parameter "years_old" through the get_json_object function again, so as to obtain the value "25". This way of obtaining the value corresponding to the variable requires multiple calls to the get_json_object function. It can be understood that this way of obtaining the value corresponding to the variable is very cumbersome and time-consuming. In this regard, the embodiments of the present application propose to convert the names, which greatly simplifies the acquisition of the value corresponding to the variable, thereby reducing the acquisition time and further improving the acquisition speed.

[0058] Step S120: performing a conversion operation on the names of part of the input and output parameter variables based on a preset mapping table, so that all the names of the input and output parameter variables are the agreed historical names or all are the agreed latest names; the preset mapping table records the mapping relationship between the historical name and the latest name of any of the input and output parameter variables.

[0059] By agreeing in advance to uniformly use the historical names or the latest names, the naming rules for all input and output parameter variables can be unified, so that when relevant personnel acquire corresponding values, they can obtain multiple values through one call according to the naming rule, instead of only one value. For example, there are two JSON strings, which are {name:"Zhang San",age:30,position:"Engineer"} and {name:"Li Si",years_old:25,position:"Chef"} respectively. After converting "age" in {name:"Zhang San",age:30,position:"Engineer"} to "years_old", when relevant personnel input the parameter "years_old" through the get_json_object function, two values, namely 30 and 25, can be obtained, instead of only 25.

[0060] It should be noted that for the case where it is agreed to uniformly use the historical names and there are multiple historical names, it is also possible to agree to use one of them.

[0061] Step S130: In response to the input of a data acquisition instruction, acquire a target value corresponding to the target name based on the target name of the target input and output parameter variable in the data acquisition instruction; wherein the target name is a converted name.

[0062] It should be noted that the data acquisition instruction is used to indicate the target to be acquired, and the target is the target value, therefore, the target name of the target input and output parameter variable exists in the data acquisition instruction.

[0063] It can be understood that in the embodiments of the present application, after the JSON string is acquired, the get_json_object function is not used with the corresponding name input to acquire the value corresponding to the name. Instead, a preset mapping table is used to perform conversion operation on the names of some input and output parameter variables, so that all the names are the agreed historical names or the latest names. Thus, when acquiring the values of the corresponding input and output parameter variables through the data acquisition instruction, relevant personnel can use the agreed historical names or latest names in the data acquisition instruction. It can be understood that since the names of the input and output parameter variables are the agreed historical names or the latest names, and the target name in the data acquisition instruction is also the agreed historical name or latest name, when relevant personnel input the data acquisition instruction to acquire the values of the corresponding input and output parameter variables, they do not need to care whether the names in the input and output parameter variables are historical names or latest names, and they can directly use the agreed historical names or latest names for acquisition to obtain the corresponding values, thereby improving the speed of acquiring the values of the input and output parameter variables from the JSON string.

[0064] On the basis of the above first embodiment, a second embodiment of the data processing method of the present application is proposed, with reference to Figure 2 , Figure 2 This is a flowchart illustrating a second embodiment of the data processing method of this application. In this second embodiment, to facilitate the conversion operation, the JSON string is converted into two columns of data, namely a key column and a value column. Specifically, before performing the conversion operation on the names of some of the input and output parameter variables based on the preset mapping table, the following steps are included:

[0065] Step S220: Extract the name and the value corresponding to the name from the JSON string, and store the name as the first column and the value as the second column in the database.

[0066] It should be noted that the operations of extracting the name and its corresponding value, and then using the name as the first column and the value as the second column, can be achieved using the `str_to_map` and `explode` functions. (See reference...) Figure 3 , Figure 3 This is a schematic diagram illustrating the principle of converting a JSON string into two columns of data, as described in the embodiments of the data processing method of this application.

[0067] The operation of converting the names of some of the input and output parameter variables based on a preset mapping table includes:

[0068] Step S230: In response to the input of the operation instruction, based on the SQL statement corresponding to the operation instruction and the preset mapping table, the historical name in the column where the name is located is converted into the corresponding latest name, or the latest name in the column where the name is located is converted into the corresponding historical name.

[0069] It's worth noting that the advantage of converting a JSON string into two columns is that batch operations can be performed using SQL (Structured Query Language) statements. For example, given 10 JSON strings, where the ages are named "years_old" (the latest age) in 6 strings and "age" (historical age) in the other 4 strings, converting "age" to "years_old" using SQL can be done with a single SQL statement. (See reference...) Figure 4 , Figure 4 This is a schematic diagram illustrating the principle of the conversion operation involved in the data processing method embodiment of this application. 401 is a preset mapping table, showing the mapping relationship between "years_old" and "age"; 402 is the original table before the conversion operation; and 403 is the updated table after the conversion operation. During the conversion operation, 401 and 402 are connected using an SQL statement. Since the latest name "years_old" exists in 402, it is converted to the corresponding historical name "age".

[0070] It is understood that by converting the JSON string into two columns of data in this embodiment, batch conversion operations are achieved, thereby improving conversion efficiency.

[0071] It should be noted that, generally speaking, historical names are more standardized and more well-known. Therefore, converting the latest name in the column containing the name to the corresponding historical name will make it easier for the relevant personnel to use.

[0072] Furthermore, after storing the name as the first column and the value as the second column in the database, the method further includes: converting the uppercase letters in the name to lowercase letters based on the lower function; or, converting the lowercase letters in the name to uppercase letters based on the upper function.

[0073] It's important to note that the values ​​in the `key` column above may contain both uppercase and lowercase letters. For example, a name might be simply "name" or "Name". For these non-standard names, retrieving the corresponding value may fail. For instance, if the target name of the input / output parameter in the data retrieval command is "name", then the value corresponding to "Name" in the database will not be retrieved. To address this, a method similar to the name conversion described above can be used, converting lowercase letters to uppercase or vice versa, ensuring consistent case across all names and establishing a consensus on whether to use lowercase or uppercase letters. This case conversion improves the success rate of retrieving the value corresponding to the name.

[0074] Based on the second embodiment described above, a third embodiment of the data processing method of this application is proposed, with reference to... Figure 5 , Figure 5 This is a flowchart illustrating a third embodiment of the data processing method of this application. In this third embodiment, the method further includes:

[0075] Step S540: Store the name in the first column and the value in the second column stored in the database using a map structure.

[0076] It should be noted that different versions of the intermediate model have different serial numbers; that is, each intermediate model has a unique serial number for each input and output parameter. (See reference...) Figure 6 , Figure 6 This is a schematic diagram illustrating the principle of converting two columns of data into a map structure, as described in the embodiments of the data processing method of this application.

[0077] It should be noted that when retrieving the values ​​of input and output parameters using data retrieval commands, in addition to specifying the name, a serial number is also required to obtain the corresponding value.

[0078] In the process of data analysis, the analysis and calculation are usually performed line by line, for example... Figure 6 The string "1002, name, Li Si" represents one data entry. However, a single data entry in a key-value table (two columns) is meaningless during analysis. Therefore, to facilitate analysis, the name in the first column and the value in the second column, stored in the database, can be stored using a map structure. This involves converting the two columns of data into a map structure (e.g.,...). Figure 6 One of the map structure data is "1001、{name:"Zhang San",age:30,position:"Engineer"}").

[0079] In addition, this application also provides a data processing method, referring to Figure 7 , Figure 7 This is a flowchart illustrating the fourth embodiment of the data processing method of this application.

[0080] It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here. This data processing method can be applied to electronic devices and includes:

[0081] Step S710: Obtain a JSON string, which includes the names of the input and output parameter variables and the values ​​corresponding to those names; the names are either historical names or the latest names.

[0082] Step S720: In response to the input of the data acquisition instruction, acquire the target value corresponding to the target name of the target input / output parameter variable in the data acquisition instruction;

[0083] Step S730: If obtaining the target value fails, the target historical name or the target latest name corresponding to the target name is matched in the preset mapping table; the preset mapping table records the mapping relationship between the historical name and the latest name of any of the input and output parameters.

[0084] Step S740: Reacquire the target value corresponding to the target's historical name or the latest target name in response to the input of the data acquisition instruction.

[0085] It should be noted that, in this embodiment, after obtaining the JSON string, the `get_json_object` function can still be used with the corresponding name to retrieve the value. However, unlike the method of repeatedly inputting the name to obtain the corresponding value in actual applications, this embodiment automatically matches the corresponding historical or latest target name in a preset mapping table when retrieving the target value fails. The target value is then retrieved again using the historical or latest target name. That is, if retrieving the target value using the historical target name fails, the latest target name corresponding to the historical target name is obtained through the preset mapping table, and the target value is retrieved using the latest target name; or, if retrieving the target value using the latest target name fails, the historical target name corresponding to the latest target name is obtained through the preset mapping table, and the target value is retrieved using the historical target name. Therefore, when inputting data retrieval commands to obtain the values ​​of the corresponding input and output parameters, users do not need to worry about whether the name in the input and output parameters is a historical or latest name; they can directly use the historical or latest name to obtain the corresponding value, thereby improving the speed of retrieving the values ​​of input and output parameters from the JSON string.

[0086] Further, matching the target name with the target historical name or the target latest name in the preset mapping table includes: when the target name is the target latest name and there are multiple target historical names corresponding to the target latest name: matching the target historical name determined when responding to the data acquisition instruction corresponding to the target latest name in the preset mapping table; or, matching the target historical name with the highest usage frequency within a preset time period in the preset mapping table.

[0087] When there are multiple target historical names, it is necessary to retrieve the target historical name corresponding to the data retrieval command from among these multiple target historical names. Generally, the target historical name corresponding to the latest target name in the most recent response is the same as the target historical name corresponding to the latest target name in the current response, or the target historical name with the highest usage frequency within a preset time period is the same as the target historical name corresponding to the latest target name in the current response. The preset time period can be set as needed, such as 1 day, 2 days, etc., and this application embodiment does not make a specific limitation.

[0088] In addition, this application also provides a data processing method, referring to Figure 8 , Figure 8 This is a flowchart illustrating the fifth embodiment of the data processing method of this application.

[0089] It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here. This data processing method can be applied to electronic devices and includes:

[0090] Step S810: Generate a configuration command and send the configuration command to the front-end device; the configuration command is used to configure the front-end device to uniformly determine the names of input and output parameters as agreed historical names or latest names;

[0091] Step S820: Obtain a JSON string, which includes the names of the input and output parameters and the values ​​corresponding to those names; the names are the agreed-upon historical names or the latest names; the JSON string is provided by the front-end device.

[0092] Step S830: In response to the input of the data acquisition instruction, acquire the target value corresponding to the target name of the target input / output parameter variable in the data acquisition instruction; the target name is a pre-agreed historical name or the latest name.

[0093] It should be noted that, in this embodiment, the conversion operation is no longer performed after the JSON string is obtained. This conversion operation, which involves uniformly determining the names of the input and output parameters to agreed-upon historical or latest names, is completed on the front-end device, ensuring that the names in the JSON string are consistent with either historical or latest names. Therefore, when users input data retrieval commands to obtain the values ​​of the corresponding input and output parameters, they do not need to concern themselves with whether the names in the input and output parameters are historical or latest; they can directly use either the historical or latest name to obtain the corresponding values, thereby improving the speed of retrieving the values ​​of input and output parameters from the JSON string.

[0094] Furthermore, this application also provides a data processing apparatus, the data processing apparatus comprising:

[0095] The first acquisition module is used to acquire a JSON string, which includes the names of the input and output parameter variables and the values ​​corresponding to those names; the names are either historical names or the latest names.

[0096] The first conversion module is used to convert the names of some of the input and output parameters based on a preset mapping table, so that the names of all the input and output parameters are either the historical names or the latest names; the preset mapping table records the mapping relationship between the historical name and the latest name of any input or output parameter.

[0097] The second acquisition module is used to respond to the input of a data acquisition instruction and acquire the target value corresponding to the target name based on the target name of the target input / output parameter variable in the data acquisition instruction; the target name is the converted name.

[0098] For example, the data processing apparatus further includes:

[0099] The extraction module is used to extract the name and the value corresponding to the name from the JSON string, and store the name as the first column and the value as the second column in the database;

[0100] The first conversion module is specifically used for:

[0101] In response to the input of an operation command, based on the SQL statement corresponding to the operation command and a preset mapping table, the historical name in the column containing the name is converted into the corresponding latest name, or the latest name in the column containing the name is converted into the corresponding historical name.

[0102] For example, the data processing apparatus further includes:

[0103] The second conversion module is used to convert uppercase letters in the name to lowercase letters based on the lower function; or, based on the upper function, to convert lowercase letters in the name to uppercase letters.

[0104] For example, the data processing apparatus further includes:

[0105] The storage module is used to store the name in the first column and the value in the second column stored in the database in a map structure.

[0106] The specific implementation of the data processing device in this application is basically the same as the first, second and third embodiments of the data processing method described above, and will not be repeated here.

[0107] Furthermore, this application also provides a data processing apparatus, the data processing apparatus comprising:

[0108] The first acquisition module is used to acquire a JSON string, which includes the names of the input and output parameter variables and the values ​​corresponding to those names; the names are either historical names or the latest names.

[0109] The second acquisition module is used to acquire the target value corresponding to the target name of the target input / output parameter variable in the data acquisition instruction in response to the input of the data acquisition instruction;

[0110] The matching module is used to match the target name with the target historical name or the target latest name in a preset mapping table if the target value acquisition fails; the preset mapping table records the mapping relationship between the historical name and the latest name of any of the input and output parameters.

[0111] The third acquisition module is used to reacquire the target value corresponding to the historical name or the latest name of the target, in response to the input of the data acquisition instruction.

[0112] For example, the matching module is specifically used for:

[0113] When the target name is the latest target name and there are multiple historical target names corresponding to the latest target name:

[0114] The target's historical name, determined when responding to the latest data acquisition instruction corresponding to the target's latest name, is matched in the preset mapping table; or, the target's historical name, which is used most frequently within a preset time period, is matched in the preset mapping table.

[0115] The specific implementation of the data processing device in this application is basically the same as that in the fourth embodiment of the data processing method described above, and will not be repeated here.

[0116] Furthermore, this application also provides a data processing apparatus, the data processing apparatus comprising:

[0117] A generation module is used to generate configuration commands and send the configuration commands to the front-end device; the configuration commands are used to configure the front-end device to uniformly determine the names of input and output parameters as agreed-upon historical names or latest names;

[0118] The first acquisition module is used to acquire a JSON string, which includes the names of input and output parameter variables and the values ​​corresponding to those names; the names are the agreed-upon historical names or the latest names; the JSON string is provided by the front-end device.

[0119] The second acquisition module is used to acquire the target value corresponding to the target name of the target input / output parameter variable in the data acquisition instruction in response to the input of the data acquisition instruction; the target name is a pre-agreed historical name or the latest name.

[0120] The specific implementation of the data processing device in this application is basically the same as that in the fifth embodiment of the data processing method described above, and will not be repeated here.

[0121] In addition, this application also provides an electronic device. For example... Figure 9 As shown, Figure 9 This is a schematic diagram of the hardware operating environment involved in the embodiments of this application.

[0122] like Figure 9 As shown, the electronic device may include a processor 901, a communication interface 902, a memory 903, and a communication bus 904. The processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904. The memory 903 is used to store computer programs. When the processor 901 executes the program stored in the memory 903, it implements the steps of the data processing method.

[0123] The communication bus 904 mentioned in the aforementioned electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 904 can be divided into an address bus, a data bus, and a control bus, etc. For ease of illustration, it is represented by only one thick line in the figure, but this does not indicate that there is only one bus or one type of bus.

[0124] The communication interface 902 is used for communication between the above-mentioned electronic device and other devices.

[0125] The memory 903 may include random access memory (RMD) or non-volatile memory (NM), such as at least one disk storage device. Optionally, the memory 903 may also be at least one storage device located remotely from the aforementioned processor 901.

[0126] The processor 901 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0127] The specific implementation of the electronic device in this application is basically the same as the embodiments of the data processing method described above, and will not be repeated here.

[0128] Furthermore, embodiments of this application also propose a computer-readable storage medium storing a data processing program, which, when executed by a processor, implements the steps of the data processing method described above.

[0129] The specific implementation of the computer-readable storage medium in this application is basically the same as the embodiments of the data processing method described above, and will not be repeated here.

[0130] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0131] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0132] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0133] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A data processing method, characterized in that, The data processing method includes the following steps: Obtain a JSON string, which includes the names of the input and output parameters and the values ​​corresponding to those names; the names are either historical names or the latest names, and the historical names and the latest names are the names of the input and output parameters of different versions of intermediate models during model training, with the intermediate models being between the initial model and the target model; Based on a preset mapping table, the names of some of the input and output parameters are transformed so that the names of all the input and output parameters are either the agreed-upon historical names or the agreed-upon latest names; the preset mapping table records the mapping relationship between the historical name and the latest name of any input or output parameter. In response to the input of a data acquisition command, based on the target name of the target input / output parameter variable in the data acquisition command, the target value corresponding to the target name is obtained; the target name is the converted name. Before performing the name conversion operation on some of the input and output parameter variables based on the preset mapping table, the following steps are included: Extract the name and the corresponding value from the JSON string, and store the name as the first column and the value as the second column in the database; The names in the first column and the values ​​in the second column stored in the database are stored in a map structure; The operation of converting the names of some of the input and output parameter variables based on a preset mapping table includes: In response to the input of an operation command, based on the SQL statement corresponding to the operation command and a preset mapping table, the historical name in the column containing the name is converted into the corresponding latest name, or the latest name in the column containing the name is converted into the corresponding historical name.

2. The data processing method as described in claim 1, characterized in that, After storing the name as the first column and the value as the second column in the database, the method further includes: Based on the lower function, convert the uppercase letters in the name to lowercase letters; or, Based on the upper function, the lowercase letters in the name are converted to uppercase letters.

3. A data processing method, characterized in that, The data processing method includes the following steps: Obtain a JSON string, which includes the names of the input and output parameters and the values ​​corresponding to those names; the names are either historical names or the latest names, and the historical names and the latest names are the names of the input and output parameters of different versions of intermediate models during model training, with the intermediate models being between the initial model and the target model; In response to the input of a data acquisition command, the target value corresponding to the target name of the target input / output parameter variable in the data acquisition command is acquired. The target name is obtained by converting the names of the input / output parameter variables based on a preset mapping table. Before converting the names of some of the input / output parameter variables based on the preset mapping table, the name and the value corresponding to the name are extracted from the JSON string, and the name is stored in the database as the first column and the value is stored in the database as the second column. The name in the first column and the value in the second column stored in the database are stored in a map structure. The conversion operation of the names of some of the input / output parameter variables based on the preset mapping table includes: in response to the input of an operation command, based on the SQL statement corresponding to the operation command and the preset mapping table, converting the historical name in the column where the name is located into the corresponding latest name, or converting the latest name in the column where the name is located into the corresponding historical name. If obtaining the target value fails, the target historical name or the target latest name corresponding to the target name is matched in the preset mapping table; the preset mapping table records the mapping relationship between the historical name and the latest name of any of the input and output parameters. Retrieve the target value corresponding to the historical name or the latest name of the target in response to the input of the data retrieval command.

4. The data processing method as described in claim 3, characterized in that, The target name is matched against the target name in the preset mapping table to obtain the target's historical name or the target's latest name, including: When the target name is the latest target name and there are multiple historical target names corresponding to the latest target name: The target's historical name, determined when most recently responding to the data retrieval instruction corresponding to the latest name of the target, is obtained from the preset mapping table; or... The most frequently used historical name within a preset time period is matched in the preset mapping table.

5. A data processing method, characterized in that, The data processing method includes the following steps: A configuration command is generated and sent to the front-end device. The configuration command is used to configure the front-end device to uniformly determine the names of the input and output parameters as agreed-upon historical names or latest names. The historical names and latest names are the names of the input and output parameters of different versions of intermediate models during model training. The intermediate models are between the initial model and the target model. Obtain a JSON string, which includes the names of the input and output parameters and the values ​​corresponding to those names; the names are the agreed-upon historical names or the latest names; the JSON string is provided by the front-end device. In response to the input of a data acquisition command, the target value corresponding to the target name of the target input / output parameter variable in the data acquisition command is acquired; the target name is a pre-defined historical name or latest name, wherein the target name is obtained by converting the names of the input / output parameter variables based on a preset mapping table. Before converting the names of some of the input / output parameter variables based on the preset mapping table, the name and the value corresponding to the name are extracted from the JSON string, and the name is stored in the database as the first column and the value is stored in the database as the second column. The name in the first column and the value in the second column stored in the database are stored in a map structure. The conversion operation of the names of some of the input / output parameter variables based on the preset mapping table includes: in response to the input of an operation command, based on the SQL statement corresponding to the operation command and the preset mapping table, converting the historical name in the column where the name is located into the corresponding latest name, or converting the latest name in the column where the name is located into the corresponding historical name.

6. A data processing apparatus, characterized in that, The data processing device includes: The first acquisition module is used to acquire a JSON string, which includes the names of input and output parameters and the values ​​corresponding to the names; the names are either historical names or latest names, and the historical names and latest names are the names of input and output parameters of different versions of intermediate models during model training, and the intermediate models are between the initial model and the target model. The first conversion module is used to convert the names of some of the input and output parameters based on a preset mapping table, so that the names of all the input and output parameters are either the historical names or the latest names; the preset mapping table records the mapping relationship between the historical name and the latest name of any input or output parameter. The second acquisition module is used to, in response to the input of a data acquisition command, acquire the target value corresponding to the target name based on the target name of the target input / output parameter variable in the data acquisition command; the target name is the converted name; Before performing the name conversion operation on some of the input and output parameter variables based on the preset mapping table, the data processing device further includes: The extraction module is used to extract the name and the value corresponding to the name from the JSON string, and store the name as the first column and the value as the second column in the database; The storage module is used to store the name in the first column and the value in the second column stored in the database in a map structure; The first conversion module is specifically used for: In response to the input of an operation command, based on the SQL statement corresponding to the operation command and a preset mapping table, the historical name in the column containing the name is converted into the corresponding latest name, or the latest name in the column containing the name is converted into the corresponding historical name.

7. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a data processing program stored in the memory and executable on the processor, the data processing program being configured to implement the steps of the data processing method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a data processing program, which, when executed by a processor, implements the steps of the data processing method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • JSON (JavaScript Object Notation) data conversion method and device, computer equipment and storage medium

    CN112882974A