Code file verification method and device, equipment, medium and product

By combining target knowledge graphs and file recognition models, the problem of inconsistent code file encoding formats in banking systems is solved, enabling fast and accurate encoding type identification and verification, and ensuring the suitability of code files in banking business scenarios.

CN121681318APending Publication Date: 2026-03-17INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511953320.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-03-17

Smart Images

  • Figure CN121681318A_ABST
    Figure CN121681318A_ABST
Patent Text Reader

Abstract

The invention discloses a code file verification method and device, equipment, a medium and a product, and relates to the field of financial science and technology. The method comprises the steps of obtaining a target code file in a target application range in a bank, a pre-constructed target knowledge graph and a pre-trained file recognition model; according to the target code file and the target knowledge graph, determining graph context information corresponding to the target code file and a target type corresponding to a bank business line to which the target code file belongs; determining a current type of the target code file according to the target code file, the atlas context information and a file identification model; and verifying the target code file according to a comparison result of the current type and the target type. According to the embodiment of the invention, the verification can be effectively carried out in time before the code file is deployed and executed, the possibility of abnormal problems is reduced, the code type identification efficiency can be improved, and the accuracy of the code type can be ensured in a corresponding service scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of financial technology, and in particular to a method, apparatus, device, medium and product for verifying code files. Background Technology

[0002] With societal changes and rapid advancements in science and technology, an increasing number of industries are adopting emerging technologies to adjust their operational methods and improve efficiency in production and daily life. In the banking sector, due to the involvement of crucial factors such as finance and property, the internal development process of the banking system is particularly important, and its development is a crucial aspect that personnel in related fields pay close attention to.

[0003] Currently, during the software system development process, different systems within the bank have different requirements for the encoding format of code files, and there is a lack of a unified encoding standard for the same business scenario; misidentification of the encoding type of code files is also prone to occur, resulting in the need to improve recognition efficiency and accuracy. Summary of the Invention

[0004] This application provides a code file verification method, apparatus, device, medium, and product to improve the accuracy of code file encoding type identification and effectively coordinate encoding standards under the same business scenario.

[0005] According to one aspect of this application, a code file verification method is provided, comprising:

[0006] Obtain target code files within the target application scope of the bank, as well as a pre-built target knowledge graph and a pre-trained file recognition model;

[0007] Based on the target code file and the target knowledge graph, determine the graph context information corresponding to the target code file, and the target type corresponding to the banking business line to which the target code file belongs;

[0008] The current type of the target code file is determined based on the target code file, the graph context information, and the file recognition model;

[0009] The target code file is verified based on the comparison result between the current type and the target type.

[0010] According to another aspect of this application, a code file verification apparatus is provided, comprising:

[0011] The graph model acquisition module is used to acquire target code files within the target application scope of the bank, as well as pre-built target knowledge graphs and pre-trained file recognition models;

[0012] The target type determination module is used to determine the graph context information corresponding to the target code file and the target type corresponding to the banking business line to which the target code file belongs, based on the target code file and the target knowledge graph.

[0013] The current type determination module is used to determine the current type of the target code file based on the target code file, the graph context information, and the file recognition model;

[0014] The file type verification module is used to verify the target code file based on the comparison result between the current type and the target type.

[0015] According to another aspect of this application, an electronic device is provided, the electronic device comprising:

[0016] At least one processor; and

[0017] A memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the code file verification method described in any embodiment of this application.

[0019] According to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the code file verification method described in any embodiment of this application.

[0020] According to another aspect of this application, a computer program product is provided, the computer program product including a computer program that, when executed by a processor, implements the code file verification method according to any embodiment of this application.

[0021] In the technical solution of this application embodiment, based on the target code file and the target knowledge graph, the graph context information corresponding to the target code file and the target type corresponding to the banking business line to which the target code file belongs are determined. The expected encoding type of the target code file in the development environment is obtained through the knowledge graph. Based on the target code file, the graph context information, and the file recognition model, the current type of the target code file is determined. Using a pre-trained model to identify the current type can improve the speed of encoding type identification. Based on the comparison result between the current type and the target type, the target code file is verified. This can effectively perform timely verification before the code file is deployed and executed, reducing the possibility of abnormal problems. It can not only improve the efficiency of encoding type identification, but also ensure the accuracy of encoding type in the corresponding business scenario.

