Data processing method, apparatus and device

By constructing a syntax tree and determining symbol target information, automated account verification is achieved, solving the problems of low efficiency and accuracy of manual verification and improving the efficiency and accuracy of account verification.

CN116049687BActive Publication Date: 2026-01-02ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211725080.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2026-01-02
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

In existing technologies, manual screening, matching, and verification of account validity face problems of low efficiency and accuracy, especially in the case of large amounts of data and complex data structures.

Method used

By constructing a syntax tree, the target information and distance of symbols are determined, and a symbol table is used for classification and matching. Combined with validity verification methods, account verification is automated.

Benefits of technology

It improves the efficiency and accuracy of account verification, reduces manual screening costs, and enhances the accuracy of symbol matching and validity verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116049687B_ABST
    Figure CN116049687B_ABST
Patent Text Reader

Abstract

Embodiments of the present specification provide a data processing method, device and equipment, wherein the method comprises: obtaining target data to be detected, and constructing a syntax tree based on the target data; determining target information corresponding to each symbol in the target data based on the syntax tree and the relationship between the scope in which each symbol in the target data is located; the target information comprises the access path of the scope in which the each symbol is located; determining the target distance between any two symbols in the target data based on the target information corresponding to each symbol in the target data, and performing pairing processing on any two symbols in the target data based on the target distance to obtain a symbol pair with successful pairing; and performing validity verification on the symbols in the symbol pair based on the validity verification mode corresponding to the symbols in the symbol pair.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present document relates to the technical field of data processing, and particularly relates to a data processing method, device and equipment. BACKGROUND

[0002] With the rapid development of computer technology, the types and quantities of application services provided by enterprises for users are also increasing, and the data volume of user data is increasing, and the data structure is becoming more and more complex, which leads to high complexity of data detection.

[0003] Taking account validity verification through code data as an example, a person needs to find a user account and corresponding password data from the code data, and verifies the validity of the user account and the password data through the person. However, since the data volume of the to-be-detected data is large and contains a large number of account and password data, the way of screening and pairing through the person and account validity verification will lead to low verification efficiency and accuracy, and therefore, a solution capable of improving the efficiency and accuracy of account validity verification is needed. SUMMARY

[0004] The purpose of the embodiments of the present specification is to provide a data processing method, device and equipment to provide a solution capable of improving the efficiency and accuracy of account validity verification.

[0005] In order to achieve the above technical solutions, the embodiments of the present specification are implemented as follows:

[0006] In a first aspect, a data processing method comprises: obtaining target data to be detected, and constructing a syntax tree based on the target data; determining target information corresponding to each symbol in the target data based on a relationship between the syntax tree and a scope in which each symbol in the target data is located, the target information comprising an access path of the scope in which the each symbol is located; determining a target distance between any two symbols in the target data based on the target information corresponding to each symbol in the target data, and performing pairing processing on any two symbols in the target data based on the target distance to obtain a symbol pair with successful pairing; and performing validity verification on the symbols in the symbol pair based on a validity verification mode corresponding to the symbols in the symbol pair.

[0007] In a second aspect, an embodiment of the present specification provides a data processing apparatus, the apparatus comprising: a data acquisition module configured to acquire target data to be detected, and construct a syntax tree based on the target data; an information determination module configured to determine target information corresponding to each symbol in the target data based on a relationship between the syntax tree and a scope in which each symbol in the target data is located, the target information comprising an access path of the scope in which the each symbol is located; a symbol matching module configured to determine a target distance between any two symbols in the target data based on the target information corresponding to each symbol in the target data, and perform pairing processing on any two symbols in the target data based on the target distance, to obtain a symbol pair in which pairing is successful; and a verification module configured to perform validity verification on the symbols in the symbol pair based on a validity verification manner corresponding to the symbols in the symbol pair.

[0008] In a third aspect, an embodiment of the present specification provides a data processing device, the data processing device comprising: a processor; and a memory arranged to store computer executable instructions, the executable instructions, when executed, causing the processor to: acquire target data to be detected, and construct a syntax tree based on the target data; determine target information corresponding to each symbol in the target data based on a relationship between the syntax tree and a scope in which each symbol in the target data is located, the target information comprising an access path of the scope in which the each symbol is located; determine a target distance between any two symbols in the target data based on the target information corresponding to each symbol in the target data, and perform pairing processing on any two symbols in the target data based on the target distance, to obtain a symbol pair in which pairing is successful; and perform validity verification on the symbols in the symbol pair based on a validity verification manner corresponding to the symbols in the symbol pair.

[0009] In a fourth aspect, an embodiment of the present specification provides a storage medium, the storage medium being configured to store computer executable instructions, the executable instructions, when executed, implementing the following processes: acquiring target data to be detected, and constructing a syntax tree based on the target data; determining target information corresponding to each symbol in the target data based on a relationship between the syntax tree and a scope in which each symbol in the target data is located, the target information comprising an access path of the scope in which the each symbol is located; determining a target distance between any two symbols in the target data based on the target information corresponding to each symbol in the target data, and performing pairing processing on any two symbols in the target data based on the target distance, to obtain a symbol pair in which pairing is successful; and performing validity verification on the symbols in the symbol pair based on a validity verification manner corresponding to the symbols in the symbol pair. BRIEF DESCRIPTION OF DRAWINGS

[0010] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1A This is a flowchart illustrating an embodiment of a data processing method described in this specification;

[0012] Figure 1B This is a schematic diagram of the processing procedure of one data processing method described in this specification;

[0013] Figure 2 This is a schematic diagram illustrating the processing procedure of another data processing method described in this specification;

[0014] Figure 3 This is a schematic diagram of a data processing procedure described in this specification;

[0015] Figure 4 This is a schematic diagram of the structure of an embodiment of a data processing device according to this specification;

[0016] Figure 5 This is a schematic diagram of the structure of a data processing device described in this specification. Detailed Implementation

[0017] This specification provides a data processing method, apparatus, and device through its embodiments.

[0018] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0019] Example 1

[0020] like Figure 1A and 1B As shown in the embodiments of this specification, a data processing method is provided. The execution subject of this method can be a server, which can be a standalone server or a server cluster composed of multiple servers. Specifically, the method may include the following steps:

[0021] In S102, the target data to be detected is obtained, and a syntax tree is constructed based on the target data.

[0022] The target data can be code data generated based on a predetermined programming language, and the target data can include a plurality of Access Keys (AKs) and Secret Keys (SKs).

