Sample cleaning method for AI or ML model

By cleaning samples on the training data set and building energy template analysis, combined with AI or ML models of 2-dimensional or 3-dimensional feature layers, the accuracy, efficiency and stability of antibacterial metal material detection in additive manufacturing is solved, and efficient and accurate quality detection of antibacterial metal medical materials is achieved.

CN120256970AInactive Publication Date: 2025-07-04THE FIRST AFFILIATED HOSPITAL OF FUJIAN MEDICAL UNIV
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510748598.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-07-04
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art lacks the accuracy, efficiency and applicability of defect detection of antibacterial metal materials in additive manufacturing, especially the inability to effectively distinguish functional pores from process defects, and the lack of real-time monitoring and dynamic adjustment capabilities, resulting in insufficient detection stability.

Method used

By cleaning the training data set, eliminating malicious samples, building an energy template to analyze the energy distribution of the training sequence set, improving the generalization ability and robustness of the model, and combining AI or ML models with 2-dimensional or 3-dimensional feature layers to process images, the quality detection of antibacterial metal medical materials can be achieved.

Benefits of technology

It improves the accuracy and efficiency of additive manufacturing defect detection, can effectively distinguish functional pores from process defects, provides real-time feedback and dynamic adjustment, and improves the stability of detection and the robustness of quality detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256970A_ABST
    Figure CN120256970A_ABST
Patent Text Reader

Abstract

The invention provides a sample cleaning method for an AI or ML model, belongs to the field of artificial intelligence, and is used for effectively cleaning training samples so that the training samples can be trained to obtain a model with better generalization ability and robustness, and thus the robustness of quality detection can be improved. The method comprises the following steps: acquiring a collected training data set by the electronic equipment, wherein the training data set is used for training an initial AI or ML model; the electronic equipment encodes samples in the training data set to obtain an encoded training sequence set, and the training sequence set comprises elements obtained by encoding the samples; and the electronic equipment determines whether the training data set contains a to-be-determined malicious sample by analyzing the energy of the elements in the coded training sequence set, and if so, rejects the malicious sample from the training data set under the condition that the to-be-determined malicious sample is determined as the malicious sample.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and particularly to a method for cleaning samples of an AI or ML model. Background Art

[0002] Additive manufacturing technology has been widely used in the manufacturing of medical implants and devices due to its high design freedom, personalized customization ability, and the advantage of forming complex structures. In recent years, antibacterial metal materials (such as alloys or coating materials containing silver, copper, and zinc) have become a research hotspot in the field of medical implants due to their characteristics of inhibiting the formation of bacterial biofilms and reducing the risk of postoperative infections. However, during the additive manufacturing process, internal defects are prone to occur due to process parameter fluctuations (such as laser power, scanning speed, powder layer thickness, etc.), including pores, microcracks, unfused regions, and residual stress concentration. These defects will not only significantly reduce the mechanical properties of the material (such as fatigue strength, ductility), but may also damage the uniformity of the antibacterial coating on the material surface, resulting in a decrease in local antibacterial efficacy, and further leading to implant failure or infection complications.

[0003] Currently, the defect detection of additive manufacturing parts mainly relies on non-destructive testing techniques, such as X-ray computed tomography (CT), ultrasonic testing, optical microscope observation, etc. However, these methods have the following problems: insufficient accuracy: micron-sized pores or subsurface cracks are easily interfered by noise, and traditional algorithms have low recognition sensitivity for low-contrast defects; low efficiency: high-resolution CT scanning takes up to several hours, and professional personnel are required for image analysis, which is difficult to meet the needs of large-scale production; limited applicability: the porous structure design of antibacterial metal materials (such as the bionic pores of bone implants) is easily misjudged as a defect, and the existing technology lacks the ability to intelligently distinguish between "functional pores" and "process defects"; lack of dynamic monitoring: it is unable to provide real-time feedback of defect data during the manufacturing process to adjust process parameters, resulting in high defect repair costs.

[0004] In recent years, some studies have attempted to apply machine learning (such as support vector machines, random forests) to additive manufacturing defect analysis, but the limitations of relying on manual feature extraction lead to insufficient generalization ability. Although a few methods based on convolutional neural networks (CNNs) have made breakthroughs in automatic feature learning, their stability is not enough. Therefore, how to improve the stability of their detection is the current research problem. Summary of the Invention

[0005] The embodiments of this application provide a method for cleaning samples of an AI or ML model, which can effectively clean training samples to enable the training of a model with better generalization ability and robustness, thereby improving the robustness of quality detection.

[0006] To achieve the above object, this application adopts the following technical solutions: In a first aspect, a method for cleaning samples of an AI or ML model is provided, which is applied to an electronic device. The method includes: the electronic device obtains a collected training data set, which is used for training an initial AI or ML model; the electronic device encodes the samples in the training data set to obtain an encoded training sequence set, and the training sequence set includes elements obtained by encoding the samples; the electronic device determines whether the training data set contains a malicious sample to be determined by analyzing the energy of the elements in the encoded training sequence set. If so, when the malicious sample to be determined is determined to be a malicious sample, the malicious sample is removed from the training data set.

[0007] Optionally, the electronic device encodes the training data set to obtain an encoded training sequence set, including: the electronic device encodes each sample in the training data set to obtain a corresponding bit sequence, and a total of multiple bit sequences are obtained correspondingly. A sample in the training data set includes data and a label corresponding to the data; the training sequence set includes multiple bit sequences, and at least two bits in at least one bit sequence among the multiple bit sequences are an element.