[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

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

[0024] Figure 1 This is a flowchart of a code file verification method provided according to Embodiment 1 of this application;

[0025] Figure 2 This is a flowchart of a code file verification method provided according to Embodiment 2 of this application;

[0026] Figure 3 This is a schematic diagram of a code file verification device according to Embodiment 3 of this application;

[0027] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the code file verification method of the embodiments of this application. Detailed Implementation

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

[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0030] Example 1

[0031] Figure 1 This application provides a flowchart of a code file verification method according to Embodiment 1. This embodiment is applicable to the verification of code types after code development within a banking system. The method can be executed by a code file verification device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:

[0032] S110. Obtain the target code files within the target application scope of the bank, as well as the pre-built target knowledge graph and the pre-trained file recognition model.

[0033] The target application scope can be any area that a bank's working system can cover. For example, a bank's transfer system is only responsible for transfer-related business, so the scope of code development related to transfers can be considered the target application scope. Or, a bank's customer management system is responsible for managing various user information and logging user behavior, so the scope of code development related to user management can be considered the target application scope.

[0034] The target code file can be any code file (such as source code files) that needs to be verified. It should be noted that different code files in different business scenarios within a bank may lack a unified coding standard due to various reasons (such as different developer habits or development environments), which can easily cause problems in subsequent downstream processes. Therefore, this application's solution verifies the encoding type of the target code file. It is understood that the target code file can be the most recently submitted code file by the developers; after passing the encoding type verification, it can be deployed and run.

[0035] A knowledge graph is a semantic network that describes objective situations using a graph structure. It is a knowledge base that describes concepts, entities, and their relationships. A target knowledge graph can be a pre-built knowledge graph based on the development status of various systems within a bank. This target knowledge graph extracts entities related to development within the bank, such as code files, developers, requirement documents, and code review. The target knowledge graph is then constructed based on the relationships between these entities. For example, if a code file is the responsibility of a particular developer, a dependency relationship is formed between that code file and that developer.

[0036] The file recognition model can be a model specifically designed to identify the encoding type of code files in the application scenario of this application embodiment. It can be trained using a pre-deployed artificial intelligence model. This application embodiment does not limit the type of artificial intelligence model or the training process; any machine learning model from related technologies, such as a convolutional neural network, can be used. The trained file recognition model can identify the encoding type of the target code file.

[0037] Understandably, whether it's the target code file, the pre-built target knowledge graph, or the pre-trained file recognition model, it can all be directly obtained and used.

[0038] S120. Based on the target code file and the target knowledge graph, determine the graph context information corresponding to the target code file and the target type corresponding to the banking business line to which the target code file belongs.

[0039] The graph context information can be information about other related nodes of the node where the target code file is located in the knowledge graph. Since the knowledge graph exists as a graph network, including nodes and directed edges, nodes store subject information, and directed edges store information about the relationships between different subjects. Following the direction of the directed edges, the upstream and downstream nodes of the node where the target code file is located can all store the graph context information. The banking business line can be the process of a bank's business scenario during development. The target code file is uploaded by developers after development, intended for application in a specific business scenario process; therefore, its encoding type must also adapt to this banking business line. The target type, on the other hand, is the encoding type that the target code file should use in this banking business line. That is, the target type is not the current encoding type of the target code file, but rather the expected encoding type that the target code file should use.

[0040] By using the target knowledge graph to determine the context information of the target code file, the encoding type that the target code file should use in the banking business line can be further determined. This target type is used to verify the target code file.

[0041] S130. Determine the current type of the target code file based on the target code file, the graph context information, and the file recognition model.

[0042] The file recognition model is used to identify the encoding type of code files. The current type is the encoding type of the target code file, that is, the encoding type used by the developer when developing the target code file. This file recognition model can be trained using any machine learning model from related technologies. The model takes the target code file and graph context information as input, and outputs the identified current type of the target code file. Of course, it is understood that the file recognition model can be trained using historical code files and their graph context information in the target knowledge graph; this application embodiment does not limit the training process of the file recognition model.

[0043] S140. Verify the target code file based on the comparison result between the current type and the target type.

[0044] In the aforementioned steps, the current encoding type of the target file and the encoding type that should be used in the banking business line were determined. By comparing the current type and the target type, it is verified whether the encoding type used by the developers is appropriate, thereby helping the banking business system to identify problems in a timely manner during the development process, so as to prevent subsequent downstream problems from occurring due to inappropriate encoding types.

[0045] In the technical solution of this application embodiment, based on the target code file and the target knowledge graph, the graph context information corresponding to the target code file and the target type corresponding to the banking business line to which the target code file belongs are determined. The expected encoding type of the target code file in the development environment is obtained through the knowledge graph. Based on the target code file, the graph context information, and the file recognition model, the current type of the target code file is determined. Using a pre-trained model to identify the current type can improve the speed of encoding type identification. Based on the comparison result between the current type and the target type, the target code file is verified. This can effectively perform timely verification before the code file is deployed and executed, reducing the possibility of abnormal problems. It can not only improve the efficiency of encoding type identification, but also ensure the accuracy of encoding type in the corresponding business scenario.

[0046] Example 2

[0047] Figure 2 This is a flowchart illustrating a code file verification method provided in Embodiment 2 of this application. This embodiment further refines the process for determining the target type of the target code file based on the foregoing embodiments and implementation methods. Figure 2 As shown, the method includes:

[0048] S210. Obtain the target code files within the target application scope of the bank, as well as the pre-built target knowledge graph and the pre-trained file recognition model.

[0049] S220. Based on the target code file, query the graph context information from the target knowledge graph;

[0050] It should be noted that since the target code file is to be used in the processes of the banking business line, these processes can be pre-identified as the main body of the target knowledge graph and the upstream and downstream relationships between them. Therefore, even if the target code files developed by different developers differ, as long as the position of the target code file within the banking business line process remains unchanged, its node position in the target knowledge graph will also be the same. Thus, after developers upload the target code file, they can find other surrounding nodes associated with it through directed edges based on the node position of the target code file in the target knowledge graph. The main body information and relationship information stored in these nodes and directed edges constitute the graph context information.

[0051] S230. Based on the context information of the graph, determine the target type corresponding to the banking business line to which the target code file belongs.

[0052] It is understandable that the encoding type can also be stored as a subject in the node of the target knowledge graph. Since the encoding type is for the target code file, after determining the graph context information, the node corresponding to the encoding type can be found, and the expected target type in the process of the banking business line can be obtained from it.

[0053] S240. Determine the current type of the target code file based on the target code file, the graph context information, and the file recognition model.

[0054] S250. Verify the target code file based on the comparison result between the current type and the target type.

[0055] In the technical solution of this application embodiment, based on the process situation in the banking business line, the graph context information of the target code file is searched in the target knowledge graph, and the expected encoding type of the target code file is determined as the target type. This can accurately find the encoding type that matches the business scenario as the basis for subsequent verification, which helps to improve verification efficiency and reduce the probability of other problems caused by the encoding type in advance.

[0056] In a further optional implementation, the step of querying the graph context information from the target knowledge graph based on the target code file in S220 may include:

[0057] S221. Based on the target code file, query the corresponding target node from the target knowledge graph, and obtain all directed edges and adjacent nodes related to the target node.

[0058] The target node can be the node in the target knowledge graph where the target code file is located. Since the target code file is to be used in the banking business line's processes, these processes can be pre-identified as the main body of the target knowledge graph and the upstream and downstream relationships between them. Therefore, even if target code files developed by different developers differ, as long as the position of the target code file in the banking business line's process remains unchanged, its target node in the target knowledge graph will be the same. Thus, regardless of the differences in the target code files uploaded by developers, as long as their position in the banking business line's process remains unchanged, the target node remains the same. By querying the target node corresponding to the target code file in the target knowledge graph, other adjacent nodes connected to the target node can be determined by following the directed edges connected to the node. These directed edges and adjacent nodes can be directly obtained through the graph network structure of the target knowledge graph after determining the target node's position. It should be noted that adjacent nodes are not necessarily the other nodes closest to the target node that are connected by only one directed edge. Adjacent nodes can be all nodes passed through in the process of connecting multiple consecutive directed edges, and these nodes all have a direct or indirect correlation with the target node.

[0059] S222. Determine the graph context information based on the directed edges and the adjacent nodes.

[0060] It is understandable that the subject information stored in these adjacent nodes is related to the target code file in the target node, and the directed edges store precisely this relationship. For example, code file A belongs to project B, which is developed for mobile banking. The recommended coding standard for mobile banking applications is C. Here, code file A, project B, mobile banking, and coding standard C can all be subjects in the target knowledge graph, and this subject information and the relationships between subjects can all serve as graph context information.

[0061] In the above implementation, the graph context information corresponding to the target code file is found by using nodes and directed edges in the knowledge graph, which provides basic support for determining the expected encoding type of the target code file and helps to improve the verification efficiency of the encoding type of the target code file.

[0062] In one alternative implementation, the target knowledge graph is determined in the following manner:

[0063] A1. Obtain all historical files within the target application scope, as well as the developer, banking business area, application project, and coding standard corresponding to each historical file.

[0064] Historical files can be code files uploaded by developers during the workflow of this banking business line in a historical period. The developers corresponding to the historical files are the developers mentioned above. The banking business area can be the business scope described in this banking business line. The application project can be the development project to which this banking business line belongs. The coding standard can be the coding standard corresponding to the historical files, which is the applicable standard in the workflow of this banking business line. This information related to the development process in this historical period can be directly obtained from the database of the development project. For example, information such as project name, business line and person in charge can be extracted from the project management database and configuration management database, as well as coding specification documents, architecture design documents, and project requirements specifications within the mobile banking system. Natural language processing technology can be used to identify entities and extract relationships, such as identifying the relationship between entities like "all front-end projects" and "must use XXX coding" from the documents. The acquired data can be structured or unstructured data, used to build a knowledge graph.

[0065] A2. Based on the historical files, the developers, the banking business areas, the application projects, and the coding standards, construct the entities in the target knowledge graph and determine the relationships between the entities.

[0066] Understandably, the target knowledge graph for this business line of the bank needs to be constructed based on the business development process that has been completed in the past. Among them, historical documents, developers, banking business areas, application projects, and coding standards can be regarded as entities in the target knowledge graph, and the relationships between these entities, such as inclusion and being included, and membership and belonging, can be regarded as the association relationships between these entities.

[0067] A3. Based on the entities and their relationships, determine the nodes and directed edges in the target knowledge graph.

[0068] The entities identified in the preceding steps are converted into nodes, and the relationships between the entities are converted into directed edges. For example, if X belongs to Y, then a directed edge X→Y is constructed.

[0069] A4. Construct the target knowledge graph based on each node and each directed edge.

[0070] Based on the determination of each node and the directed edges between nodes in the aforementioned steps, a target knowledge graph is constructed using a preset algorithm. Of course, the algorithm for constructing the target knowledge graph can be any knowledge graph construction algorithm in the relevant field, such as graph network algorithms and graph databases, and this application embodiment does not impose any limitation.

[0071] In the above implementation, a target knowledge graph is constructed by identifying the developers, banking business areas, application projects, and coding standards corresponding to historical files, as well as the relationships between them. This provides a strong basis for querying the expected coding type based on newly uploaded target code files by developers. Since the target knowledge graph contains information related to different banking business lines, determining the applicable coding type in the business area where the target code file is located through the target knowledge graph can improve the efficiency and accuracy of coding type verification.

[0072] In one optional implementation, the graph context information includes: developer information, banking business domain information, project information, and coding standard information of the target code file; the developer information may be related information of the developer of the target code file, such as the developer's name and employee number; the banking business domain information may be information about the business domain in which the development target of the target code file is located; the project information may be related information about the development project in which the target code file is located, such as the project name and project code; and the coding standard information may be the recommended coding type in the development process of the banking business line in which the target code file is located.

[0073] Accordingly, determining the current type of the target code file based on the target code file, the graph context information, and the file recognition model in S240 may include:

[0074] S241. Based on the target code file, determine the content feature vector, structural feature vector, and dependency feature vector of the target code file.

[0075] The content feature vector can be a vector representation of content features, which may include, but are not limited to, byte distribution features, special character features, and byte order marker features in the code file. Byte distribution features can quantify the frequency of different byte values ​​in the code file. For example, by reading the target code file as a complete binary byte stream, creating an array of 256 counters, iterating through each byte in the target code file, and accumulating the value (0-255) on a preset counter, and dividing the value of each counter by the total number of bytes in the target code file, the frequency of each byte value in the file is obtained, resulting in a 256-dimensional feature vector describing the probability distribution of the byte values ​​in the target code file. Special character features can be feature information obtained by scanning and recording predefined special characters, such as sensitive function names, email addresses, and data in specific encoding formats. A byte order mark can be a specific, short sequence of bytes located at the beginning of a file (especially a text file). For multi-byte encoding, it indicates the byte order of the file (e.g., whether it is big-endian or little-endian). Byte order mark features can be obtained by using signature verification methods to check fixed bytes in the file header. Different byte order mark features can be composed of different elements in a vector form.

[0076] Structural feature vectors can represent structured information in the target code file in vector form, such as, but not limited to, file extensions, file sizes, and directory locations. Dependency feature vectors can represent the encoding information of dependent files in the target code file in vector form. By traversing the target code file, this information is obtained, and the corresponding structural feature vectors and dependency feature vectors are constructed.

[0077] S242. Generate a graph feature vector based on the developer information, the banking business area information, the project information, and the coding standard information.

[0078] The graph feature vector can be a feature vector composed of context information obtained from the target knowledge graph, used as one of the inputs to the subsequent document recognition model. The conversion of context information into graph feature vectors can employ any vectorization method from related technologies; this application does not limit this approach.

[0079] S243. Combine the content feature vector, the structural feature vector, the dependency feature vector, and the graph feature vector into a fusion feature vector.

[0080] The fused feature vector can be obtained by fusing the content feature vector, structural feature vector, dependency feature vector, and graph feature vector obtained in the preceding steps. The fusion method can be weighted linear combination, element-wise combination, or splicing transformation, etc., and the embodiments of this application are not limited thereto.

[0081] S244. Input the fused feature vector into the file recognition model to determine the current type.

[0082] The fused feature vector is used as input to a pre-trained file recognition model, enabling the model to identify the target code file based on the information in the fused feature vector and determine the current encoding type of the target code file.

[0083] In the above implementation, the content features, structural features, dependency features, and graph context features of the target code file are obtained through the target knowledge graph and fused as the input of the file recognition model. This not only utilizes the target knowledge graph to consider contextual information, but also determines the current encoding type of the target code file from multi-dimensional information, further ensuring the accuracy and reliability of the current type determination.

[0084] In another optional implementation, the verification of the target code file based on the comparison result between the current type and the target type in step S250 may include:

[0085] S251. In response to the comparison result that the current type and the target type are different, determine whether the target code file involves sensitive user information according to the target knowledge graph, and locate the target developer corresponding to the target code file according to the target knowledge graph, and trigger the release of preset alarm information to the target developer.

[0086] Understandably, if the current type identified by the target code file is the same as the target type retrieved from the target knowledge graph, it indicates that the encoding type used by the developer is very suitable for the current business domain and the current banking business line. Therefore, subsequent debugging and deployment operations can be performed on the target code file. However, if the current type identified by the target code file is different from the target type retrieved from the target knowledge graph, it indicates that the encoding type used by the developer is not the recommended encoding type for the process of this business domain and the banking business line. In this case, it is necessary to further check whether the target code file contains sensitive user information. This sensitive user information can be personal information of users (such as names) or other information that cannot be erroneous in the process. While checking for the existence of sensitive user information, the developer or development team that uploaded the target code file is located through the nodes and directed edges in the target knowledge graph, and they are notified of the preset alarm information corresponding to the mismatch between the current type and the target type. The content of the preset alarm information can be pre-set by technical personnel in the relevant field, such as "The encoding type of the currently uploaded code file does not match the recommended encoding type, please verify," etc. This application embodiment does not limit this.

[0087] S252. In response to the target code file involving the user's sensitive information, the encoding type of the target code file is set according to preset compliance requirements.

[0088] It should be noted that the target knowledge graph not only reflects the complex real-world architecture of the bank's internal development system but also records the necessary compliance requirements. These compliance requirements can be mandatory requirements set for the development processes of the bank's business lines based on actual circumstances. For example, when sensitive user information is present and cannot be allowed to malfunction in the process, according to the compliance requirements recorded in the target knowledge graph, a certain predetermined encoding type must be used to ensure that the sensitive user information is free from garbled characters. Of course, these compliance requirements can be set by relevant technical personnel at the initial stage of the target knowledge graph's construction, and this application embodiment does not limit this. Naturally, the identification of sensitive user information can employ any algorithm from related technologies, such as semantic recognition algorithms or natural language recognition algorithms.

[0089] In the above implementation, by comparing and verifying the current type obtained by identifying the target code file with the target type obtained from querying the target knowledge graph, it is possible to further identify whether there is sensitive user information in the target code file, and adjust the encoding type of the target code file according to the compliance requirements in the target knowledge graph. This reduces the probability of errors in the banking business line and helps to improve the overall development efficiency.

[0090] Example 3

[0091] Figure 3 This is a schematic diagram of a code file verification device provided in Embodiment 3 of this application. Figure 3 As shown, the device 300 includes:

[0092] The graph model acquisition module 310 is used to acquire target code files within the target application scope in the bank, as well as a pre-built target knowledge graph and a pre-trained file recognition model.

[0093] The target type determination module 320 is used to determine the graph context information corresponding to the target code file and the target type corresponding to the banking business line to which the target code file belongs, based on the target code file and the target knowledge graph.

[0094] The current type determination module 330 is used to determine the current type of the target code file based on the target code file, the graph context information, and the file recognition model;

[0095] The file type verification module 340 is used to verify the target code file based on the comparison result between the current type and the target type.

[0096] In the technical solution of this application embodiment, based on the target code file and the target knowledge graph, the graph context information corresponding to the target code file and the target type corresponding to the banking business line to which the target code file belongs are determined. The expected encoding type of the target code file in the development environment is obtained through the knowledge graph. Based on the target code file, the graph context information, and the file recognition model, the current type of the target code file is determined. Using a pre-trained model to identify the current type can improve the speed of encoding type identification. Based on the comparison result between the current type and the target type, the target code file is verified. This can effectively perform timely verification before the code file is deployed and executed, reducing the possibility of abnormal problems. It can not only improve the efficiency of encoding type identification, but also ensure the accuracy of encoding type in the corresponding business scenario.

[0097] In one alternative implementation, the target type determination module 320 may include:

[0098] The context determination unit is used to query the graph context information from the target knowledge graph based on the target code file;

[0099] The target type determination unit is used to determine the target type corresponding to the banking business line to which the target code file belongs, based on the graph context information.

[0100] In one alternative implementation, the context determination unit may include:

[0101] The node and edge determination subunit is used to query the corresponding target node from the target knowledge graph according to the target code file, and obtain all directed edges and adjacent nodes related to the target node;

[0102] The context determination subunit is used to determine the graph context information based on the directed edges and the adjacent nodes.

[0103] In one alternative embodiment, the device 300 may further include a knowledge graph construction module, which may include:

[0104] The historical data acquisition unit is used to acquire all historical files within the scope of the target application, as well as the developer, banking business area, application project and coding standard corresponding to each historical file;

[0105] The entity relationship determination unit is used to construct entities in the target knowledge graph based on the historical files, the developers, the banking business areas, the application projects, and the coding standards, and to determine the relationships between the entities.

[0106] A node and edge construction unit is used to determine each node and each directed edge in the target knowledge graph based on each entity and each association relationship.

[0107] The knowledge graph construction unit is used to construct the target knowledge graph based on each of the nodes and each of the directed edges.

[0108] In one optional implementation, the graph context information includes: developer information, banking business domain information, project information, and coding standard information of the target code file;

[0109] The current type determination module 330 may include:

[0110] The feature vector determination unit is used to determine the content feature vector, structural feature vector, and dependency feature vector of the target code file based on the target code file.

[0111] The graph vector determination unit is used to generate graph feature vectors based on the developer information, the banking business field information, the project information, and the coding standard information.

[0112] A vector fusion unit is used to combine the content feature vector, the structural feature vector, the dependency feature vector, and the graph feature vector into a fused feature vector.

[0113] The encoding type determination unit is used to input the fused feature vector into the file recognition model to determine the current type.

[0114] In another alternative embodiment, the file type verification module 340 may include:

[0115] The verification and judgment unit is used to respond to the comparison result that the current type and the target type are different, determine whether the target code file involves sensitive user information according to the target knowledge graph, and locate the target developer corresponding to the target code file according to the target knowledge graph, and trigger the release of preset alarm information to the target developer;

[0116] The encoding compliance determination unit is used to set the encoding type of the target code file according to preset compliance requirements in response to the target code file involving the user's sensitive information.

[0117] The code file verification device provided in this application embodiment can execute the code file verification method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing each code file verification method.

[0118] Example 4

[0119] Figure 4 A schematic diagram of an electronic device 10, which can be used to implement embodiments of this application, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.

[0120] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory 12 or a random access memory 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the read-only memory 12 or loaded from storage unit 18 into the random access memory 13. The random access memory 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, read-only memory 12, and random access memory 13 are interconnected via a bus 14. An input / output interface 15 is also connected to the bus 14.

[0121] Multiple components in electronic device 10 are connected to input / output interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of monitors, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0122] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing units, graphics processing units, various special-purpose artificial intelligence computing chips, various processors running machine learning model algorithms, digital signal processors, and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as code file verification methods.