[0023] In practice, with the rapid development of computer technology, the types and quantities of application services provided by enterprises for users are also increasing, and the amount of user data is also increasing, and the data structure is also becoming more complex, which leads to high complexity of data detection. For example, through code data to verify the validity of the account, the user account and the corresponding password data need to be found from the code data by manual, and the validity of the user account and the password data is verified by manual. However, because the amount of data to be detected is large, and contains a large number of account and password data, the manual screening and pairing and account validity verification will result in low verification efficiency and accuracy. Therefore, a solution is needed to improve the efficiency and accuracy of account validity verification. To this end, the embodiments of the present specification provide a technical solution to solve the above problems, which can be specifically referred to as follows.

[0024] The target data can include a plurality of AKs and SKs, and the plurality of AKs and the plurality of SKs can have a matching relationship, that is, the target data can include a plurality of pairs of AKs and SKs that can be paired. For example, the server can take the code data corresponding to the access request data of the current access database as the target data, and the code data can include a plurality of pairs of AKs and SKs for accessing the database, that is, a plurality of users can simultaneously access the database through their respective accounts and verifiable information.

[0025] The syntax tree can be constructed based on the target data, wherein the generation process of the syntax tree includes two parts of lexical analysis and syntax analysis, and the target data can be analyzed by syntax analysis and lexical analysis respectively, and then the server can generate an accessible syntax tree corresponding to the target data according to the lexical sequence (such as token sequence) generated by lexical analysis of the target data, and the tree-shaped intermediate representation generated by syntax analysis of the target data.

[0026] In S104, the target information corresponding to each symbol in the target data is determined based on the relationship between the syntax tree and the scope where each symbol in the target data is located.

[0027] The target information can include the access path of the scope where each symbol is located.

[0028] In implementation, the syntax tree corresponding to the target data can be accessed through a listening mechanism (such as a Listener mechanism), and according to the entering and leaving triggering mechanism of the scope corresponding to the symbol contained in the target data, the relationship between the scope and the sub-scope can be determined to form a scope tree structure corresponding to the target data. The variables passed through the scope can be stored in the variable data structure under the scope to form a symbol table. The symbol table formed can contain variable types, variable names, variable literal values and the like, and the symbol table can be bound to the scope tree structure to obtain the position of each symbol in the scope tree structure in the target data, that is, the access path of the scope where each symbol is located. For example, the access path of symbol 1 can be 1.2.1, that is, the position of symbol 1 in the scope tree structure is the first sub-scope in the second sub-scope of the root.

[0029] In addition, the determination method of the target information of each symbol in the target data described above is an optional and implementable determination method. In actual application scenarios, there can be many different determination methods, and different determination methods can be selected according to different actual application scenarios, which are not specifically limited by the embodiments of the present specification.

[0030] In S106, the target distance between any two symbols in the target data is determined based on the target information corresponding to each symbol in the target data, and any two symbols in the target data are paired based on the target distance to obtain a symbol pair with successful pairing.

[0031] In implementation, for example, the target distance between any two symbols can be determined through the access path of the scope where each symbol is located. Specifically, if the access path of the scope where symbol 1 is located is 1.2.2 and the access path of the scope where symbol 2 is located is 1.2.1, the target distance between symbol 1 and symbol 2 can be 1, that is, the difference between the second sub-scope in the second sub-scope of the root and the first sub-scope in the second sub-scope of the root is one scope.

[0032] The determination method of the target distance between any two symbols described above is an optional and implementable determination method. In actual application scenarios, there can be many different determination methods, and different determination methods can be selected according to different actual application scenarios, which are not specifically limited by the embodiments of the present specification.

[0033] After determining the target distance between any two symbols, the symbols can be paired by the target distance to obtain a pair of successfully paired symbols. Since the target data can contain multiple pairs of AK and SK, to avoid pairing AK with AK or pairing SK with SK, the symbols in the target data can be classified first, and then the symbols in different classes can be paired to obtain a pair of successfully paired symbols.

[0034] For example, the symbols in the target data can be classified based on a pre-trained classification model to obtain AK and SK classes, or the symbols in the target data can be classified based on the variable types in the symbol table to obtain AK and SK classes, etc. The method for classifying the symbols in the target data can be various, and can be different according to different actual application scenarios, which are not limited in the embodiments of the present disclosure.

[0035] After obtaining the AK and SK classes, the symbols in the AK class and the symbols in the SK class can be paired to obtain a pair of successfully paired symbols. Specifically, the target distance between symbol 1 in the AK class and each symbol in the SK class can be obtained, and the symbol in the SK class with the smallest target distance with symbol 1 can be determined as the matching symbol of symbol 1. In this way, it can be ensured that the pair of successfully paired symbols includes the symbol corresponding to AK and the symbol corresponding to SK, that is, the pairing of AK and SK in the target data can be implemented.

[0036] The above method for determining the pair of successfully paired symbols is an optional and implementable method. In actual application scenarios, there can be various different determination methods, and different determination methods can be selected according to different actual application scenarios, which are not limited in the embodiments of the present disclosure.

[0037] In S108, the symbol in the symbol pair is verified for validity based on the validity verification method corresponding to the symbol in the symbol pair.

[0038] In implementation, there can be various different validity verification methods for different symbol types. The validity verification method corresponding to the symbol in the symbol pair can be obtained based on the preset correspondence between the symbol and the verification method, and the symbol in the symbol pair is verified for validity by the determined validity verification method.

[0039] Alternatively, the database connection method corresponding to the symbol in the symbol pair can be obtained based on the target data (or the symbol table), and the validity verification method corresponding to the database connection method can be obtained based on the preset correspondence between the database connection method and the verification method, and the symbol in the symbol pair is verified for validity by the determined validity verification method.

[0040] The determination method of the above validity verification manner is an optional and implementable determination method. In actual application scenarios, there can be various different determination methods, and different determination methods can be selected according to different actual application scenarios. The embodiments of the present specification do not make specific limitations in this regard.

[0041] The embodiment of the present specification provides a data processing method, obtaining target data to be detected, and constructing a syntax tree based on the target data, determining target information corresponding to each symbol in the target data based on a relationship between the syntax tree and a scope where each symbol in the target data is located, the target information including an access path of the scope where each symbol is located, determining a target distance between any two symbols in the target data based on the target information corresponding to each symbol in the target data, and performing pairing processing on any two symbols in the target data based on the target distance to obtain a symbol pair successfully paired, and performing validity verification on the symbols in the symbol pair based on a validity verification manner corresponding to the symbols in the symbol pair. In this way, the symbols contained in the target data can be paired and processed by constructing the syntax tree and combining the semantic information of the target data, which can save the manual screening and pairing cost, improve the accuracy and pairing efficiency of symbol pairing, and then perform validity verification on the symbols in the symbol pair through the validity verification manner corresponding to the symbols in the symbol pair, thereby improving the efficiency and accuracy of validity verification on the account.