[0008] Optionally, the electronic device determines whether the training data set contains a malicious sample to be determined by analyzing the energy of the elements in the encoded training sequence set, including: the electronic device splices K consecutive bit sequences among the multiple bit sequences into a continuous bit sequence in the order of encoding, where K is an integer greater than 3; the electronic device determines whether the K samples corresponding to the continuous bit sequence contain a malicious sample to be determined by analyzing the matching degree between the energy distribution of the elements in the continuous bit sequence and an energy template.

[0009] Optionally, the electronic device determines whether the K samples corresponding to the continuous bit sequence contain the malicious sample to be determined by analyzing the matching degree between the energy distribution of the elements in the continuous bit sequence and the energy template, including: the electronic device takes every two consecutive bits in the continuous bit sequence as a corresponding element, with a total of P elements, where P is an integer greater than K; the electronic device determines the energy level corresponding to each of the P elements, with a total of P energy levels, and the energy level of the i-th element among the P elements is related to the value combination of the 2 bits included in the i-th element, where i is any integer from 1 to P; the electronic device determines whether there is an energy distribution indicated by the energy template in the preset energy template that matches the energy distribution of the P energy levels. Among them, if there is an energy distribution indicated by the energy template that matches the energy distribution of the P energy levels, it means that the K samples do not contain the malicious sample to be determined, otherwise, it means that the K samples contain the malicious sample to be determined; among them, the value of the 2 bits included in the i-th element being 00 corresponds to the first energy level, the value of the 2 bits included in the i-th element being 01 corresponds to the second energy level, the value of the 2 bits included in the i-th element being 10 corresponds to the third energy level, and the value of the 2 bits included in the i-th element being 11 corresponds to the fourth energy level.

[0010] Optionally, the electronic device determines whether the training data set contains the malicious sample to be determined by analyzing the energy of the elements in the encoded training sequence set, including: the electronic device constructs a bit matrix with K consecutive bit sequences in multiple bit sequences in the order of encoding, where K is an integer greater than 3; K represents the number of rows of the bit matrix, and L represents the number of columns of the bit matrix, where L is the number of bits included in the longest bit sequence among the K bit sequences; the electronic device determines whether the K samples corresponding to the bit matrix contain the malicious sample to be determined by analyzing the matching degree between the energy distribution of the elements in the bit matrix and the energy template in the column direction.

[0011] Optionally, the electronic device determines whether the K samples corresponding to the bit matrix contain the malicious sample to be determined by analyzing the matching degree between the energy distribution of the elements in the bit matrix and the energy template in the column direction, including: the electronic device takes every two consecutive bits in each column of the bit matrix as a corresponding element, with a total of Q elements, where Q is an integer greater than K; the electronic device determines the energy levels corresponding to the Q elements respectively, with a total of Q energy levels, and the energy level of the j-th element among the Q elements is related to the value combination of the 2 bits included in the j-th element, where j is any integer from 1 to Q; the electronic device determines whether there is an energy distribution indicated by the energy template in the preset energy template that matches the energy distribution of the Q energy levels. Among them, if there is an energy distribution indicated by the energy template that matches the energy distribution of the Q energy levels, it means that the K samples do not contain the malicious sample to be determined, otherwise, it means that the K samples contain the malicious sample to be determined; among them, the value of the 2 bits included in the j-th element being 00 corresponds to the first energy level, the value of the 2 bits included in the j-th element being 01 corresponds to the second energy level, the value of the 2 bits included in the j-th element being 10 corresponds to the third energy level, and the value of the 2 bits included in the j-th element being 11 corresponds to the fourth energy level.

[0012] Optionally, when the malicious sample to be determined is determined to be a non-malicious sample, the method further includes: the electronic device determines the energy distribution of the elements corresponding to the K samples as a new energy template.

[0013] Based on the method described in the first aspect, by defining different energies for different data, when the data samples are large enough, the energies corresponding to the data in the normal data sample set satisfy a certain distribution. Based on this, when the electronic device obtains the collected training data set, by encoding the samples in the training data set, the encoded training sequence set can be obtained, and the energy of the elements in the encoded training sequence set, such as the energy distribution, can be analyzed to determine whether the training data set contains the malicious sample to be determined, so that the malicious data can be removed. Compared with the method of model analysis, the above method requires less overhead, that is, the malicious data in the data samples is removed by a lightweight method, improving the training effect of the model.

[0014] Optionally, the training data set from which the malicious samples have been removed is used to train the initial AI or ML model to obtain the trained initial AI or ML model. The method further includes: The electronic device acquires an image taken of an antibacterial metal medical material, where the antibacterial metal medical material is a material based on additive manufacturing; The electronic device determines the proportion of the pattern of the antibacterial metal medical material in the image that occupies in the image; The electronic device constructs a feature layer corresponding to the structure and proportion in the initial AI or ML model to obtain a target AI or ML model; The electronic device processes the image through the target AI or ML model to obtain a processing result, and the processing result is used to indicate whether there is a quality defect in the antibacterial coating of the antibacterial metal medical material. The image is an image taken at a preset resolution.

[0015] Optionally, the electronic device constructs a feature layer corresponding to the structure and proportion in the initial AI or ML model to obtain a target AI or ML model, including: If the proportion is greater than or equal to a preset threshold, the electronic device constructs a feature layer with a 2D structure in the initial AI or ML model to obtain a target AI or ML model; Or, if the proportion is less than the preset threshold, the electronic device constructs a feature layer with a 3D structure in the initial AI or ML model to obtain a target AI or ML model.