[0123] In some embodiments, the code file verification method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via read-only memory 12 and / or communication unit 19. When the computer program is loaded into random access memory 13 and executed by processor 11, one or more steps of the code file verification method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the code file verification method by any other suitable means (e.g., by means of firmware).

[0124] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays, application-specific integrated circuits (ASICs), application-specific standard products (ASICs), system-on-a-chip (SoCs), payload programmable logic devices (PLCs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0125] Computer programs used to implement the methods of this application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0126] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, optical fibers, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0127] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a monitor with a cathode ray tube or liquid crystal display) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0128] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0129] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product within the cloud computing service system to address the shortcomings of traditional physical hosts and virtual private servers, such as high management difficulty and weak business scalability.

[0130] This application also discloses a computer program product, which includes a computer program that, when executed by a processor, implements the code file verification method provided in any embodiment of this application. This program product and the code file verification methods disclosed in the embodiments of this application belong to the same inventive concept, and therefore will not be described in detail here.

[0131] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.

[0132] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A code file verification method characterized by, The method comprises the following steps: acquiring target code files in a target application range in a bank, and a pre-constructed target knowledge graph and a pre-trained file recognition model; determining graph context information corresponding to the target code files and a target type corresponding to a bank business line to which the target code files belong according to the target code files and the target knowledge graph; determining a current type of the target code files according to the target code files, the graph context information and the file recognition model; verifying the target code files according to a comparison result of the current type and the target type.