[0042] Embodiment Two

[0043] As shown in Figure 2 The embodiment of the present specification provides a data processing method, and the execution subject of the method can be a server. The server can be an independent server or a server cluster composed of multiple servers. The method can specifically include the following steps:

[0044] In S202, the type of the programming language contained in the target data is obtained, and a target syntax tree generation algorithm corresponding to the type of the programming language is obtained.

[0045] In implementation, because the lexicon and syntax of different types of programming languages are different, different syntax tree generation algorithms can be set for different types of programming languages. The type of the programming language can include JAVA, C, Python, etc. The corresponding target syntax tree generation algorithm can be determined according to the type of the programming language corresponding to the target data.

[0046] In S204, a syntax tree corresponding to the target data is constructed based on the target syntax tree generation algorithm.

[0047] In S104, target information corresponding to each symbol in the target data is determined based on a relationship between the syntax tree and a scope where each symbol in the target data is located.

[0048] The target information can include an access path of a scope in which each symbol is located.

[0049] In S206, each symbol in the target data is filtered based on a preset account keyword, to obtain a first symbol table corresponding to the preset account keyword.

[0050] The preset account keyword can include username, name, etc.

[0051] In S208, each symbol in the target data is filtered based on a preset verifiable information keyword, to obtain a second symbol table corresponding to the preset verifiable information keyword.

[0052] The preset verifiable information keyword can include password, key, etc.

[0053] In implementation, according to a pre-defined key character table (i.e., the preset account keyword, the preset verifiable information keyword, etc.), a variable and a parameter field (e.g., which can be a string) that can be AK or SK in the symbol table can be filtered out, and based on the filtered characters, the first symbol table (i.e., AK table) corresponding to the preset account keyword and the second symbol table (i.e., SK table) corresponding to the preset verifiable information keyword can be constructed.

[0054] In S210, a target distance between any one symbol in the first symbol table and any one symbol in the second symbol table is determined based on target information corresponding to each symbol in the first symbol table and target information corresponding to each symbol in the second symbol table.

[0055] The target distance can be determined based on a text distance of any two symbols in the target data, a similarity distance of the two symbols, and an accessible distance between the two symbols determined by the target information.

[0056] In implementation, the text distance, the similarity distance, and the accessible distance between any one symbol in the first symbol table and any one symbol in the second symbol table can be weighted calculated based on a preset weight, and the calculation result is determined as the target distance between the two symbols. If the two symbols are in the same scope, the accessible distance between the two symbols can be 1, and if the two symbols are in different scopes, the accessible distance between the two symbols can be increased by 1 based on the number of scopes (i.e., to distinguish the case that the two symbols are in the same scope).

[0057] In actual application, the processing manner of S210 can be various, and an optional implementation manner is provided as follows, which can be specifically understood by referring to the following steps one to four:

[0058] Step one, determine the similarity distance between the first symbol and the second symbol.

[0059] Wherein, the first symbol can be any one symbol in the first symbol table, and the second symbol can be any one symbol in the second symbol table.

[0060] In implementation, the first symbol and the second symbol can be filtered based on the preset keyword to obtain the filtered first symbol and the filtered second symbol. Then, the similarity distance between the first symbol and the second symbol is determined based on the number of different symbols between the filtered first symbol and the filtered second symbol, the number of symbols of the filtered first symbol, and the number of symbols of the filtered second symbol.

[0061] The quotient of the square of the number of different symbols between the filtered first symbol and the filtered second symbol and the product of the number of symbols of the filtered first symbol and the number of symbols of the filtered second symbol can be determined as the similarity distance between the first symbol and the second symbol, that is, the symbol length can be normalized to obtain the similarity distance between the symbols.

[0062] For example, assuming that the first symbol is jdbc_mysql_username, the second symbol includes a second symbol 1 and a second symbol 2, the second symbol 1 is jdbc_mysql_password, the second symbol 2 is jdbc_mysql_admin_password, and the preset keyword is username and password, then the filtered first symbol is jdbc_mysql_, the filtered second symbol 1 is jdbc_mysql_, and the filtered second symbol 2 is jdbc_mysql_admin_.

[0063] The number of different symbols between the filtered first symbol and the filtered second symbol 1 is 0, that is, the similarity distance between the first symbol and the second symbol 1 is 0, the number of different symbols between the filtered first symbol and the filtered second symbol 2 is 6 (i.e., admin_), the number of symbols of the filtered first symbol is 11, and the number of symbols of the filtered second symbol 2 is 17. Therefore, the similarity distance between the first symbol and the second symbol 2 can be 6*6 / 11*17=0.0321. Since the similarity distance between the first symbol and the second symbol 2 is greater than the similarity distance between the first symbol and the second symbol 1, the similarity between the first symbol and the second symbol 1 is greater than the similarity between the first symbol and the second symbol 2, that is, the greater the similarity distance, the smaller the similarity between the symbols.

[0064] Step two, in the case of determining that the first symbol and the second symbol are in the same scope based on the target information, determining the text distance between the first symbol and the second symbol in the target data based on the target data, and determining the target distance between the first symbol and the second symbol based on the text distance and the similarity distance.

[0065] In implementation, a target text distance determination algorithm corresponding to the data type of the target data in the text distance determination algorithm can be acquired, and the text distance determination algorithm can include a position attenuation algorithm corresponding to the programming language type, a linear distance determination algorithm corresponding to the configuration language type, etc. The text distance between the first symbol and the second symbol in the target data is determined based on the target text distance determination algorithm, the position information of the first symbol in the target data, and the position information of the second symbol in the target data.

[0066] For example, in a programming language such as JAVA, the sensitivity to variable position is low, so for the data corresponding to the programming language type in the target data, the influence degree of the text distance can be reduced by a position attenuation algorithm such as a log function; and in configuration text (such as properties text), the position of data with high correlation is closer, so the influence degree of the text distance can be increased by a linear distance determination algorithm.

[0067] In the case of determining the text distance and the similarity distance between the first symbol and the second symbol, the target distance between the first symbol and the second symbol can be determined based on the text distance and the similarity distance, such as the weighted average of the text distance and the similarity distance between the first symbol and the second symbol is determined as the target distance between the first symbol and the second symbol, etc.