[0016] Optionally, the initial AI or ML model includes a first feature layer, a second feature layer, and a third feature layer, and also includes connectors between the first feature layer, the second feature layer, and the third feature layer; The electronic device constructs a feature layer with a 2D structure in the initial AI or ML model to obtain a target AI or ML model, including: The electronic device only activates the connector between the first feature layer and the second feature layer in the initial AI or ML model to obtain a target AI or ML model, and the processing of the feature sequence by the feature layer of the target AI or ML model is from the first feature layer to the second feature layer; Or, the electronic device constructs a feature layer with a 3D structure in the initial AI or ML model to obtain a target AI or ML model, including: The electronic device activates the connectors between the first feature layer, the second feature layer, and the third feature layer in the initial AI or ML model to obtain a target AI or ML model, and the processing of the feature sequence by the feature layer of the target AI or ML model is from the first feature layer to the second feature layer, and from the first feature layer to the third feature layer and then from the third feature layer to the second feature layer.

[0017] It can also be known from the method described in the first aspect that when obtaining an image of an antibacterial metal medical material, the electronic device determines the proportion of the pattern of the antibacterial metal medical material in the image, so as to construct a feature layer corresponding to the structure and proportion in the initial AI or ML model, and obtain a target AI or ML model. At this time, the structure of the feature layer in the target AI or ML model corresponds to the proportion of the pattern of the antibacterial metal medical material in the image, that is, it means that under the condition of fixed image resolution, the structure of the feature layer in the target AI or ML model matches the pattern accuracy of the antibacterial metal medical material. Therefore, when the electronic device processes the image through the target AI or ML model, the processing result indicating whether there is a quality defect in the antibacterial coating of the antibacterial metal medical material can be more robust.

[0018] In a second aspect, an additive manufacturing method for an antibacterial metal medical material is provided, including: mixing a matrix metal powder and an antibacterial metal powder according to a preset ratio to obtain a composite metal powder; designing a three-dimensional model of the antibacterial metal medical material with a corresponding structure and a porous structure according to the anatomical structure of the target bone defect area; using the composite metal powder as a raw material, and layer-by-layer printing and forming the three-dimensional model through selective laser melting to obtain an initial antibacterial metal medical material; performing heat treatment and surface polishing on the initial antibacterial metal medical material to obtain the antibacterial metal medical material, wherein, in M images, if the difference in the features extracted by the AI or ML model in the same area of different images is greater than a threshold value, the features extracted by the AI or ML model in the same area of different images are jointly processed.

[0019] Optionally, the antibacterial metal medical material is an antibacterial metal bone scaffold.

[0020] Optionally, the matrix metal powder is one of titanium alloy (Ti6Al4V), cobalt-chromium alloy (CoCrMo), or medical stainless steel (316L); the antibacterial metal powder is at least one of silver (Ag), copper (Cu), zinc (Zn), or gallium (Ga); the temperature of the heat treatment is 600-900 °C, and the time is 1-3 hours; the porosity of the porous structure is 50%-80%, and the pore diameter is 200-600 μm; the parameters of the selective laser melting process include: laser power of 150-300 W, scanning speed of 800-1500 mm / s, and layer thickness of 20-50 μm.

[0021] In a third aspect, an electronic device is provided, including a module for executing the method described in the first aspect above.

[0022] In a fourth aspect, a computer-readable storage medium is provided, including: a computer program or instruction; when the computer program or instruction runs on a computer, the computer is caused to execute the method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a flowchart of a sample cleaning method for an AI or ML model provided by an embodiment of the present application; Figure 2 It is an application flowchart of a sample cleaning method for an AI or ML model provided by an embodiment of the present application; Figure 3 In (a) is a schematic diagram of an application scenario of an embodiment of the present application Figure 1 ; Figure 3 In (b) is a schematic diagram of an application scenario of an embodiment of the present application Figure 2 ; Figure 4 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0024] Next, the technical solutions in the present application will be described in conjunction with the accompanying drawings.

[0025] The present application will present various aspects, embodiments or features around a system that may include multiple devices, components, modules, etc. It should be understood and clear that each system may include additional devices, components, modules, etc., and / or may not include all the devices, components, modules, etc. discussed in conjunction with the accompanying drawings. In addition, combinations of these solutions can also be used.

[0026] In addition, in the embodiments of the present application, words such as "exemplary", "for example", etc. are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" in the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of the word "exemplary" is intended to present concepts in a specific manner.

[0027] In the embodiments of the present application, "of", "corresponding", and "corresponding" can sometimes be used interchangeably. It should be noted that when not emphasizing their differences, the meanings they express are matched. In addition, " / " mentioned in the present application can be used to represent the relationship of "or".

[0028] The network architecture and service scenarios described in the embodiments of the present application are for more clearly explaining the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those of ordinary skill in the art know that with the evolution of the network architecture and the emergence of new service scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.

[0029] Exemplarily,Figure 1 Flow diagram of the sample cleaning method for the AI or ML model provided by the embodiment of the present application. This method can be applied to an electronic device.

[0030] As Figure 1 shown, the process of the sample cleaning method for the AI or ML model is as follows: S101, the electronic device obtains the collected training data set.

[0031] The training data set is used for the training of the initial artificial intelligence (AI) or machine learning (ML) model. The training data set can contain multiple samples. For example, a training data set can contain 500 - 1000 samples. Each sample can contain a piece of data (such as an image) and the label corresponding to this data (such as the true result of whether there is a quality defect in the antibacterial coating of the antibacterial metal medical material in the image). This data is usually used for the processing of the initial AI or ML model to obtain a result, and this label is used to calculate the loss between the label and the result, so as to perform regression on the initial AI or ML model, that is, the process of training the initial AI or ML model. The process of training the initial AI or ML model includes training the feature layer with a 2D structure and the feature layer with a 3D structure in the distribution of epochs (the specific structure can refer to the relevant introduction below) until both converge.

