Table icon filling method, device, equipment and storage medium
By performing security checks on table data and automating icon selection, the problem of low efficiency in traditional table icon filling is solved, achieving an efficient and secure icon filling process.
Patent Information
- Application Number
- CN202210138178.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-15
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-02-15
AI Technical Summary
Traditional table icon filling methods require a lot of hard coding, resulting in low efficiency and affecting the speed and efficiency of table icon filling.
By performing security checks on the table data, using preset single-point regular expression rules and icon mapping tables, character features are automatically identified and appropriate rendering icons are selected for filling. In case of verification failure, regular expressions are used for re-verification to construct a second rendering icon.
It improves the efficiency of table icon filling, prevents data tampering and leakage, and ensures the integrity and efficiency of icon filling.
Smart Images

Figure CN114492342B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a table icon filling method, device, electronic device and computer-readable storage medium. Background Art
[0002] Table icons refer to visual icons filled in table data items according to the character features of the table data. They can be used to clearly indicate the trend of table data and increase the readability and external display of table data.
[0003] However, most traditional table icon filling methods use hard coding to insert icons into table slots, that is, users write different codes for each data in the table to fill icons. This will increase the amount of code when filling the table with icons in a power square manner, which takes a lot of time and affects the efficiency of table icon filling. Summary of the invention
[0004] The present invention provides a table icon filling method, device, electronic device and computer-readable storage medium, the main purpose of which is to improve the efficiency of table icon filling.
[0005] To achieve the above object, the present invention provides a table icon filling method, comprising:
[0006] Acquire table data to be filled, perform security verification on the table data, and use the table data that has passed the security verification as verification table data;
[0007] Using a preset single-point regular rule to determine whether the verification table data is successfully verified;
[0008] When the verification of the verification table data succeeds, identifying the character features of the verification table data, searching a preset icon mapping table for a first rendering icon corresponding to the verification table data according to the character features, and filling the verification table data with the first rendering icon to obtain filled table data;
[0009] When the verification of the verification table data fails, the verification table data is re-verified using a preset regular expression, and when the re-verification of the verification table data is successful, a second rendering icon of the verification table data is constructed, and the verification table data is filled with the second rendering icon to obtain the filled table data.
[0010] Optionally, the using the first rendering icon to fill the verification table data to obtain the filled table data includes:
[0011] Obtain a DOM tree of the verification table data, traverse the DOM tree, and obtain node positions of multiple verification table data; obtain the slots to be filled on the node positions, fill the first rendering icon into the slots to be filled, and obtain the filled table data.
[0012] Optionally, before searching a preset icon mapping table for a first rendering icon corresponding to the verification table data according to the character feature, the method further includes:
[0013] An icon type and a table data item are obtained, and the icon type and the table data item are relationally mapped to obtain a mapping relationship between the icon type and the table data item. According to the mapping relationship, an icon mapping table of the icon type and the table data item is constructed.
[0014] Optionally, the using a preset single-point regular rule to determine whether the verification table data is successfully verified includes:
[0015] Obtain the data type of the verification table data, and search in the preset single-point regular rule whether there is a single-point data type consistent with the data type; if there is no single-point data type consistent with the data type, the verification of the verification table data fails; if there is a single-point data type consistent with the data type, the verification of the verification table data succeeds.
[0016] Optionally, querying a preset icon mapping table for a first rendering icon corresponding to the verification table data according to the character feature includes:
[0017] A table data item of the verification table data is obtained, and according to the character feature, a first rendering icon corresponding to the table data item is searched from a preset icon mapping table.
[0018] Optionally, constructing a second rendering icon for the verification table data includes:
[0019] The description content of the verification table input by the user in the preset input box is read, keywords in the description content are extracted, and a second rendering icon of the verification table data is constructed according to the keywords using preset operators.
[0020] Optionally, the performing security verification on the table data includes:
[0021] Performing hash calculation on the table data to obtain a data hash value; performing consistency comparison between the data hash value and the standard hash value; if the data hash value and the standard hash value are inconsistent, determining that the table data has failed the security check; if the data hash value and the standard hash value are consistent, determining that the table data has passed the security check.
[0022] In order to solve the above problem, the present invention further provides a table icon filling device, the device comprising:
[0023] A verification module is used to obtain table data to be filled, perform security verification on the table data, and use the table data that has passed the security verification as verification table data;
[0024] A verification module, used to determine whether the verification table data is successfully verified using a preset single-point regular rule;
[0025] A table icon filling module is used to identify the character features of the verification table data when the verification of the verification table data is successful, and according to the character features, query the first rendering icon corresponding to the verification table data from a preset icon mapping table, and use the first rendering icon to fill the verification table data to obtain filled table data; when the verification of the verification table data fails, re-verify the verification table data using a preset regular expression, and when the re-verification of the verification table data is successful, construct a second rendering icon for the verification table data, and use the second rendering icon to fill the verification table data to obtain filled table data.
[0026] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0027] a memory storing at least one computer program; and
[0028] The processor executes the computer program stored in the memory to implement the table icon filling method described above.
[0029] In order to solve the above problem, the present invention further provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned table icon filling method.
[0030] In the embodiment of the present invention, firstly, by performing a security check on the table data to be filled, and obtaining the check table data according to the security check result, the table data can be prevented from being tampered with or leaked; secondly, the embodiment of the present invention uses a preset single-point regular rule to determine whether the check table data is successfully verified, without the need for the user to write repeated codes multiple times to verify each data type in the check table data, thereby improving the verification efficiency of the check table data, and when the verification is successful, the first rendering icon corresponding to the check table data is queried from the preset icon mapping table, and the check table data is filled with the first rendering icon, which can directly realize the selection of different icons in the check table data, without the need for the user to write different codes for each check table data, thereby improving the efficiency of icon filling; and when the verification fails, the check table data is re-checked using a preset regular expression, and when the check table data is successfully re-checked, a second rendering icon of the check table data is constructed, and the check table data is filled with the second rendering icon, which can further generate different rendering icons, improve the icon integrity when the table icon is filled, and further improve the efficiency of table icon filling. Therefore, the table icon filling method, device, electronic device and storable medium proposed in the embodiment of the present invention can improve the efficiency of table icon filling. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A schematic diagram of a flow chart of a table icon filling method provided by an embodiment of the present invention;
[0032] Figure 2 A schematic diagram of a module of a table icon filling device provided by an embodiment of the present invention;
[0033] Figure 3 A schematic diagram of the internal structure of an electronic device for implementing a table icon filling method provided by an embodiment of the present invention;
[0034] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0035] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0036] The embodiment of the present invention provides a method for filling a table icon. The execution subject of the table icon filling method includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the table icon filling method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0037] Reference Figure 1 FIG. 1 is a flow chart of a method for filling a table icon according to an embodiment of the present invention. In the embodiment of the present invention, the method for filling a table icon includes:
[0038] S1. Obtain table data to be filled, perform security verification on the table data, and use the table data that has passed the security verification as verification table data.
[0039] In an embodiment of the present invention, the table data refers to various data to be filled in the table, wherein the table data includes table name, time, data table name, field names of the data table and data corresponding to each field name, and the table data can be obtained from an enterprise database.
[0040] Furthermore, the embodiment of the present invention can prevent the table data from being tampered with or leaked by performing security verification on the table data.
[0041] As an embodiment of the present invention, the security verification of the table data includes:
[0042] Performing hash calculation on the table data to obtain a data hash value; performing consistency comparison between the data hash value and the standard hash value; if the data hash value and the standard hash value are inconsistent, determining that the table data has failed the security check; if the data hash value and the standard hash value are consistent, determining that the table data has passed the security check.
[0043] Among them, the preset hash algorithm (such as SHA algorithm) can be used to perform hash calculation on the table data to obtain a data hash value with a fixed length of 256; the standard hash value refers to the real hash value of the existing table data. By comparing the data hash value with the standard hash value, the table data can be prevented from being tampered with, and the data hash value has a strong anti-tampering ability. For any input, even if it is only a very small change, the data hash value will change very much.
[0044] For example, the table data is "telephone", the data hash value calculated by hash is "C7BE1ED902FB8DD4D48897C6452F5D7E509FBCDBE2808B16BCF4EDCE4C07D14E", and the standard hash value is also "C7BE1ED902FB8DD4D48897C6452F5D7E509FBCDBE2808B16BCF4EDCE4C07D14E", it can be determined that the table data passes the security check.
[0045] Furthermore, in an optional embodiment of the present invention, the table data that has successfully undergone security verification is used as verification table data, which can improve the security of the table data.
[0046] S2. Using a preset single-point regular rule, determine whether the verification table data is successfully verified.
[0047] In an embodiment of the present invention, the single-point regular rule is a string and value matching pattern, which can be used to verify each data type in the verification table data. There is no need for the user to write repeated code multiple times to verify each data type in the verification table data, thereby improving the verification efficiency of the verification table data.
[0048] Furthermore, the data types of the verification table data include numeric type (including integer and floating point type), character string type (including Chinese characters, English letters, spaces and character string types composed of numbers, such as coded telephone numbers), date type and time type.
[0049] As an embodiment of the present invention, the use of a preset single-point regular rule to determine whether the verification table data is successfully verified includes:
[0050] Obtain the data type of the verification table data, and search in the preset single-point regular rule whether there is a single-point data type consistent with the data type; if there is no single-point data type consistent with the data type, the verification of the verification table data fails; if there is a single-point data type consistent with the data type, the verification of the verification table data succeeds.
[0051] The single point data types also include numeric type, string type, date type and time type.
[0052] In an optional embodiment of the present invention, a single-point regular rule composed of symbols such as ">, <, <= and >=" may be used to find out whether there is a single-point data type consistent with the data type.
[0053] S3. When the verification of the verification table data is successful, identify the character features of the verification table data, query the first rendering icon corresponding to the verification table data from a preset icon mapping table according to the character features, and use the first rendering icon to fill the verification table data to obtain the filled table data.
[0054] In an embodiment of the present invention, when the verification of the verification table data is successful, it means that the data types in the verification table data are all verified, and the character features refer to the specific attributes of each character in the verification table data, such as telephone number, rate of return, etc. By identifying the character features of the verification table data, the identifier corresponding to the character information in the verification table data can be obtained. For example, when the character feature is identified as an 11-digit number, the identifier of the character feature is a mobile phone number; when the character feature is identified as Xiao Zhang, the identifier of the character feature is a name.
[0055] In the embodiment of the present invention, the preset icon mapping table refers to a data table storing the mapping relationship between table data items and icons.
[0056] In an optional implementation of the present invention, before searching the preset icon mapping table for the first rendering icon corresponding to the verification table data according to the character feature, the method further includes:
[0057] An icon type and a table data item are obtained, and the icon type and the table data item are relationally mapped to obtain a mapping relationship between the icon type and the table data item. According to the mapping relationship, an icon mapping table of the icon type and the table data item is constructed.
[0058] Among them, the icon type refers to the type of icon associated with the identification of the character feature, such as a telephone icon, a landline icon and a name icon; the table data item refers to each item of data in the verification table data; the mapping relationship refers to a one-to-one correspondence. For example, if the table data item is a telephone number, the icon type can be a telephone icon; if the table data item is a landline number, the icon type can be a landline icon; if the table data item is domestic, the icon type can be a Chinese icon; if the table data item is foreign, the icon type can be a corresponding foreign icon.
[0059] Furthermore, the embodiment of the present invention can directly implement the selection of different icons in the verification table data by querying the first rendering icon corresponding to the verification table data from a preset icon mapping table according to the character features, without the user having to write different codes for each verification table data to generate an icon, thereby improving the efficiency of subsequent icon filling.
[0060] In detail, the querying, according to the character feature, a first rendering icon corresponding to the verification table data from a preset icon mapping table includes:
[0061] A table data item of the verification table data is obtained, and according to the character feature, a first rendering icon corresponding to the table data item is searched from a preset icon mapping table.
[0062] In the embodiment of the present invention, by using the first rendering icon to fill the verification table data to obtain the filled table data, the first rendering icon can be directly filled into the corresponding position in the verification table data, thereby improving the efficiency of icon filling.
[0063] In detail, the using the first rendering icon to fill the verification table data to obtain the filled table data includes:
[0064] Obtain a DOM tree of the verification table data, traverse the DOM tree, and obtain node positions of multiple verification table data; obtain the slots to be filled on the node positions, fill the first rendering icon into the slots to be filled, and obtain the filled table data.
[0065] In an embodiment of the present invention, the DOM tree refers to a page view that describes each data item in the verification table data. The DOM tree can be traversed by a preset converter (such as Babel) to obtain the position of the verification table data in the DOM tree, and then the slot to be filled is obtained from the node position, and the first rendering icon is filled into the slot to be filled to obtain the filled table data, which can improve the efficiency of filling the first rendering icon.
[0066] S4. When the verification of the verification table data fails, the verification table data is re-verified using a preset regular expression, and when the re-verification of the verification table data is successful, a second rendering icon of the verification table data is constructed, and the verification table data is filled with the second rendering icon to obtain the filled table data.
[0067] In the embodiment of the present invention, the regular expression is a rule for string matching, wherein the regular expression is a character pattern composed of common characters and special characters.
[0068] In an embodiment of the present invention, regular expressions can be used to recheck verification table data, that is, to recheck whether character features in the verification table data match character rules in the regular expression; if the character feature is a telephone number with a fixed length of 11 digits, when a character greater than or less than 11 digits is identified, the character feature does not match the character rule and the recheck fails. When the recheck fails, it indicates that an error has occurred in the character feature, and the verification failure result is returned to the user until the character feature modified by the user is identified and recheck succeeds; if an 11-digit character is identified, the character feature matches the character rule and the recheck succeeds. By rechecking the verification table data using regular expressions, the subsequent generation of the second rendered icon can be further ensured to improve the icon integrity of the table icon filling.
[0069] In an embodiment of the present invention, the second rendering icon refers to the icon corresponding to the table data item of the remaining verification table data. For example, a table data item in the verification table data is the revenue rate, and the first rendering icon does not have an icon type that identifies the revenue rate. In this case, a regular expression can be used to re-verify the verification table data to obtain a second rendering icon that identifies the revenue rate (the color and size of the icon can be customized).
[0070] As an optional embodiment of the present invention, the step of constructing a second rendering icon for the verification table data includes:
[0071] The description content of the verification table input by the user in the preset input box is read, keywords in the description content are extracted, and a second rendering icon of the verification table data is constructed according to the keywords using preset operators.
[0072] In one embodiment of the present invention, the description content refers to the limitation of the verification form data and the limitation of the second rendering icon color input by the user. For example, the description content is the trademark information in the verification form data, and the corresponding second rendering icon color of the trademark information is red.
[0073] In an optional embodiment of the present invention, a keyword extraction algorithm such as (TF-IDF) can be used to implement keyword extraction of the description content. For example, the description content is trademark information in the verification table data. The trademark information keywords can be obtained through the keyword extraction algorithm.
[0074] In an embodiment of the present invention, the preset operator may be operator, and the preset operator is formed by combining multiple standard operators selected by a user. For example, the standard operators exists (used to search and check whether there are records that meet specific conditions in table data), and (connection operator), create (creation operator) and color (color qualification symbol) can be used to form the operator exists (trademark information); create (graph) and color (graph red).
[0075] Furthermore, the preset operator in the embodiment of the present invention mainly functions to convert the keyword information into a corresponding second rendering icon. For example, if the keywords are trademark information and a red icon, a red trademark information rendering icon can be generated using the preset operator.
[0076] In another embodiment of the present invention, the method of filling the verification table data with the second rendering icon is consistent with the method of filling the verification table data with the first rendering icon in S3, which will not be repeated here.
[0077] In the embodiment of the present invention, firstly, by performing security verification on the table data to be filled, the table data that has successfully passed the security verification is used as the verification table data, which can prevent the table data from being tampered with or leaked; secondly, the embodiment of the present invention uses a preset single-point regular rule to determine whether the verification of the verification table data is successful, without the need for the user to write repeated codes multiple times to verify each data type in the verification table data, thereby improving the verification efficiency of the verification table data, and when the verification is successful, the first rendering icon corresponding to the verification table data is queried from the preset icon mapping table, and the verification table data is filled with the first rendering icon, which can directly realize the selection of different icons in the verification table data, without the need for the user to write different codes for each verification table data, thereby improving the efficiency of icon filling; and when the verification fails, the verification table data is re-verified using a preset regular expression, and when the verification table data is successfully re-verified, a second rendering icon of the verification table data is constructed, and the verification table data is filled with the second rendering icon, which can further generate different rendering icons, improve the icon integrity when the table icon is filled, and further improve the efficiency of table icon filling. Therefore, the table icon filling method proposed in the embodiment of the present invention can improve the efficiency of table icon filling.
[0078] like Figure 2 The figure shows a functional module diagram of the table icon filling device of the present invention.
[0079] The table icon filling device 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the table icon filling device can include a verification module 101, a verification module 102, and a table icon filling module 103. The module described in the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0080] In this embodiment, the functions of each module / unit are as follows:
[0081] The verification module 101 is used to obtain table data to be filled, perform security verification on the table data, and use the table data that has passed the security verification as verification table data.
[0082] In an embodiment of the present invention, the table data refers to various data to be filled in the table, wherein the table data includes table name, time, data table name, field names of the data table and data corresponding to each field name, and the table data can be obtained from an enterprise database.
[0083] Furthermore, the embodiment of the present invention can prevent the table data from being tampered with or leaked by performing security verification on the table data.
[0084] As an embodiment of the present invention, the verification module 101 performs security verification on the table data by performing the following operations, including:
[0085] Performing hash calculation on the table data to obtain a data hash value; performing consistency comparison between the data hash value and the standard hash value; if the data hash value and the standard hash value are inconsistent, determining that the table data has failed the security check; if the data hash value and the standard hash value are consistent, determining that the table data has passed the security check.
[0086] Among them, the preset hash algorithm (such as SHA algorithm) can be used to perform hash calculation on the table data to obtain a data hash value with a fixed length of 256; the standard hash value refers to the real hash value of the existing table data. By comparing the data hash value with the standard hash value, the table data can be prevented from being tampered with, and the data hash value has a strong anti-tampering ability. For any input, even if it is only a very small change, the data hash value will change very much.
[0087] For example, the table data is "telephone", the data hash value calculated by hash is "C7BE1ED902FB8DD4D48897C6452F5D7E509FBCDBE2808B16BCF4EDCE4C07D14E", and the standard hash value is also "C7BE1ED902FB8DD4D48897C6452F5D7E509FBCDBE2808B16BCF4EDCE4C07D14E", it can be determined that the table data passes the security check.
[0088] Furthermore, in an optional embodiment of the present invention, the table data that has successfully undergone security verification is used as verification table data, which can improve the security of the table data.
[0089] The verification module 102 is used to determine whether the verification table data is successfully verified by using a preset single-point regular rule.
[0090] In an embodiment of the present invention, the single-point regular rule is a string and value matching pattern, which can be used to verify each data type in the verification table data. There is no need for the user to write repeated code multiple times to verify each data type in the verification table data, thereby improving the verification efficiency of the verification table data.
[0091] Furthermore, the data types of the verification table data include numeric type (including integer and floating point type), character string type (including Chinese characters, English letters, spaces and character string types composed of numbers, such as coded telephone numbers), date type and time type.
[0092] As an embodiment of the present invention, the verification module 102 determines whether the verification of the verification table data is successful by performing the following operations using a preset single-point regular rule, including:
[0093] Obtain the data type of the verification table data, and search in the preset single-point regular rule whether there is a single-point data type consistent with the data type; if there is no single-point data type consistent with the data type, the verification of the verification table data fails; if there is a single-point data type consistent with the data type, the verification of the verification table data succeeds.
[0094] The single point data types also include numeric type, string type, date type and time type.
[0095] In an optional embodiment of the present invention, a single-point regular rule composed of symbols such as ">, <, <= and >=" may be used to find out whether there is a single-point data type consistent with the data type.
[0096] The table icon filling module 103 is used to identify the character features of the verification table data when the verification of the verification table data is successful, and query the first rendering icon corresponding to the verification table data from a preset icon mapping table according to the character features, and use the first rendering icon to fill the verification table data to obtain filled table data. When the verification of the verification table data fails, the verification table data is re-verified using a preset regular expression, and when the re-verification of the verification table data is successful, a second rendering icon for the verification table data is constructed, and the verification table data is filled with the second rendering icon to obtain filled table data.
[0097] In an embodiment of the present invention, when the verification of the verification table data is successful, it means that the data types in the verification table data are all verified, and the character features refer to the specific attributes of each character in the verification table data, such as telephone number, rate of return, etc. By identifying the character features of the verification table data, the identifier corresponding to the character information in the verification table data can be obtained. For example, when the character feature is identified as an 11-digit number, the identifier of the character feature is a mobile phone number; when the character feature is identified as Xiao Zhang, the identifier of the character feature is a name.
[0098] In the embodiment of the present invention, the preset icon mapping table refers to a data table storing the mapping relationship between table data items and icons.
[0099] The table icon filling module 103 can also be used for:
[0100] Before querying the first rendering icon corresponding to the verification table data from the preset icon mapping table, the icon type and the table data item are obtained, the icon type and the table data item are relationally mapped to obtain a mapping relationship between the icon type and the table data item, and an icon mapping table of the icon type and the table data item is constructed based on the mapping relationship.
[0101] Among them, the icon type refers to the type of icon associated with the identification of the character feature, such as a telephone icon, a landline icon and a name icon; the table data item refers to each item of data in the verification table data; the mapping relationship refers to a one-to-one correspondence. For example, if the table data item is a telephone number, the icon type can be a telephone icon; if the table data item is a landline number, the icon type can be a landline icon; if the table data item is domestic, the icon type can be a Chinese icon; if the table data item is foreign, the icon type can be a corresponding foreign icon.
[0102] Furthermore, the embodiment of the present invention can directly implement the selection of different icons in the verification table data by querying the first rendering icon corresponding to the verification table data from a preset icon mapping table according to the character features, without the user having to write different codes for each verification table data to generate an icon, thereby improving the efficiency of subsequent icon filling.
[0103] In detail, the table icon filling module 103 searches for the first rendering icon corresponding to the verification table data from a preset icon mapping table according to the character features by performing the following operations, including:
[0104] A table data item of the verification table data is obtained, and according to the character feature, a first rendering icon corresponding to the table data item is searched from a preset icon mapping table.
[0105] In the embodiment of the present invention, by using the first rendering icon to fill the verification table data to obtain the filled table data, the first rendering icon can be directly filled into the corresponding position in the verification table data, thereby improving the efficiency of icon filling.
[0106] In detail, the table icon filling module 103 further fills the verification table data with the first rendering icon by performing the following operations, and the filled table data includes:
[0107] Obtain a DOM tree of the verification table data, traverse the DOM tree, and obtain node positions of multiple verification table data; obtain the slots to be filled on the node positions, fill the first rendering icon into the slots to be filled, and obtain the filled table data.
[0108] In an embodiment of the present invention, the DOM tree refers to a page view that describes each data item in the verification table data. The DOM tree can be traversed by a preset converter (such as Babel) to obtain the position of the verification table data in the DOM tree, and then the slot to be filled is obtained from the node position, and the first rendering icon is filled into the slot to be filled to obtain the filled table data, which can improve the efficiency of filling the first rendering icon.
[0109] In the embodiment of the present invention, the regular expression is a rule for string matching, wherein the regular expression is a character pattern composed of common characters and special characters.
[0110] In an embodiment of the present invention, regular expressions can be used to recheck verification table data, that is, to recheck whether character features in the verification table data match character rules in the regular expression; if the character feature is a telephone number with a fixed length of 11 digits, when a character greater than or less than 11 digits is identified, the character feature does not match the character rule and the recheck fails. When the recheck fails, it indicates that an error has occurred in the character feature, and the verification failure result is returned to the user until the character feature modified by the user is identified and recheck succeeds; if an 11-digit character is identified, the character feature matches the character rule and the recheck succeeds. By rechecking the verification table data using regular expressions, the subsequent generation of the second rendered icon can be further ensured to improve the icon integrity of the table icon filling.
[0111] In an embodiment of the present invention, the second rendering icon refers to the icon corresponding to the table data item of the remaining verification table data. For example, a table data item in the verification table data is the revenue rate, and the first rendering icon does not have an icon type that identifies the revenue rate. In this case, a regular expression can be used to re-verify the verification table data to obtain a second rendering icon that identifies the revenue rate (the color and size of the icon can be customized).
[0112] As an optional embodiment of the present invention, the step of constructing a second rendering icon for the verification table data includes:
[0113] The description content of the verification table input by the user in the preset input box is read, keywords in the description content are extracted, and a second rendering icon of the verification table data is constructed according to the keywords using preset operators.
[0114] In one embodiment of the present invention, the description content refers to the limitation of the verification form data and the limitation of the second rendering icon color input by the user. For example, the description content is the trademark information in the verification form data, and the corresponding second rendering icon color of the trademark information is red.
[0115] In an optional embodiment of the present invention, a keyword extraction algorithm such as (TF-IDF) can be used to implement keyword extraction of the description content. For example, the description content is trademark information in the verification table data. The trademark information keywords can be obtained through the keyword extraction algorithm.
[0116] In an embodiment of the present invention, the preset operator may be operator, and the preset operator is formed by combining multiple standard operators selected by a user. For example, the standard operators exists (used to search and check whether there are records that meet specific conditions in table data), and (connection operator), create (creation operator) and color (color qualification symbol) can be used to form the operator exists (trademark information); create (graph) and color (graph red).
[0117] Furthermore, the preset operator in the embodiment of the present invention mainly functions to convert the keyword information into a corresponding second rendering icon. For example, if the keywords are trademark information and a red icon, a red trademark information rendering icon can be generated using the preset operator.
[0118] In yet another embodiment of the present invention, the method of filling the verification table data by using the second rendering icon is consistent with the method of filling the verification table data by using the first rendering icon, which will not be described in detail herein.
[0119] In the embodiment of the present invention, firstly, by performing security verification on the table data to be filled, the table data that has successfully passed the security verification is used as the verification table data, which can prevent the table data from being tampered with or leaked; secondly, the embodiment of the present invention uses a preset single-point regular rule to determine whether the verification of the verification table data is successful, without the need for the user to write repeated codes multiple times to verify each data type in the verification table data, thereby improving the verification efficiency of the verification table data, and when the verification is successful, the first rendering icon corresponding to the verification table data is queried from the preset icon mapping table, and the verification table data is filled with the first rendering icon, which can directly realize the selection of different icons in the verification table data, without the need for the user to write different codes for each verification table data, thereby improving the efficiency of icon filling; and when the verification fails, the verification table data is re-verified using a preset regular expression, and when the verification table data is successfully re-verified, a second rendering icon of the verification table data is constructed, and the verification table data is filled with the second rendering icon, which can further generate different rendering icons, improve the icon integrity when the table icon is filled, and further improve the efficiency of table icon filling. Therefore, the table icon filling device proposed in the embodiment of the present invention can improve the efficiency of table icon filling.
[0120] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing the table icon filling method of the present invention.
[0121] The electronic device may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a table icon filling program.
[0122] Wherein, the memory 11 includes at least one type of medium, and the medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, local disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 can also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 can also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as the code of the table icon filling program, but also can be used to temporarily store data that has been output or is to be output.
[0123] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules (such as table icon filling programs, etc.) stored in the memory 11, and calls data stored in the memory 11 to execute various functions of the electronic device and process data.
[0124] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The communication bus 12 is configured to realize connection and communication between the memory 11 and at least one processor 10, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0125] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0126] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0127] Optionally, the communication interface 13 may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices.
[0128] Optionally, the communication interface 13 may also include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.
[0129] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0130] The table icon filling program stored in the memory 11 in the electronic device is a combination of multiple computer programs, and when running in the processor 10, it can achieve:
[0131] Acquire table data to be filled, perform security verification on the table data, and use the table data that has passed the security verification as verification table data;
[0132] Using a preset single-point regular rule to determine whether the verification table data is successfully verified;
[0133] When the verification of the verification table data succeeds, identifying the character features of the verification table data, searching a preset icon mapping table for a first rendering icon corresponding to the verification table data according to the character features, and filling the verification table data with the first rendering icon to obtain filled table data;
[0134] When the verification of the verification table data fails, the verification table data is re-verified using a preset regular expression, and when the re-verification of the verification table data is successful, a second rendering icon of the verification table data is constructed, and the verification table data is filled with the second rendering icon to obtain the filled table data.
[0135] Specifically, the specific implementation method of the processor 10 for the above computer program can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0136] Furthermore, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable medium. The computer-readable medium can be non-volatile or volatile. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM).
[0137] The embodiment of the present invention may further provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program may implement:
[0138] Acquire table data to be filled, perform security verification on the table data, and use the table data that has passed the security verification as verification table data;
[0139] Using a preset single-point regular rule to determine whether the verification table data is successfully verified;
[0140] When the verification of the verification table data succeeds, identifying the character features of the verification table data, searching a preset icon mapping table for a first rendering icon corresponding to the verification table data according to the character features, and filling the verification table data with the first rendering icon to obtain filled table data;
[0141] When the verification of the verification table data fails, the verification table data is re-verified using a preset regular expression, and when the re-verification of the verification table data is successful, a second rendering icon of the verification table data is constructed, and the verification table data is filled with the second rendering icon to obtain the filled table data.
[0142] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0143] In the several embodiments provided by the present invention, it should be understood that the disclosed media, devices, apparatuses and methods can be implemented in other ways. For example, the apparatus embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0144] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0145] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0146] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0147] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0148] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0149] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.
[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A table icon filling method, It is characterized in that The method comprises: Acquire table data to be filled, perform security verification on the table data, and use the table data that has passed the security verification as verification table data; Using a preset single-point regular rule to determine whether the verification table data is successfully verified; When the verification of the verification table data succeeds, identifying the character features of the verification table data, searching a preset icon mapping table for a first rendering icon corresponding to the verification table data according to the character features, and filling the verification table data with the first rendering icon to obtain filled table data; When the verification of the verification table data fails, the verification table data is re-verified using a preset regular expression, and when the re-verification of the verification table data is successful, a second rendering icon of the verification table data is constructed, and the verification table data is filled using the second rendering icon to obtain filled table data; Wherein, the use of a preset single-point regular rule to determine whether the verification of the verification table data is successful includes: obtaining the data type of the verification table data, and searching in the preset single-point regular rule to see whether there is a single-point data type consistent with the data type; if there is no single-point data type consistent with the data type, the verification of the verification table data fails; if there is a single-point data type consistent with the data type, the verification of the verification table data succeeds; The constructing of the second rendering icon of the verification table data includes: reading the description content of the verification table input by the user in a preset input box, extracting keywords in the description content, and constructing the second rendering icon of the verification table data based on the keywords using preset operators.
2. The table icon filling method as claimed in claim 1, It is characterized in that The step of filling the verification table data with the first rendering icon to obtain the filled table data includes: Obtain a DOM tree of the verification table data, traverse the DOM tree, and obtain node positions of multiple verification table data; obtain the slots to be filled on the node positions, fill the first rendering icon into the slots to be filled, and obtain the filled table data.
3. The table icon filling method as claimed in claim 1, It is characterized in that Before searching a preset icon mapping table for a first rendering icon corresponding to the verification table data according to the character feature, the method further includes: An icon type and a table data item are obtained, and the icon type and the table data item are relationally mapped to obtain a mapping relationship between the icon type and the table data item. According to the mapping relationship, an icon mapping table of the icon type and the table data item is constructed.
4. The table icon filling method as claimed in claim 1, It is characterized in that The step of searching a preset icon mapping table for a first rendering icon corresponding to the verification table data according to the character feature includes: A table data item of the verification table data is obtained, and according to the character feature, a first rendering icon corresponding to the table data item is searched from a preset icon mapping table.
5. The table icon filling method as claimed in claim 1, It is characterized in that The performing security verification on the table data includes: Performing hash calculation on the table data to obtain a data hash value; performing consistency comparison between the data hash value and the standard hash value; if the data hash value and the standard hash value are inconsistent, determining that the table data has failed the security check; if the data hash value and the standard hash value are consistent, determining that the table data has passed the security check.
6. A table icon filling device, used to implement the table icon filling method according to any one of claims 1 to 5, It is characterized in that The device comprises: A verification module is used to obtain table data to be filled, perform security verification on the table data, and use the table data that has passed the security verification as verification table data; A verification module, used to determine whether the verification table data is successfully verified using a preset single-point regular rule; A table icon filling module is used to identify the character features of the verification table data when the verification of the verification table data is successful, and according to the character features, query the first rendering icon corresponding to the verification table data from a preset icon mapping table, and use the first rendering icon to fill the verification table data to obtain filled table data; when the verification of the verification table data fails, re-verify the verification table data using a preset regular expression, and when the re-verification of the verification table data is successful, construct a second rendering icon for the verification table data, and use the second rendering icon to fill the verification table data to obtain filled table data.
7. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the table icon filling method according to any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by a processor, the table icon filling method according to any one of claims 1 to 5 is implemented.