[0068] Step three, in the case of determining that the first symbol and the second symbol are in different scopes based on the target information, determining the reachable distance between the first symbol and the second symbol based on the target information corresponding to the first symbol and the target information corresponding to the second symbol, and determining the target distance between the first symbol and the second symbol based on the reachable distance and the similarity distance.

[0069] The target information can also include accessible information of each symbol.

[0070] In implementation, in the case of determining that the first symbol and the second symbol are accessible based on the accessible information of the first symbol and the accessible information of the second symbol, the reachable distance between the first symbol and the second symbol can be determined based on the access path of the scope where the first symbol is located and the access path of the scope where the second symbol is located.

[0071] Based on the relationship between the syntax tree and the scope where each symbol in the target data is located, the position of the character in the scope tree structure can be obtained, and the accessible information of the character (i.e., the accessible permission settings of the character on the scope path) can also be obtained. For example, the accessible information of character 1 is public.public.private, which means that the character in the private scope cannot be used by its parent scope, thereby defining the reachability (i.e., whether it is accessible) of the character.

[0072] In the case where it is determined based on the accessible information of the first symbol and the accessible information of the second symbol that the first symbol and the second symbol are accessible, the reachable distance between the first symbol and the second symbol can be determined based on the access path of the scope where the first symbol is located and the access path of the scope where the second symbol is located. For example, based on the access path of the scope where the first symbol is located and the access path of the scope where the second symbol is located, it can be determined whether there is a shared path between the access path of the scope where the first symbol is located and the access path of the scope where the second symbol is located. If there is a shared path, the shared path can be removed from the access path, and the number of sub-scopes contained in the access path after removal can be obtained. Based on the number of sub-scopes, the reachable distance between the first symbol and the second symbol can be determined.

[0073] Specifically, assuming that the access path of the scope where the first symbol is located is 1.2.2.2, and the access path of the scope where the second symbol is located is 1.2.1, the shared path of the two access paths is 1.2. After removing the shared path, the access path of the scope where the first symbol is located is 2.2, and the access path of the scope where the second symbol is located is 1. Therefore, the number of sub-scopes corresponding to the access path of the scope where the first symbol is located after removal is 2, and the number of sub-scopes corresponding to the access path of the scope where the second symbol is located after removal is 1. Thus, the reachable distance between the first symbol and the second symbol can be 2+1=3.

[0074] In addition, in the case where it is determined based on the accessible information of the first symbol and the accessible information of the second symbol that the first symbol and the second symbol are not accessible, the reachable distance between the first symbol and the second symbol can be a preset value (e.g., can be infinity).

[0075] In the case where the reachable distance and the similarity distance between the first symbol and the second symbol are determined, the target distance between the first symbol and the second symbol can be determined based on the reachable distance and the similarity distance. For example, the weighted average of the reachable distance and the similarity distance between the first symbol and the second symbol can be determined as the target distance between the first symbol and the second symbol.

[0076] In S212, based on the target distance, the symbols in the first symbol table and the symbols in the second symbol table are paired to obtain a successfully paired symbol pair.

[0077] In implementation, the smaller the target distance is, the higher the correlation between the two symbols is, and thus the selection priority between the symbols can be determined through the target distance, i.e., the pairing processing can be performed based on the target distance to obtain a successfully paired symbol pair.

[0078] In actual application, the processing manner of S212 can be various, and an optional implementation manner is provided below, which can be specifically referred to the following steps one to four:

[0079] Step one, based on the target distance between the first symbol and each symbol in the second symbol table, a third symbol corresponding to the second symbol table and the first symbol is determined.

[0080] Step two, in the case that the third symbol is not paired, the third symbol and the first symbol are determined as a candidate symbol pair.

[0081] Step three, in the case that the third symbol is paired, based on the target distance between the third symbol and a fourth symbol which is paired with the third symbol as a candidate symbol pair, and the target distance between the third symbol and the first symbol, the symbol paired with the third symbol is determined from the first symbol and the fourth symbol, and the third symbol and the symbol paired with the third symbol are determined as a candidate symbol pair.

[0082] Step four, after the symbols in the first symbol table are paired, the candidate symbol pair is determined as a successfully paired symbol pair.

[0083] In implementation, assuming that the first symbol is a symbol a in the first symbol table, the target distance between the symbol 1 and each symbol in the second symbol table can be obtained, and the symbol with the smallest target distance is determined as a third symbol (assuming that the third symbol is a symbol b in the second symbol table).

[0084] If the symbol b is not paired, the symbol a and the symbol b can be determined as a candidate symbol pair. If the symbol b is paired with the symbol c (i.e., the fourth symbol) as a candidate symbol pair, a target distance between the symbol a and the symbol b and a target distance between the symbol b and the symbol c can be obtained. If the target distance between the symbol a and the symbol b is less than the target distance between the symbol b and the symbol c, the symbol a and the symbol b can be determined as a candidate symbol pair. If the target distance between the symbol a and the symbol b is not less than the target distance between the symbol b and the symbol c, the symbol c and the symbol b as a candidate symbol pair can be kept unchanged. Then, the remaining symbols in the first symbol table and the symbols in the second symbol table are matched, until the symbols in the first symbol table are paired. After the pairing is completed, the candidate symbol pair can be determined as a successfully paired symbol pair.

[0085] In this way, the pairing relationship between the symbols in the first symbol table and the symbols in the second symbol table can be stably determined based on the target distances between the symbols. That is, the pairing relationship between the symbols obtained after multiple executions of the above steps one to four is unchanged.

[0086] In S214, the symbols in the symbol pair are verified for validity based on the validity verification manner corresponding to the symbols in the symbol pair.

[0087] In implementation, the symbols in the symbol pair can be verified for validity based on the validity verification manner corresponding to the symbols in the first symbol table in the symbol pair. That is, the validity of the AK symbol and the SK symbol can be verified based on the validity verification manner corresponding to the AK symbol. This avoids the problems of weak generalization ability and false extraction in the process of pairing and extracting the symbols by using regular expressions, and the problem of being unable to accurately pair the symbols and thus being unable to verify the validity of the symbols due to the inability to obtain the scope information when pairing the symbols.

[0088] In addition, as shown in Figure 3 The target information can further include information for verifying the validity of the symbols. For example, the target information can further include a database connection manner corresponding to the symbols. The symbols can be verified for validity based on the target information. If the symbols are verified for validity, a risk detection strategy corresponding to the symbols in the symbol pair can be obtained, and the symbols in the symbol pair can be detected for risk. In this way, the incremental data can be detected for risk at a lower risk detection cost.