[0032] The electronic device can obtain the training data set from the data collection entity. For example, the electronic device can subscribe to relevant services from the data collection entity through an interface, and this service is the service that needs to obtain the corresponding training data set. In this way, the data collection entity can respond to the subscription of the data collection entity, collect the training data set and return it to the electronic device.

[0033] S102, the electronic device encodes the samples in the training data set to obtain an encoded training sequence set.

[0034] The training sequence set includes the elements obtained by encoding the samples.

[0035] The encoding method is related to the type of samples in the training sequence set. For example, if the sample is text, the encoding method can be UTF - 8 encoding. Another example is that if the sample is structured data, the encoding method can be field - by - field encoding, such as encoding floating - point numbers into the IEEE754 format. Another example is that if the sample is a picture, the encoding method can be entropy encoding.

[0036] For example, an electronic device can encode each sample in a training dataset at the granularity of samples to obtain a corresponding bit sequence, and a plurality of bit sequences are obtained correspondingly, that is, multiple samples correspond to multiple bit sequences one by one, and each bit sequence is a binary representation of the data and labels of a sample. At this time, the training sequence set can also include multiple bit sequences, and the electronic device can define elements at the granularity of bits. For example, at least two bits (or at least two consecutive bits) in at least one of the multiple bit sequences are used as one element. Taking a bit sequence of 010111 as an example, if three consecutive bits are set as one element, then 010 is the first element, 101 is the second element, 011 is the third element, and 111 is the fourth element.

[0037] S103. The electronic device determines whether the training dataset contains a malicious sample to be determined by analyzing the energy of the elements in the encoded training sequence set. If so, when the malicious sample to be determined is determined to be a malicious sample, the malicious sample is removed from the training dataset.

[0038] The electronic device can splice multiple bit sequences into a continuous bit sequence or a matrix to analyze the energy distribution of the elements therein, which will be introduced separately below.

[0039] Method 1: The electronic device can splice consecutive K bit sequences in multiple bit sequences into a consecutive bit sequence in the order of encoding, where K is an integer greater than 3. For example, K = 30 or 40 to ensure that there are enough data samples. The electronic device determines whether the K samples corresponding to the consecutive bit sequence contain the malicious sample to be determined by analyzing the matching degree between the energy distribution of the elements in the consecutive bit sequence and the energy template. Specifically, the electronic device can take every two consecutive bits in the consecutive bit sequence as a corresponding element, with a total of P elements, where P is an integer greater than K. The electronic device determines the energy level corresponding to each of the P elements, a total of P energy levels. Among them, the number of energy levels represented by the P energy levels includes repeated energy levels. For example, still taking 010111 as an example, setting every 2 consecutive bits as an element, 01 is the first element, corresponding to the second energy level, 10 is the second element, corresponding to the third energy level, 01 is the third element, corresponding to the second energy level, 11 is the fourth element, corresponding to the fourth energy level, and the last 11 is the fifth element, corresponding to the fourth energy level, for a total of 5 energy levels. The energy level of the i-th element among the P elements is related to the value combination of the 2 bits included in the i-th element, where i is any integer from 1 to P. For example, when the value of the 2 bits included in the i-th element is 00, it corresponds to the first energy level; when the value of the 2 bits included in the i-th element is 01, it corresponds to the second energy level; when the value of the 2 bits included in the i-th element is 10, it corresponds to the third energy level; when the value of the 2 bits included in the i-th element is 11, it corresponds to the fourth energy level. Thus, the electronic device determines whether there is an energy distribution indicated by the energy template in the preset energy template that matches the energy distribution of the P energy levels. Among them, if there is an energy distribution indicated by the energy template that matches the energy distribution of the P energy levels, it means that the K samples do not contain the malicious sample to be determined; otherwise, it means that the K samples contain the malicious sample to be determined. The energy distribution of the P energy levels can specifically be the proportion of the number of each energy level among the P energy levels in the P energy levels. In this case, if the difference between the proportion of the number of each energy level among the P energy levels and the proportion of this energy level in the energy distribution indicated by the energy template is within the allowable range, such as the allowable range is 2.5% or 3%, and the difference between 25% and 26% is 1%, which is within the allowable range, then it is considered a match; otherwise, it is not a match.

[0040] Method 2: The electronic device constructs consecutive K bit sequences in multiple bit sequences into one in the order of encoding a bit matrix, where K is an integer greater than 3; K represents the number of rows of the bit matrix, L represents the number of columns of the bit matrix, and L is the number of bits included in the longest bit sequence among the K bit sequences. That is, for the bit sequences with lengths less than L among the K bit sequences, they can be padded to L bits. The electronic device determines whether the K samples corresponding to the bit matrix contain the malicious sample to be determined by analyzing the matching degree between the energy distribution of the elements in the bit matrix and the energy template in the column direction. The electronic device takes every two consecutive bits in each column of the bit matrix as a corresponding element, with a total of Q elements, where Q is an integer greater than K. The principle is similar to the above Method 1 and will not be elaborated here; the electronic device determines the energy level corresponding to each of the Q elements, with a total of Q energy levels. The energy level of the jth element among the Q elements is related to the value combination of the 2 bits included in the jth element, where j is any integer from 1 to Q. That is, when the value of the 2 bits included in the jth element is 00, it corresponds to the first energy level; when the value of the 2 bits included in the jth element is 01, it corresponds to the second energy level; when the value of the 2 bits included in the jth element is 10, it corresponds to the third energy level; when the value of the 2 bits included in the jth element is 11, it corresponds to the fourth energy level. The electronic device determines whether there is an energy distribution indicated by the energy template in the preset energy template that matches the energy distribution of the Q energy levels. Among them, if there is an energy distribution indicated by the energy template that matches the energy distribution of the Q energy levels, it means that the K samples do not contain the malicious sample to be determined; otherwise, it means that the K samples contain the malicious sample to be determined. The principle is also similar to the above and will not be elaborated here.