2. The method of claim 1, wherein, The method comprises the following steps: querying the graph context information from the target knowledge graph according to the target code files; determining the target type corresponding to the bank business line to which the target code files belong according to the graph context information.

3. The method of claim 2, wherein, The method comprises the following steps: querying a target node corresponding to the target code files from the target knowledge graph, and acquiring all directed edges and adjacent nodes related to the target node according to the target code files; determining the graph context information according to the directed edges and the adjacent nodes.

4. The method of claim 1, wherein, The target knowledge graph is determined by the following method: acquiring all historical files in the target application range, and developers, bank business fields, application projects and coding standards corresponding to the historical files; constructing entities in the target knowledge graph and determining the association relationships between the entities according to the historical files, the developers, the bank business fields, the application projects and the coding standards; determining nodes and directed edges in the target knowledge graph according to the entities and the association relationships; constructing the target knowledge graph according to the nodes and the directed edges.

5. The method of claim 1, wherein, The graph context information comprises developer information, bank business field information, project information and coding standard information of the target code files. The method comprises the following steps: determining content feature vectors, structure feature vectors and dependency feature vectors of the target code files according to the target code files; generating graph feature vectors according to the developer information, the bank business field information, the project information and the coding standard information; combining the content feature vectors, the structure feature vectors, the dependency feature vectors and the graph feature vectors into fusion feature vectors; inputting the fusion feature vectors into the file recognition model to determine the current type.