[0089] The embodiment of the present specification provides a data processing method, target data to be detected is acquired, a syntax tree is constructed based on the target data, target information corresponding to each symbol in the target data is determined based on a relationship between scopes in which each symbol in the target data is located and the syntax tree, the target information includes an access path of the scope in which each symbol is located, a target distance between any two symbols in the target data is determined based on the target information corresponding to each symbol in the target data, and any two symbols in the target data are paired based on the target distance to obtain a symbol pair successfully paired, and the symbols in the symbol pair are verified based on an effectiveness verification manner corresponding to the symbols in the symbol pair. In this way, the symbols contained in the target data can be paired by constructing the syntax tree and combining semantic information of the target data, the cost of manual screening and pairing can be saved, the accuracy and pairing efficiency of symbol pairing can be improved, and then the symbols in the symbol pair are verified based on the effectiveness verification manner corresponding to the symbols in the symbol pair, thereby improving the efficiency and accuracy of the effectiveness verification of the account.

[0090] Embodiment three

[0091] The above is the data processing method provided by the embodiment of the present specification, based on the same idea, the embodiment of the present specification also provides a data processing device, as shown in Figure 4 .

[0092] The data processing device includes a data acquisition module 401, an information determination module 402, a symbol matching module 403 and a verification module 404, wherein:

[0093] The data acquisition module 401 is configured to acquire target data to be detected, and construct a syntax tree based on the target data.

[0094] The information determination module 402 is configured to determine target information corresponding to each symbol in the target data based on a relationship between scopes in which each symbol in the target data is located and the syntax tree, and the target information includes an access path of the scope in which each symbol is located.

[0095] The symbol matching module 403 is configured to determine a target distance between any two symbols in the target data based on the target information corresponding to each symbol in the target data, and pair any two symbols in the target data based on the target distance to obtain a symbol pair successfully paired.

[0096] The verification module 404 is configured to verify the symbols in the symbol pair based on an effectiveness verification manner corresponding to the symbols in the symbol pair.

[0097] In the embodiment of the present specification, the symbol matching module 403 is configured to:

[0098] filter each symbol in the target data based on a preset account keyword, to obtain a first symbol table corresponding to the preset account keyword;

[0099] filter each symbol in the target data based on a preset verifiable information keyword, to obtain a second symbol table corresponding to the preset verifiable information keyword;

[0100] based on the target information corresponding to each symbol in the first symbol table and the target information corresponding to each symbol in the second symbol table, determine a target distance between any one symbol in the first symbol table and any one symbol in the second symbol table, and based on the target distance, pair the symbols in the first symbol table with the symbols in the second symbol table, to obtain a pair of symbols that are successfully paired.

[0101] In the embodiments of the present specification, the target distance is determined based on a text distance of any two symbols in the target data, a similarity distance of the two symbols, and an accessible distance between the two symbols determined by the target information.

[0102] In the embodiments of the present specification, the symbol matching module 403 is configured to:

[0103] determine a similarity distance between a first symbol and a second symbol, the first symbol being any one symbol in the first symbol table, and the second symbol being any one symbol in the second symbol table;

[0104] In a case where it is determined based on the target information that the first symbol and the second symbol are in the same scope, determine a text distance of the first symbol and the second symbol in the target data based on the target data, and determine a target distance between the first symbol and the second symbol based on the text distance and the similarity distance;

[0105] In a case where it is determined based on the target information that the first symbol and the second symbol are in different scopes, determine an accessible distance between the first symbol and the second symbol based on the target information corresponding to the first symbol and the target information corresponding to the second symbol, and determine a target distance between the first symbol and the second symbol based on the accessible distance and the similarity distance.

[0106] In the embodiments of the present specification, the target information further includes accessible information of each symbol, and the symbol matching module 403 is configured to:

[0107] In a case where it is determined that the first symbol and the second symbol are accessible based on the accessible information of the first symbol and the accessible information of the second symbol, a reachable distance between the first symbol and the second symbol is determined based on an access path of a scope where the first symbol is located and an access path of a scope where the second symbol is located.

[0108] In an embodiment of the present specification, the symbol matching module 403 is configured to:

[0109] obtain a target text distance determination algorithm corresponding to a data type of the target data in the text distance determination algorithm, the text distance determination algorithm comprising a position attenuation algorithm corresponding to a programming language type and a linear distance determination algorithm corresponding to a configuration language type;

[0110] determine a text distance between the first symbol and the second symbol in the target data based on the target text distance determination algorithm, position information of the first symbol in the target data, and position information of the second symbol in the target data.

[0111] In an embodiment of the present specification, the symbol matching module 403 is configured to:

[0112] perform filtering processing on the first symbol and the second symbol based on a preset keyword to obtain a filtered first symbol and a filtered second symbol;

[0113] determine a similarity distance between the first symbol and the second symbol based on a number of different symbols between the filtered first symbol and the filtered second symbol, a number of symbols of the filtered first symbol, and a number of symbols of the filtered second symbol.

[0114] In an embodiment of the present specification, the symbol matching module 403 is configured to:

[0115] determine a third symbol corresponding to the first symbol from the second symbol table based on a target distance between the first symbol and each symbol in the second symbol table;

[0116] In a case where the third symbol is not paired, the third symbol and the first symbol are determined as a candidate symbol pair;

[0117] In a case where the third symbol is paired, a symbol paired with the third symbol from among the first symbol and a fourth symbol paired with the third symbol as a candidate symbol pair is determined based on a target distance between the third symbol and the fourth symbol, and a target distance between the third symbol and the first symbol, and the third symbol and the symbol paired with the third symbol are determined as a candidate symbol pair;

[0118] After the symbols in the first symbol table are paired, the candidate symbol pairs are determined to be successfully paired.

[0119] In the embodiments of the present specification, the data acquisition module 401 is configured to:

[0120] acquire a type of programming language contained in the target data, and acquire a target syntax tree generation algorithm corresponding to the type of programming language;

[0121] construct a syntax tree corresponding to the target data based on the target syntax tree generation algorithm.

[0122] The embodiments of the present specification provide a data processing apparatus, which acquires target data to be detected, constructs a syntax tree based on the target data, determines target information corresponding to each symbol in the target data based on a relationship between the syntax tree and a scope in which each symbol in the target data is located, the target information including an access path of the scope in which each symbol is located, determines a target distance between any two symbols in the target data based on the target information corresponding to each symbol in the target data, and performs pairing processing on any two symbols in the target data based on the target distance to obtain a symbol pair successfully paired, and performs validity verification on the symbols in the symbol pair based on a validity verification manner corresponding to the symbols in the symbol pair. In this way, the symbols contained in the target data can be paired by constructing the syntax tree and combining semantic information of the target data, which can save the cost of manual screening and pairing, improve the accuracy and efficiency of symbol pairing, and then improve the efficiency and accuracy of validity verification on the account by performing validity verification on the symbols in the symbol pair based on the validity verification manner corresponding to the symbols in the symbol pair.