[0041] It should be understood that the above Method 2 is only an example. For example, the matrix can also be subjected to singular value decomposition, and then every two / three bits in each column of the m×n diagonal matrix obtained by the singular value decomposition are used as an element. Since the singular value decomposition itself can deconstruct the characteristics of the matrix, the diagonal matrix can analyze the characteristics of the bit sequence from a more essential dimension.

[0042] It should also be understood that the above method is only an example. For example, three consecutive bits can also be used as an element. In this case, there are a total of 8 energy levels, that is, from energy level 1 to energy level 8. In the embodiments of the present application, it is preferably that two or three consecutive bits are used as an element. In this way, the change in the composition of the bits can be reflected by the energy level, and the requirements for the energy template are relatively lower, that is, the number of energy templates is not too large.

[0043] For a malicious sample to be determined, the electronic device can output a prompt for manual determination of whether it is a malicious sample. In the case where the malicious sample to be determined is determined to be a malicious sample, the malicious sample is removed from the training data set. Otherwise, in the case where the malicious sample to be determined is determined to be a non-malicious sample, the electronic device determines the energy distribution of the elements corresponding to the K samples as a new energy template to update the template. With the continuous update of the template, subsequent analysis can be more accurate.

[0044] Finally, the electronic device can send the training data set after removing malicious data to the model training functional entity for initial AI or ML model training.

[0045] It can be seen that by defining different energies for different data, when the data samples are large enough, the energies corresponding to the data in the normal data sample set satisfy a certain distribution. Based on this, when the electronic device obtains the collected training data set, by encoding the samples in the training data set, the encoded training sequence set can be obtained, and the energy of the elements in the encoded training sequence set, such as the energy distribution, can be analyzed to determine whether the training data set contains the malicious sample to be determined, so that the malicious data can be removed. Compared with the method of model analysis, the above method requires less overhead, that is, the malicious data in the data samples is removed by a lightweight method to improve the training effect of the model.

[0046] The training data set after removing the malicious sample is used to train the initial AI or ML model to obtain the trained initial AI or ML model. At this time, the application process of the initial AI or ML model is as follows Figure 2 shown: S201, the electronic device obtains an image taken of the antibacterial metal medical material.

[0047] The antibacterial metal medical material is a material based on additive manufacturing.

[0048] The antibacterial metal medical material is a material based on additive manufacturing. The application scenarios of the antibacterial metal medical material in this application embodiment are not limited. For example, it can be a material for joints, that is, an orthopedic implant, such as a 3D printed porous titanium alloy bone scaffold with Cu / Ag added to reduce postoperative infection, or a dental material, such as a cobalt-chromium alloy denture bracket containing Zn to inhibit oral pathogenic bacteria, or a replacement material for other parts.

[0049] Antibacterial metals can be manufactured from base metal materials such as titanium and its alloys (Ti / Ti6Al4V), which have excellent biocompatibility and are widely used in orthopedic implants. Stainless steel (316L), with low cost and good mechanical properties, is commonly used in surgical instruments. Cobalt-chromium alloy (CoCrMo), with strong wear resistance, is used in joint replacements. Among them, antibacterial elements need to be added, such as silver (Ag), which has broad-spectrum antibacterial properties and destroys bacterial cell membranes through ion release; copper (Cu), which generates reactive oxygen species (ROS) to kill bacteria and promotes osteogenesis; zinc (Zn), which inhibits biofilm formation and has both antibacterial and osteogenic promotion effects; gallium (Ga), which interferes with iron metabolism and inhibits drug-resistant bacteria (such as MRSA). During the manufacturing process, composite / coating technologies are also involved, such as enhancing antibacterial properties through nanoparticle (Ag / Cu NPs) composite or surface functionalization, and preparing antibacterial coatings through laser cladding, plasma spraying, etc.

[0050] Additive manufacturing processes mainly include: Selective laser melting (SLM), which has high precision and is suitable for complex-structured titanium alloy implants. Electron beam melting (EBM), which reduces oxidation in a vacuum environment and is suitable for medical titanium components. Directed energy deposition (DED), which is used to repair or add antibacterial coatings and is not limited in the embodiments of this application.

[0051] For ease of understanding, in the embodiments of this application, antibacterial metal medical materials are taken as orthopedic implants, such as metal bones, for introduction.

[0052] The images are images taken at a preset resolution, that is, the image capture device can capture different antibacterial metal medical materials at a fixed resolution and at a fixed shooting distance, obtaining different images. Since the sizes of different antibacterial metal medical materials are different, the areas they occupy in the images are also different. For example, as Figure 3 shown, where the antibacterial metal medical material in image (a) is the mandibular part material, and the antibacterial metal medical material in image (b) is the cranial part material. The area occupied by the antibacterial metal medical in image (a) is smaller than the area occupied by the antibacterial metal medical in image (b).

[0053] S202, the electronic device determines the proportion of the pattern of the antibacterial metal medical material in the image that the pattern occupies in the image.

[0054] The electronic device can perform grayscale or binarization processing on the edge of the pattern of the antibacterial metal medical material in the image, so as to calculate the size of the pattern of the antibacterial metal medical material in the image according to the edge, and further determine the proportion of the pattern of the antibacterial metal medical material in the image that the pattern occupies in the image according to the size.