6. The method of claim 1, wherein, The method comprises the following steps: In response to the comparison result being different between the current type and the target type, it is determined whether the target code file involves user sensitive information according to the target knowledge graph, and a target developer corresponding to the target code file is located according to the target knowledge graph, and a preset alarm information of the target developer is triggered to be published; In response to the target code file involving the user sensitive information, an encoding type of the target code file is set according to a preset compliance requirement.

7. A code file verification apparatus characterized by comprising: Comprise: The graph model acquisition module is used for acquiring a target code file in a target application range of a bank, and a pre-constructed target knowledge graph and a pre-trained file recognition model; The target type determination module is used for determining graph context information corresponding to the target code file and a target type corresponding to a bank business line to which the target code file belongs according to the target code file and the target knowledge graph; The current type determination module is used for determining a current type of the target code file according to the target code file, the graph context information and the file recognition model; The file type verification module is used for verifying the target code file according to a comparison result of the current type and the target type.

8. An electronic device, comprising: The electronic device comprises: At least one processor; and The memory is in communication connection with the at least one processor; wherein The memory stores a computer program that can be executed 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 execute the file verification method in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions are used to enable the processor to execute the file verification method in any one of claims 1-6 when executed.

10. A computer program product, characterised in that, The computer program product comprises a computer program, and the computer program is executed by the processor to implement the file verification method according to any one of claims 1-6.