[0123] Embodiment Four

[0124] Based on the same idea, the embodiments of the present specification also provide a data processing device, as shown in Figure 5 .

[0125] Data processing devices can vary greatly in configuration or performance, and can include one or more processors 501 and memory 502, which can store one or more stored applications or data. The memory 502 can be volatile or non-volatile memory. The applications stored in the memory 502 can include one or more modules (not shown), each of which can include a series of computer-executable instructions for the data processing device. Further, the processor 501 can be configured to communicate with the memory 502 to execute the series of computer-executable instructions in the memory 502 on the data processing device. The data processing device can also include one or more power supplies 503, one or more wired or wireless network interfaces 504, one or more input / output interfaces 505, and one or more keyboards 506.

[0126] In particular embodiments, a data processing device includes memory and one or more programs, wherein one or more programs are stored in the memory and the one or more programs can include one or more modules, and each module can include a series of computer-executable instructions for the data processing device, and the one or more programs configured to be executed by one or more processors include computer-executable instructions for performing:

[0127] Obtaining target data to be detected, and constructing a syntax tree based on the target data;

[0128] Determining target information corresponding to each symbol in the target data based on a relationship between the syntax tree and a scope in which each symbol in the target data is located, the target information including an access path of the scope in which the each symbol is located;

[0129] Determining a target distance between any two symbols in the target data based on the target information corresponding to each symbol in the target data, and performing pairing processing on any two symbols in the target data based on the target distance to obtain a symbol pair with successful pairing;

[0130] Performing validity verification on the symbols in the symbol pair based on an effectiveness verification mode corresponding to the symbols in the symbol pair.

[0131] Optionally, the determining a target distance between any two symbols in the target data based on the target information corresponding to each symbol in the target data, and performing pairing processing on any two symbols in the target data based on the target distance to obtain a symbol pair with successful pairing includes:

[0132] filter each symbol in the target data based on a preset account keyword, to obtain a first symbol table corresponding to the preset account keyword;

[0133] filter each symbol in the target data based on a preset verifiable information keyword, to obtain a second symbol table corresponding to the preset verifiable information keyword;

[0134] determine a target distance between any one symbol in the first symbol table and any one symbol in the second symbol table based on the target information corresponding to each symbol in the first symbol table and the target information corresponding to each symbol in the second symbol table, and pair the symbols in the first symbol table with the symbols in the second symbol table based on the target distance, to obtain a pair of symbols that are successfully paired.

[0135] Optionally, the target distance is determined based on a text distance of any two symbols in the target data, a similarity distance of the two symbols, and an accessible distance between the two symbols determined by the target information.

[0136] Optionally, the determination of the target distance between any one symbol in the first symbol table and any one symbol in the second symbol table based on the target information corresponding to each symbol in the first symbol table and the target information corresponding to each symbol in the second symbol table comprises:

[0137] determining a similarity distance between a first symbol and a second symbol, the first symbol being any one symbol in the first symbol table and the second symbol being any one symbol in the second symbol table;

[0138] in a case where it is determined based on the target information that the first symbol and the second symbol are in the same scope, determining a text distance of the first symbol and the second symbol in the target data based on the target data, and determining a target distance between the first symbol and the second symbol based on the text distance and the similarity distance;

[0139] in a case where it is determined based on the target information that the first symbol and the second symbol are in different scopes, determining an accessible distance between the first symbol and the second symbol based on the target information corresponding to the first symbol and the target information corresponding to the second symbol, and determining a target distance between the first symbol and the second symbol based on the accessible distance and the similarity distance.

[0140] Optionally, the target information further comprises accessible information of each symbol, and the reachable distance between the first symbol and the second symbol is determined based on the target information corresponding to the first symbol and the target information corresponding to the second symbol, comprising:

[0141] In a case where the first symbol and the second symbol are determined to be accessible based on the accessible information of the first symbol and the accessible information of the second symbol, the reachable distance between the first symbol and the second symbol is determined based on the access path of the scope where the first symbol is located and the access path of the scope where the second symbol is located.

[0142] Optionally, the text distance of the first symbol and the second symbol in the target data is determined based on the target data, comprising:

[0143] A target text distance determination algorithm corresponding to the data type of the target data in the text distance determination algorithm is obtained, and the text distance determination algorithm comprises a position attenuation algorithm corresponding to a programming language type and a linear distance determination algorithm corresponding to a configuration language type.

[0144] The text distance of the first symbol and the second symbol in the target data is determined based on the target text distance determination algorithm, the position information of the first symbol in the target data, and the position information of the second symbol in the target data.

[0145] Optionally, the similarity distance between the first symbol and the second symbol is determined, comprising:

[0146] The first symbol and the second symbol are filtered based on a preset keyword to obtain filtered first symbols and filtered second symbols.

[0147] The similarity distance between the first symbol and the second symbol is determined based on the number of different symbols between the filtered first symbol and the filtered second symbol, the number of symbols of the filtered first symbol, and the number of symbols of the filtered second symbol.

[0148] Optionally, the symbols in the first symbol table and the symbols in the second symbol table are paired based on the target distance to obtain a pair of symbols that are successfully paired, comprising:

[0149] A third symbol corresponding to the second symbol table and the first symbol is determined based on the target distance between the first symbol and each symbol in the second symbol table.

[0150] In a case where the third symbol is not paired, the third symbol and the first symbol are determined as a candidate symbol pair.

[0151] In a case that the third symbol has been paired, determining a symbol in the first symbol and a fourth symbol, which is paired with the third symbol, based on a target distance between the third symbol and the fourth symbol which has been paired with the third symbol as a candidate symbol pair, and a target distance between the third symbol and the first symbol, and determining the third symbol and the symbol paired with the third symbol as the candidate symbol pair;

[0152] After the pairing processing of the symbols in the first symbol table, determining the candidate symbol pair as a symbol pair which is successfully paired.

[0153] Optionally, the target data includes code data generated based on a predetermined programming language, and the constructing the syntax tree based on the target data includes:

[0154] Obtaining a type of the programming language contained in the target data, and obtaining a target syntax tree generation algorithm corresponding to the type of the programming language;

[0155] Constructing a syntax tree corresponding to the target data based on the target syntax tree generation algorithm.