[0055] S203, the electronic device constructs a feature layer corresponding to the structure and proportion in the initial AI or ML model to obtain the target AI or ML model.

[0056] If the proportion of the pattern of the antibacterial metal medical material in the image is greater than or equal to a preset threshold, the electronic device constructs a feature layer with a 2D structure in the initial AI or ML model to obtain a target AI or ML model. For example, the initial AI or ML model includes a first feature layer, a second feature layer, and a third feature layer, and also includes connectors between the first feature layer, the second feature layer, and the third feature layer. Any one of the first feature layer, the second feature layer, and the third feature layer contains a trained neural network. At this time, the electronic device only activates the connector between the first feature layer and the second feature layer in the initial AI or ML model to obtain a target AI or ML model. At this time, the processing of the feature sequence by the feature layer of the target AI or ML model is from the first feature layer to the second feature layer. The feature sequence is obtained by convolving the image with the convolutional layer of the target AI or ML model.

[0057] Alternatively, if the proportion of the pattern of the antibacterial metal medical material in the image is less than the preset threshold, the electronic device constructs a feature layer with a 3D structure in the initial AI or ML model to obtain a target AI or ML model. For example, the electronic device activates the connectors between the first feature layer, the second feature layer, and the third feature layer in the initial AI or ML model to obtain a target AI or ML model. At this time, the processing of the feature sequence by the feature layer of the target AI or ML model is from the first feature layer to the second feature layer, and from the first feature layer to the third feature layer and then from the third feature layer to the second feature layer. The feature sequence is obtained by convolving the image with the convolutional layer of the target AI or ML model.

[0058] It should be understood that in the construction of the first feature layer, the second feature layer, and the third feature layer, the following strategy can be adopted: the neural networks of the first feature layer and the second feature layer are relatively dense neural networks, and the neural network of the third feature layer is a relatively sparse neural network. For example, the number of neuron connections in the neural network of the third feature layer can be 1 / 3 to 1 / 2 of the number of neuron connections in the neural network of the second feature layer, so that the processing ability of the third feature layer is lower than that of the first feature layer and the second feature layer, so that the feature layer with a 3D structure has a relatively good robust structure, that is, the feature processed by the third feature layer and then input to the second feature layer will not affect the processing of the feature input by the third feature layer from the first feature layer.

[0059] In summary, in the case of obtaining an image of an antibacterial metal medical material, the electronic device determines the proportion of the pattern of the antibacterial metal medical material in the image, so as to construct a feature layer corresponding to the structure and proportion in the initial AI or ML model, and obtain the target AI or ML model. At this time, the structure of the feature layer in the target AI or ML model corresponds to the proportion of the pattern of the antibacterial metal medical material in the image, that is, it means that under the condition of fixed image resolution, the structure of the feature layer in the target AI or ML model matches the pattern accuracy of the antibacterial metal medical material. Therefore, when the electronic device processes the image through the target AI or ML model, the processing result indicating whether there is a quality defect in the antibacterial coating of the antibacterial metal medical material can be more robust.

[0060] S204, the electronic device processes the image through the target AI or ML model to obtain a processing result.

[0061] The processing result is used to indicate whether there is a quality defect in the antibacterial coating of the antibacterial metal medical material.

[0062] The embodiment of the present application also provides an additive manufacturing method for an antibacterial metal medical material. The process of this method includes: 1) Mix the matrix metal powder and the antibacterial metal powder according to a preset ratio to obtain a composite metal powder; 2) According to the anatomical structure of the target bone defect area, design a three-dimensional model of the antibacterial metal medical material with a corresponding structure and a porous structure; 3) Using the composite metal powder as the raw material, layer-by-layer print and form the three-dimensional model through selective laser melting to obtain an initial antibacterial metal medical material; 4) Perform heat treatment and surface polishing on the initial antibacterial metal medical material to obtain the antibacterial metal medical material.

[0063] Optionally, the antibacterial metal medical material is an antibacterial metal gold bone scaffold.

[0064] Optionally, the matrix metal powder is one of titanium alloy (Ti6Al4V), cobalt-chromium alloy (CoCrMo), or medical stainless steel (316L); the antibacterial metal powder is at least one of silver (Ag), copper (Cu), zinc (Zn), or gallium (Ga); the temperature of the heat treatment is 600-900°C, and the time is 1-3 hours; the porosity of the porous structure is 50%-80%, and the pore diameter is 200-600 μm; the parameters of the selective laser melting process include: the laser power is 150-300 W, the scanning speed is 800-1500 mm / s, and the layer thickness is 20-50 μm.

[0065] Optionally, the mass proportion of the antibacterial metal powder is 0.5% - 5%, and the particle size of the antibacterial metal powder is 10 - 50 μm, with the particle size difference from the matrix metal powder not exceeding 20%.

[0066] Optionally, the selective laser melting process is carried out in an inert gas protection environment with an oxygen content lower than 0.1%; the inert gas is argon or nitrogen.

[0067] Surface polishing includes chemical polishing and electrolytic polishing, making the surface roughness (Ra) of the gold bone scaffold lower than 1.0 μm.

[0068] Figure 4 This is a schematic structural diagram of the electronic device provided by the embodiment of the present application. Exemplarily, the electronic device can be a terminal device, or a chip (system) or other components or assemblies that can be set in the terminal device. As Figure 4 shown, the electronic device 400 may include a processor 401. Optionally, the electronic device 400 may further include a memory 402 and / or a transceiver 403. Among them, the processor 401 is coupled to the memory 402 and the transceiver 403, such as being connected through a communication bus. In addition, the electronic device 400 may also be a chip, such as including a processor 401. At this time, the transceiver may be the input / output interface of the chip.

[0069] Next, in combination with Figure 4 each component of the electronic device 400, a specific introduction is made: Among them, the processor 401 is the control center of the electronic device 400, which can be a single processor or a collective term for multiple processing elements. For example, the processor 401 is one or more central processing units (CPUs), or can be an application specific integrated circuit (ASIC), or an integrated circuit configured to implement the embodiments of the present application, such as: one or more digital signal processors (DSPs), or, one or more field programmable gate arrays (FPGAs).

[0070] Optionally, the processor 401 can execute various functions of the electronic device 400 by running or executing software programs stored in the memory 402 and calling scientific data stored in the memory 402, such as executing the Figure 1 or Figure 2 methods shown.

[0071] In a specific implementation, as an example, the processor 401 may include one or more CPUs, such as Figure 4 the CPU0 and CPU1 shown in

[0072] In a specific implementation, as an example, the electronic device 400 may also include multiple processors. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The processors here may refer to one or more devices, circuits, and / or processing cores for processing scientific data (such as computer programs or instructions).

[0073] Among them, the memory 402 is used to store the software program for executing the solution of this application and is controlled by the processor 401 for execution. The specific implementation manner may refer to the above method embodiments and will not be elaborated here.

[0074] Optionally, the memory 402 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic storage media such as magnetic disk storage, or any other medium that can be used to carry or store the desired program code in the form of instructions or scientific data structures and can be accessed by a computer, but is not limited thereto. The memory 402 may be integrated with the processor 401 or exist independently and be coupled to the processor 401 through the interface circuit ( Figure 4 not shown in

[0075] The transceiver 403 is used for communication with other electronic devices. For example, if the electronic device 400 is a terminal device, the transceiver 403 may be used for communication with a network device or with another terminal device. Another example is that if the electronic device 400 is a network device, the transceiver 403 may be used for communication with a terminal device or with another network device.

[0076] Optionally, the transceiver 403 may include a receiver and a transmitter ( Figure 4(not shown separately). Among them, the receiver is used to implement the receiving function, and the transmitter is used to implement the transmitting function.

[0077] Optionally, the transceiver 403 can be integrated with the processor 401 or exist independently, and is coupled to the processor 401 through the interface circuit of the electronic device 400 ( Figure 4 (not shown in the figure), and the embodiments of the present application do not make specific limitations on this.

[0078] It can be understood that Figure 4 the structure of the electronic device 400 shown in the figure does not constitute a limitation on the electronic device. The actual electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0079] In addition, the technical effects of the electronic device 400 can refer to the technical effects of the method described in the above method embodiments, and will not be elaborated here.

[0080] It should be understood that the processor in the embodiments of the present application may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0081] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of random access memory (RAM) are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0082] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware, or any combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer program or instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer program or instructions can be transmitted from one website, computer, server, or scientific data center to another website, computer, server, or scientific data center by wired (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a scientific data storage device such as a server or a scientific data center that contains one or more collections of available media. The available media can be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as DVDs), or semiconductor media. The semiconductor media can be a solid-state drive.

[0083] It should be understood that the term "and / or" in this document is merely a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Here, A and B can be singular or plural. Additionally, the character " / " in this document generally represents an "or" relationship between the associated objects before and after, but it may also represent an "and / or" relationship, which can be understood specifically by referring to the context.

[0084] In this application, "at least one" means one or more, and "a plurality" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c can be single or multiple.

[0085] It should be understood that in various embodiments of the present application, the magnitudes of the sequence numbers of the above processes do not imply the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0086] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0087] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0088] In several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.

[0089] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0090] In addition, the functional units in each embodiment of this application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.

[0091] When the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art or a part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

[0092] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application.

Claims

1. A method for cleaning samples of an AI or ML model, characterized in that, Applied to an electronic device, the method includes: The electronic device obtains a collected training data set for training an initial AI or ML model; The electronic device encodes samples in the training data set to obtain an encoded training sequence set, where the training sequence set includes elements obtained by encoding the samples; The electronic device determines whether the training data set contains a malicious sample to be determined by analyzing the energy of elements in the encoded training sequence set. If so, when the malicious sample to be determined is determined to be a malicious sample, the malicious sample is removed from the training data set.

2. The method according to claim 1, characterized in that, The electronic device encodes the training data set to obtain an encoded training sequence set, including: The electronic device encodes each sample in the training data set to obtain a corresponding bit sequence, and a total of multiple bit sequences are obtained. One sample in the training data set includes data and a label corresponding to the data; the training sequence set includes the multiple bit sequences, and at least two bits in at least one of the multiple bit sequences are one element.

3. The method according to claim 2, wherein The electronic device determines whether the training data set contains a malicious sample to be determined by analyzing the energy of elements in the encoded training sequence set, including: The electronic device concatenates K consecutive bit sequences in the multiple bit sequences into a continuous bit sequence in the order of encoding, where K is an integer greater than 3; The electronic device determines whether the K samples corresponding to the continuous bit sequence contain the malicious sample to be determined by analyzing the matching degree between the energy distribution of elements in the continuous bit sequence and an energy template.