[0156] The embodiment of the present specification provides a data processing device, obtains target data to be detected, and constructs a syntax tree based on the target data. Based on the relationship between the syntax tree and the scope where each symbol in the target data is located, the target information corresponding to each symbol in the target data is determined, the target information includes the access path of the scope where each symbol is located. Based on the target information corresponding to each symbol in the target data, the target distance between any two symbols in the target data is determined, and based on the target distance, any two symbols in the target data are paired to obtain a symbol pair which is successfully paired. Based on the validity verification mode corresponding to the symbols in the symbol pair, the validity of the symbols in the symbol pair is verified. In this way, the symbols contained in the target data can be paired by constructing the syntax tree and combining the semantic information of the target data. The cost of manual screening and pairing can be saved, the accuracy and efficiency of symbol pairing can be improved, and then the validity of the symbols in the symbol pair is verified by the validity verification mode corresponding to the symbols in the symbol pair, thereby improving the efficiency and accuracy of the validity verification of the account.

[0157] Embodiment five

[0158] The embodiment of the present specification also provides a computer readable storage medium, and the computer program is stored on the computer readable storage medium. The computer program is executed by a processor to implement each process of the above data processing method embodiment, and the same technical effects can be achieved. To avoid repetition, it will not be repeated here. The computer readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk or an optical disk, and the like.

[0159] The embodiment of the present specification provides a computer readable storage medium, obtains target data to be detected, and constructs a syntax tree based on the target data. Based on the relationship between the scope where each symbol in the target data is located and the syntax tree, the target information corresponding to each symbol in the target data is determined. The target information includes the access path of the scope where each symbol is located. Based on the target information corresponding to each symbol in the target data, the target distance between any two symbols in the target data is determined. Based on the target distance, any two symbols in the target data are paired and processed to obtain a symbol pair that is successfully paired. Based on the validity verification mode corresponding to the symbols in the symbol pair, the validity of the symbols in the symbol pair is verified. In this way, by constructing the syntax tree, the symbols contained in the target data can be paired and processed in combination with the semantic information of the target data. The cost of manual screening and pairing can be saved, the accuracy and pairing efficiency of symbol pairing can be improved, and then the validity of the symbols in the symbol pair is verified by the validity verification mode corresponding to the symbols in the symbol pair. The efficiency and accuracy of the validity verification of the account are improved.

[0160] The above describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different than the order in the embodiments and still achieve the desired result. In addition, the processes depicted in the figures do not necessarily require the particular order shown or sequential order to achieve the desired results. In certain implementations, multitasking and parallel processing can be utilized or can be advantageous.

[0161] In the 1990s, it was relatively easy to distinguish whether an improvement in a technology was a hardware improvement (e.g., an improvement in the circuit structure of a diode, transistor, switch, etc.) or a software improvement (an improvement in a method flow). However, as technology has evolved, many improvements in method flows today can be considered as direct improvements in hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structures by programming the improved method flows into hardware circuits. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using hardware entity modules. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device. A digital system is "integrated" on a PLD by the designer programming the PLD, rather than by ordering a chip manufacturer to design and fabricate a custom integrated circuit chip. Moreover, instead of manually fabricating integrated circuit chips, this programming is now mostly implemented using "logic compiler" software, which is similar to software compilers used in program development, and the original code to be compiled is written in a specific programming language, which is called a hardware description language (HDL), and there are many such languages, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., and the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should be aware that, as long as the method flow is logically programmed in the above-mentioned hardware description languages and programmed into an integrated circuit, a hardware circuit implementing the logical method flow can be easily obtained.

[0162] The controller can be implemented in any suitable way, e.g. the controller can take the form of a microprocessor or processor and a computer readable medium storing computer readable program code, e.g. software or firmware, executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91 SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to being implemented in pure computer readable program code form, the controller can perfectly well be implemented by means of logic programmed into logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded microcontrollers, etc. to perform the same functions. The controller can thus be considered as a hardware component, and the means comprised therein for performing various functions can be considered as structures within the hardware component. Alternatively, or even, the means for performing various functions can be considered as both a software module implementing a method and a structure within a hardware component.

[0163] The systems, apparatuses, modules or units illustrated by the above embodiments can be implemented by computer chips or entities, or products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0164] For the sake of description, the above apparatuses are described in various units with functions respectively. Of course, the functions of each unit can be implemented in the same or multiple software and / or hardware when implementing one or more embodiments of the present specification.

[0165] Those skilled in the art will understand that the embodiments of the present specification can be provided as a method, a system or a computer program product. Therefore, one or more embodiments of the present specification can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of the present specification can take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.

[0166] The embodiments of the present specification are described with reference to flowcharts and / or block diagrams of the method, device (system) and computer program product according to embodiments of the present specification. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as a combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus generate means for implementing the functions specified in one or more flows in the flowcharts and / or one or more blocks in the block diagrams.

[0167] These computer program instructions can also be stored in a computer readable memory capable of directing the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer readable memory produce a product including instruction means, which implements the functions specified in one or more flows in the flowcharts and / or one or more blocks in the block diagrams.

[0168] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide steps for implementing the functions specified in one or more flows in the flowcharts and / or one or more blocks in the block diagrams.

[0169] In a typical configuration, the computing device includes one or more processors (CPU), input / output interface, network interface, and memory.

[0170] The memory can include non-persistent memory in the computer readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM), etc. The memory is an example of computer readable media.

[0171] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.

[0172] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0173] Those skilled in the art will appreciate that embodiments of the present specification can be provided as methods, systems or computer program products. Therefore, one or more embodiments of the present specification can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of the present specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0174] One or more embodiments of the present specification can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the present specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including storage devices.

[0175] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, for the system embodiments, the description is relatively simple because the system embodiments are basically similar to the method embodiments, and the relevant parts can be referred to the part of the method embodiments.

[0176] The above only describes the embodiments of the specification and is not used to limit the specification. The specification can have various changes and variations for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the specification shall be included in the scope of claims of the specification.

Claims

1. A data processing method comprising: obtaining target data to be detected, and constructing a syntax tree based on the target data; determining target information corresponding to each symbol in the target data based on the syntax tree and a relationship between scopes in which the symbols are located, the target information including an access path of a scope in which each symbol is located; determining a target distance between any two symbols in the target data based on the target information corresponding to the symbols, and performing pairing processing on the any two symbols in the target data based on the target distance to obtain a symbol pair in which pairing is successful; performing validity verification on the symbols in the symbol pair based on an effectiveness verification manner corresponding to the symbols in the symbol pair.