4. The method according to claim 3, characterized in that The electronic device determines whether the K samples corresponding to the continuous bit sequence contain the malicious sample to be determined by analyzing the matching degree between the energy distribution of elements in the continuous bit sequence and an energy template, including: The electronic device takes every two consecutive bits in the continuous bit sequence as a corresponding element, for a total of P elements, where P is an integer greater than K; The electronic device determines the energy level corresponding to each of the P elements, for a total of P energy levels. The energy level of the i-th element in the P elements is related to the value combination of the 2 bits included in the i-th element, and i is any integer taking values from 1 to P; The electronic device determines whether there is an energy distribution indicated by an energy template in a preset energy template that matches the energy distribution of the P energy levels. Among them, if there is an energy distribution indicated by an energy template that matches the energy distribution of the P energy levels, it means that the K samples do not contain the malicious sample to be determined. Otherwise, it means that the K samples contain the malicious sample to be determined; Among them, the value of the two bits included in the i-th element being 00 corresponds to the first energy level, the value of the two bits included in the i-th element being 01 corresponds to the second energy level, the value of the two bits included in the i-th element being 10 corresponds to the third energy level, and the value of the two bits included in the i-th element being 11 corresponds to the fourth energy level.

5. The method according to claim 2, wherein The electronic device determines whether the training data set contains a malicious sample to be determined by analyzing the energy of the elements in the encoded training sequence set, including: The electronic device constructs, in the order of the encoding, every consecutive K bit sequences among the multiple bit sequences into a bit matrix, where K is an integer greater than 3; K represents the number of rows of the bit matrix, and L represents the number of columns of the bit matrix, and L is the number of bits included in the longest bit sequence among the K bit sequences; The electronic device determines whether the K samples corresponding to the bit matrix contain the malicious sample to be determined by analyzing the matching degree between the energy distribution of the elements in the bit matrix and the energy template in the column direction.

6. The method according to claim 5, characterized in that The electronic device determines whether the K samples corresponding to the bit matrix contain the malicious sample to be determined by analyzing the matching degree between the energy distribution of the elements in the bit matrix and the energy template in the column direction, including: The electronic device takes every two consecutive bits in each column of the bit matrix as a corresponding element, with a total of Q elements, where Q is an integer greater than K; The electronic device determines the energy level corresponding to each of the Q elements, with a total of Q energy levels. The energy level of the j-th element among the Q elements is related to the value combination of the two bits included in the j-th element, and j is any integer taking values from 1 to q; The electronic device determines whether there is an energy distribution indicated by the energy template in the preset energy template that matches the energy distribution of the Q energy levels. Among them, if there is an energy distribution indicated by the energy template that matches the energy distribution of the Q energy levels, it means that the K samples do not contain the malicious sample to be determined, otherwise, it means that the K samples contain the malicious sample to be determined; Among them, the value of the two bits included in the j-th element being 00 corresponds to the first energy level, the value of the two bits included in the j-th element being 01 corresponds to the second energy level, the value of the two bits included in the j-th element being 10 corresponds to the third energy level, and the value of the two bits included in the j-th element being 11 corresponds to the fourth energy level.

7. The method according to claim 3 or 5, characterized in that, When the malicious sample to be determined is determined to be a non-malicious sample, the method further includes: The electronic device determines the energy distribution of the elements corresponding to the K samples as a new energy template.

8. The method according to claim 1, wherein The training data set with the malicious sample removed is used to train the initial AI or ML model to obtain the trained initial AI or ML model. The method includes: The electronic device acquires an image taken of an antibacterial metal medical material, where the antibacterial metal medical material is a material based on additive manufacturing, and the image is an image taken at a preset resolution; The electronic device determines the proportion of the pattern of the antibacterial metal medical material in the image that occupies in the image; The electronic device constructs a feature layer corresponding to the proportion in the initial AI or ML model to obtain a target AI or ML model. The electronic device processes the image through the target AI or ML model to obtain a processing result, and the processing result is used to indicate whether there is a quality defect in the antibacterial coating of the antibacterial metal medical material.

9. The method according to claim 8, characterized in that, The electronic device constructs a feature layer corresponding to the ratio in the initial AI or ML model to obtain the target AI or ML model, including: If the ratio is greater than or equal to a preset threshold, the electronic device constructs a feature layer with a 2D structure in the initial AI or ML model to obtain the target AI or ML model; or, If the ratio is less than the preset threshold, the electronic device constructs a feature layer with a 3D structure in the initial AI or ML model to obtain the target AI or ML model.

10. The method according to claim 9, wherein The initial AI or ML model includes a first feature layer, a second feature layer, and a third feature layer, and also includes connectors between the first feature layer, the second feature layer, and the third feature layer; The electronic device constructs a feature layer with a 2D structure in the initial AI or ML model to obtain the target AI or ML model, including: The electronic device only activates the connector between the first feature layer and the second feature layer in the initial AI or ML model to obtain the target AI or ML model, and the feature layer of the target AI or ML model processes the feature sequence from the first feature layer to the second feature layer; Or, The electronic device constructs a feature layer with a 3D structure in the initial AI or ML model to obtain the target AI or ML model, including: The electronic device activates the connectors between the first feature layer, the second feature layer, and the third feature layer in the initial AI or ML model to obtain the target AI or ML model, and the feature layer of the target AI or ML model processes the feature sequence from the first feature layer to the second feature layer, and from the first feature layer to the third feature layer and then from the third feature layer to the second feature layer.

Citation Information

Patent Citations

  • Malicious code homologous judgment method based on deep learning

    CN108804919A

  • Model training method, image classification method, server and storage medium

    CN114170425A

  • Artificial intelligence (AI) method for cleaning data to train (AI) model

    CN115699208A

  • Road extraction method and system based on dynamic routing neural network

    CN116665175A

  • Vulnerability detection method and system for binary file, electronic equipment and storage medium

    CN117521072A