2. The method of claim 1, wherein the determining a target distance between any two symbols in the target data based on the target information corresponding to the symbols, and performing pairing processing on the any two symbols in the target data based on the target distance to obtain a symbol pair in which pairing is successful comprises: performing filtering processing on each symbol in the target data based on a preset account keyword to obtain a first symbol table corresponding to the preset account keyword; performing filtering processing on each symbol in the target data based on a preset verifiable information keyword to obtain a second symbol table corresponding to the preset verifiable information keyword; determining a target distance between any one symbol in the first symbol table and any one symbol in the second symbol table based on the target information corresponding to each symbol in the first symbol table and the target information corresponding to each symbol in the second symbol table, and performing pairing processing on the symbols in the first symbol table and the symbols in the second symbol table based on the target distance to obtain the symbol pair in which pairing is successful.

3. The method of claim 2, wherein the target distance is determined based on a text distance of any two symbols in the target data, a similarity distance of the two symbols, and an accessible distance between the two symbols determined by the target information.

4. The method of claim 3, wherein the determining a target distance between any one symbol in the first symbol table and any one symbol in the second symbol table based on the target information corresponding to each symbol in the first symbol table and the target information corresponding to each symbol in the second symbol table comprises: determining a similarity distance between a first symbol and a second symbol, the first symbol being any one symbol in the first symbol table and the second symbol being any one symbol in the second symbol table; in a case where the first symbol and the second symbol are determined to be in a same scope based on the target information, determining a text distance of the first symbol and the second symbol in the target data based on the target data, and determining a target distance between the first symbol and the second symbol based on the text distance and the similarity distance. In a case where it is determined based on the target information that the first symbol and the second symbol are in different scopes, a reachable distance between the first symbol and the second symbol is determined based on target information corresponding to the first symbol and target information corresponding to the second symbol, and a target distance between the first symbol and the second symbol is determined based on the reachable distance and the similarity distance.

5. The method of claim 4, wherein the target information further comprises accessible information of each symbol, and determining the reachable distance between the first symbol and the second symbol based on the target information corresponding to the first symbol and the target information corresponding to the second symbol comprises: In a case where it is determined based on the accessible information of the first symbol and the accessible information of the second symbol that the first symbol and the second symbol are accessible, a reachable distance between the first symbol and the second symbol is determined based on an access path of a scope in which the first symbol is located and an access path of a scope in which the second symbol is located.

6. The method of claim 4, wherein determining the text distance between the first symbol and the second symbol in the target data based on the target data comprises: obtaining a target text distance determination algorithm corresponding to a data type of the target data in a text distance determination algorithm, wherein the text distance determination algorithm comprises a position attenuation algorithm corresponding to a programming language type and a linear distance determination algorithm corresponding to a configuration language type; determining a text distance between the first symbol and the second symbol in the target data based on the target text distance determination algorithm, position information of the first symbol in the target data, and position information of the second symbol in the target data.

7. The method of claim 4, wherein determining the similarity distance between the first symbol and the second symbol comprises: performing filtering processing on the first symbol and the second symbol based on a preset keyword to obtain a filtered first symbol and a filtered second symbol; determining the similarity distance between the first symbol and the second symbol based on a number of different symbols between the filtered first symbol and the filtered second symbol, a number of symbols of the filtered first symbol, and a number of symbols of the filtered second symbol.

8. The method of claim 4, wherein pairing the symbols in the first symbol table with the symbols in the second symbol table based on the target distance to obtain a successfully paired symbol pair comprises: determining a third symbol corresponding to the first symbol based on a target distance between the first symbol and each symbol in the second symbol table; in a case where the third symbol is not paired, determining the third symbol and the first symbol as a candidate symbol pair. In a case that the third symbol has been paired, determining a symbol in the first symbol and a fourth symbol paired with the third symbol based on a target distance between the third symbol and the fourth symbol which has been paired with the third symbol as a candidate symbol pair, and a target distance between the third symbol and the first symbol, and determining the third symbol and the symbol paired with the third symbol as the candidate symbol pair; After pairing processing of the symbols in the first symbol table, determining the candidate symbol pair as a symbol pair with pairing success.

9. The method of claim 1, wherein the target data comprises code data generated based on a predetermined programming language, and the constructing a syntax tree based on the target data comprises: obtaining a type of the programming language contained in the target data, and obtaining a target syntax tree generation algorithm corresponding to the type of the programming language; constructing a syntax tree corresponding to the target data based on the target syntax tree generation algorithm.

10. A data processing apparatus, comprising: a data obtaining module configured to obtain target data to be detected, and construct a syntax tree based on the target data; an information determining module configured to determine target information corresponding to each symbol in the target data based on a relationship between the syntax tree and a scope in which each symbol in the target data is located, the target information comprising an access path of the scope in which the each symbol is located; a symbol matching module configured to determine a target distance between any two symbols in the target data based on the target information corresponding to each symbol in the target data, and perform pairing processing on any two symbols in the target data based on the target distance to obtain a symbol pair with pairing success; a verification module configured to perform validity verification on the symbols in the symbol pair based on a validity verification manner corresponding to the symbols in the symbol pair.

11. A data processing device, comprising: a processor; and a memory arranged to store computer executable instructions which, when executed, cause the processor to: obtain target data to be detected, and construct a syntax tree based on the target data; determine target information corresponding to each symbol in the target data based on a relationship between the syntax tree and a scope in which each symbol in the target data is located, the target information comprising an access path of the scope in which the each symbol is located; determine a target distance between any two symbols in the target data based on the target information corresponding to each symbol in the target data, and perform pairing processing on any two symbols in the target data based on the target distance to obtain a symbol pair with pairing success; perform validity verification on the symbols in the symbol pair based on a validity verification manner corresponding to the symbols in the symbol pair.

12. A storage medium for storing computer executable instructions which, when executed, implement the following procedures: obtain target data to be detected, and construct a syntax tree based on the target data; ​ determine target information corresponding to each symbol in the target data based on the syntax tree and a relationship between scopes in which the each symbol in the target data is located, the target information including an access path of the scope in which the each symbol is located; determine a target distance between any two symbols in the target data based on the target information corresponding to the each symbol in the target data, and perform pairing processing on the any two symbols in the target data based on the target distance, to obtain a symbol pair with successful pairing; perform validity verification on the symbols in the symbol pair based on a validity verification manner corresponding to the symbols in the symbol pair.

Citation Information

Patent Citations

  • Method for loading symbol table to embedded system, storage medium and terminal

    CN107193604A

  • Account authentication method, device and equipment

    CN112948785A