Feature binding method and system based on quantum algorithm

Through the feature bundling method based on quantum algorithm, the problem of dimensional disasters and excessive time consumption in high-dimensional sparse feature data processing is solved, and the efficiency and accuracy of efficient traversal of high-dimensional feature space and feature bundling are improved.

CN119810216APending Publication Date: 2025-04-11CHINA CITIC BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411784311.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The existing feature bundling technology has dimensional disasters and excessive time consumption when processing high-dimensional sparse feature data, resulting in limited model performance and excessive resource consumption.

Method used

The feature bundling method based on quantum algorithm is used to explore the possibilities of multiple feature bundling by initializing qubits, applying Hadamard transformation, checking the effectiveness of color allocation, and applying diffusion operators, and achieving efficient traversal of high-dimensional feature space.

Benefits of technology

It effectively avoids the problems of excessive resource consumption and limited model performance caused by feature bundling, improves the efficiency and accuracy of feature bundling, and can discover the global optimal feature subset in a shorter time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810216A_ABST
    Figure CN119810216A_ABST
Patent Text Reader

Abstract

The invention relates to a feature binding method and system based on a quantum algorithm, and the method specifically comprises the steps: obtaining feature data, constructing a graph structure, enabling features to correspond to vertexes of the graph structure, and configuring colors for the vertexes for feature binding; initializing quantum bits, including a data quantum bit, an auxiliary quantum bit and an output quantum bit; hadamard transformation is applied to the data quantum bits and the output quantum bits, if invalid colors exist or colors of adjacent vertexes are the same, states of corresponding auxiliary quantum bits are converted, probability amplitude is transferred between the quantum states by applying a diffusion operator, the amplitude of the quantum state corresponding to an effective coloring scheme is amplified, and the quantum state corresponding to the effective coloring scheme is obtained. And the probability amplitude of an invalid solution is reduced to obtain a feature binding scheme. Therefore, according to the technical scheme, the quantum algorithm is applied to feature binding problem solving, effective processing of the large-scale feature binding problem is achieved, the efficiency and accuracy of feature binding are improved, and the problems that resource consumption is too large and model performance is limited are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of quantum computing and machine learning, and specifically proposes a feature bundling method based on quantum algorithm, which is a data preprocessing technology for high-dimensional sparse features by utilizing the superposition state parallelism advantage of quantum computing. Background Art

[0002] In feature engineering, feature bundling is a data preprocessing technology for processing high-dimensional sparse features. It is mainly used in machine learning and deep learning. By merging similar or mutually exclusive features, the number of features can be effectively reduced while retaining most of the useful information. Because when two features that are not empty at the same time are merged, no information is lost. Feature bundling can help the model better understand and utilize the relationship between features, thereby improving prediction accuracy and generalization ability. In addition, it can simplify the model structure, reduce computational costs, and enhance the interpretability of the model. Specifically, the basic methods of feature bundling include tree methods, clustering, correlation analysis, and domain knowledge. Tree-based methods use decision trees to identify and combine similar features; clustering methods, such as K-means, group similar features; correlation analysis is based on the correlation between features for bundling; and domain knowledge manually combines related features based on professional knowledge.

[0003] However, feature bundling has some technical defects in the field of machine learning, especially when dealing with high-dimensional data, mainly focusing on the curse of dimensionality and time consumption. From the perspective of the curse of dimensionality, as the number of features increases, feature bundling may aggravate the "curse of dimensionality", that is, in the feature space, the sample distribution becomes extremely sparse as the dimension increases, making it difficult for the model to effectively capture the true structure of the data. In addition, too much feature bundling may lead to model overfitting, that is, the model performs well on the training set, but has poor generalization ability on new data. From the perspective of time consumption, feature bundling requires additional computing resources to perform bundling operations, such as calculating the correlation between features, selecting bundling strategies, etc. Therefore, for large-scale data sets, it will be very time-consuming and computationally intensive, increasing the training time and cost of the model.

[0004] Therefore, in view of the problems in the prior art, the purpose of this technical solution is to develop a method and system that uses quantum technology to solve the feature bundling problem, to achieve efficient traversal of high-dimensional feature space, and to explore the possibility of bundling multiple features at the same time, so as to find the globally optimal feature subset in a shorter time, and effectively avoid the problems of excessive resource consumption and limited model performance caused by feature bundling. Summary of the invention

[0005] In order to solve the deficiencies of the prior art, the present invention proposes a feature bundling method and system based on quantum algorithm.

[0006] To achieve the above objectives, the technical solutions adopted by the present invention include:

[0007] A feature bundling method based on quantum algorithm, characterized by comprising:

[0008] S1. Acquire feature data and construct a graph structure, correspond the features to the vertices of the graph structure, and configure colors for the vertices to perform feature bundling;

[0009] S2. Initialize the qubits, where the data qubits are used to encode all possible color assignments, the auxiliary qubits are used for detection and comparison operations, and the output qubits are used to mark valid coloring schemes;

[0010] S3. Applying Hadamard transformation to the data qubits and the output qubits to create an equiprobable superposition state of all possible color assignments;

[0011] S4. Check the data qubit to determine the validity of the color assignment, and if there is an invalid color or the colors of adjacent vertices are the same, convert the corresponding auxiliary qubit state;

[0012] S5. Applying a diffusion operator to transfer probability amplitudes between quantum states, amplifying the amplitudes of quantum states corresponding to valid coloring schemes, and reducing the probability amplitudes of quantum states marked as invalid solutions;

[0013] S6. Repeat steps S4 to S5 until the correct color allocation scheme, ie, feature bundling scheme, is obtained with high probability during measurement.

[0014] Furthermore, step S1 also includes: adding edges between vertices corresponding to features having similar or mutually exclusive relationships based on the correlation or mutual exclusivity between the features.

[0015] Further, in step S2, initializing the quantum bit includes:

[0016] The data qubits are configured, and the number m of the data qubits is calculated using the following formula:

[0017] m=N×[logd·k]

[0018] Where N is the number of vertices, d is the dimension of the quantum system, and k is the number of colors;

[0019] Configure the first auxiliary quantum bit for adjacent vertex color comparison and initialize it to an excited state |d-1>, wherein the number r of the first auxiliary quantum bits is the same as the number n of vertices;

[0020] Configure the second auxiliary qubit to mark invalid colors and initialize it to |0>;

[0021] The configuration output qubit is initialized to the excited state |d-1>.

[0022] Further, in step S3, applying Hadamard transformation to the data qubit and the output qubit specifically includes:

[0023] Apply a generalized Hadamard gate F to each data qubit d , to convert it from the ground state to a superposition state of all possible states with equal probability;

[0024] A generalized Hadamard gate F is also applied to the output qubit d , changing it from an excited state to a superposition state in which all possible states are superimposed with equal probability.

[0025] Further, the step S4 also includes:

[0026] Checking the validity of the color assignment based on an invalid color detector, and marking an invalid color by the second auxiliary qubit if any;

[0027] Based on the comparator, check whether the colors of adjacent vertices are the same. If they are the same, they are marked by the corresponding first auxiliary quantum bit.

[0028] Further, in step S6, steps S4 to S5 are repeated for a number of times times, where M is the number of states that meet the condition.

[0029] Furthermore, step S6 further includes:

[0030] After obtaining the correct color allocation scheme, the original feature data corresponding to the vertices of the same color are bundled to form a feature bundling scheme.

[0031] In addition, the present invention also relates to a feature bundling system based on quantum algorithm, characterized in that it includes:

[0032] A graph structure building module, used to obtain feature data and build a graph structure, correspond features to vertices of the graph structure, and configure colors for the vertices to perform feature bundling;

[0033] A qubit initialization module, used to initialize qubits, wherein data qubits are used to encode all possible color assignments, auxiliary qubits are used for detection and comparison operations, and output qubits are used to mark valid coloring schemes;

[0034] A Hadamard transformation module for applying a Hadamard transformation to the data qubits and the output qubits to create an equiprobable superposition state of all possible color assignments;

[0035] A validity check module, used to check the data qubits to determine the validity of the color assignment, and if there are invalid colors or the colors of adjacent vertices are the same, the corresponding auxiliary qubit state is converted;

[0036] A diffusion operator application module, used to apply the diffusion operator to transfer probability amplitudes between quantum states, amplify the amplitudes of quantum states corresponding to valid coloring schemes, and reduce the probability amplitudes of quantum states marked as invalid solutions;

[0037] An iterative control module is used to repeatedly perform validity checks and diffusion operator applications until a correct color assignment scheme, i.e., a feature bundling scheme, is obtained with high probability during measurement.

[0038] In addition, the present invention also relates to an electronic device, characterized in that it comprises a processor and a memory;

[0039] The memory is used to store operation instructions;

[0040] The processor is used to execute the above method by calling the operation instruction.

[0041] In addition, the present invention also relates to a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and the computer program implements the above method when executed by a processor.

[0042] The present invention discloses a feature bundling method and system based on quantum algorithm, comprising the following steps: acquiring feature data and constructing a graph structure, corresponding the features to the vertices of the graph structure, and configuring colors for the vertices for feature bundling; initializing quantum bits, including data quantum bits, auxiliary quantum bits and output quantum bits, for encoding color assignment, detection and comparison operations and marking effective coloring schemes; applying Hadamard transformation to data quantum bits and output quantum bits, creating an equal probability superposition state of all possible color assignments, and when checking the validity of color assignment, if there is an invalid color or the colors of adjacent vertices are the same, the corresponding auxiliary quantum bit state is converted, and the probability amplitude is transferred between quantum states by applying a diffusion operator, the amplitude of the quantum state corresponding to the effective coloring scheme is amplified, and the probability amplitude of the invalid solution is reduced, and the above steps are repeated until the correct color assignment scheme, i.e., the feature bundling scheme, is obtained. Therefore, the technical solution is applied to the feature bundling problem by quantum algorithms, realizes the effective processing of large-scale feature bundling problems, improves the efficiency and accuracy of feature bundling, and avoids the problems of excessive resource consumption and limited model performance caused by feature bundling. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1A schematic diagram of a feature bundling method based on a quantum algorithm provided in an embodiment of the present application;

[0044] Figure 2 A schematic diagram of the structure of a feature bundling system based on a quantum algorithm provided in an embodiment of the present application;

[0045] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present invention.

[0047] Those skilled in the art can understand that, unless otherwise stated, the singular forms "one", "an", "said" and "the" used herein may also include plural forms, and the "first", "second", etc., are only used to distinguish and define objects for the purpose of introducing the scheme clearly, and do not limit the objects themselves. Of course, the objects defined by "first" and "second" may be the same terminal, device, user, etc., or the same type of terminal, device and user. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0048] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0049] The graph coloring problem is to assign colors to the vertices of a graph of a given structure so that adjacent vertices have different colors. The goal is usually to use the least number of colors. The feature bundling problem can be modeled as a graph coloring problem: each original feature is represented as a vertex in the graph. If two features cannot be bundled together (for example, because they are highly correlated or conflicting), add an edge between them. The solution to the graph coloring problem corresponds to a feature bundling scheme, where vertices of the same color can be bundled together.

[0050] like Figure 1As shown, a feature bundling method based on quantum algorithm is characterized by comprising:

[0051] S1. Acquire feature data and construct a graph structure, correspond the features to the vertices of the graph structure, and configure colors for the vertices to perform feature bundling;

[0052] Specifically, the graph structure includes N vertices, e edges, and k colors. Based on the correlation or mutual exclusivity between the features, edges are added between vertices corresponding to features with similar or mutually exclusive relationships, and a color is assigned to each vertex in the graph so that no two adjacent vertices (vertices connected by edges) have the same color.

[0053] S2. Initialize the qubits, where the data qubits are used to encode all possible color assignments, the auxiliary qubits are used for detection and comparison operations, and the output qubits are used to mark valid coloring schemes;

[0054] Specifically, initializing the quantum bit includes:

[0055] The data qubits are configured, and the number m of the data qubits is calculated using the following formula:

[0056] m=N×[logd·k]

[0057] Where N is the number of vertices, d is the dimension of the quantum system, and k is the number of colors;

[0058] Configure the first auxiliary quantum bit for adjacent vertex color comparison and initialize it to an excited state |d-1>, wherein the number r of the first auxiliary quantum bits is the same as the number n of vertices;

[0059] Configure the second auxiliary qubit to mark invalid colors and initialize it to |0>;

[0060] The configuration output qubit is initialized to the excited state |d-1>.

[0061] The combined initialization state of all qubits can be mathematically described as:

[0062]

[0063] where |ψ> is the superposition state of the m data qubits, |θ> is the excitation of the r first auxiliary qubits, and |ζ> is the ground state of the second auxiliary qubit. is the excited state of the output qubit.

[0064] The initialization step creates a quantum state for the Grover algorithm that contains all possible color assignments, allowing the algorithm to search for all possible solutions.

[0065] S3. Applying Hadamard transformation to the data qubits and the output qubits to create an equiprobable superposition state of all possible color assignments;

[0066] Specifically, applying the Hadamard transformation to the data qubit and the output qubit specifically includes:

[0067] Apply a generalized Hadamard gate F to each data qubit d , to convert it from the ground state to a superposition state of all possible states with equal probability;

[0068] A generalized Hadamard gate F is also applied to the output qubit d , changing it from an excited state to a superposition state in which all possible states are superimposed with equal probability.

[0069] Mathematical description of superposition state: After generalized Hadamard transformation, the superposition state of the system is:

[0070]

[0071] Among them, |ψ 0 > is the superposition state of the data quantum bit, which can be expressed as:

[0072] is the number of data qubits, N is the number of vertices, and k is the number of colors;

[0073] |θ 0 > is the state of the first auxiliary qubit, which remains |(d-1) r >, r is the number of the first auxiliary qubits;

[0074] |ζ 0 > is the state of the second auxiliary qubit, which remains |0>;

[0075] is the superposition state of the output qubit, expressed as:

[0076]

[0077] ω=e 2πi / d is a d-dimensional root of unity.

[0078] The purpose of the generalized Hadamard transform is to create an equiprobable superposition state of all possible color assignments in a quantum system. The Grover algorithm can be used to search for all possible solutions in parallel in a unified quantum state.

[0079] S4. Check the data qubit to determine the validity of the color assignment, and if there is an invalid color or the colors of adjacent vertices are the same, convert the corresponding auxiliary qubit state;

[0080] Specifically, the validity of the color assignment is checked based on the invalid color detector, and if an invalid color exists, it is marked by the second auxiliary quantum bit;

[0081] Based on the comparator, check whether the colors of adjacent vertices are the same. If they are the same, they are marked by the corresponding first auxiliary quantum bit.

[0082] First, determine the invalid colors among the k colors. If d c = k, indicating that all colors are valid, where If there are invalid colors, that is, the quantum bits represent redundancy in all combinations, and it is necessary to reduce the search space through Oracle and only consider valid color combinations.

[0083] Invalid Color Detector (ICD): Numbers all possible color combinations from 0 to d c -1; Oracle checks the combination of valid colors and if any invalid color combination is detected, it rejects the combination using the ICD function; if any invalid color is found in the data qubit, the corresponding second auxiliary qubit is kept as 0, otherwise if the color is valid, the corresponding second auxiliary qubit is converted to d-1.

[0084] Comparator: If two adjacent vertices have the same color, the first auxiliary qubit corresponding to the relevant vertex is converted to 0, otherwise if the colors are different, the auxiliary qubit corresponding to the relevant vertex is kept as d-1.

[0085] Output qubit phase reversal operation: Using the first auxiliary qubit as the control and the output qubit as the target, a generalized multi-controlled Toffoli (MCT) gate is applied. When the first auxiliary qubit and the second auxiliary qubit are in an excited state |d-1>, the MCT gate will perform a phase reversal operation on the output qubit so that the amplitude of the correct solution will be amplified, while the amplitude of the incorrect solution will be reduced.

[0086] S5. Applying a diffusion operator to transfer probability amplitudes between quantum states, amplifying the amplitudes of quantum states corresponding to valid coloring schemes, and reducing the probability amplitudes of quantum states marked as invalid solutions;

[0087] Specifically, the diffusion operator is used to amplify the amplitude of the quantum state of the correct solution in the search space and reduce the amplitude of the wrong solution. After the diffusion operator is operated, it is similar to the initial superposition state |ψ 0 >The same components remain unchanged. The general form of the diffusion operator is:

[0088]

[0089] d is the quantum bit dimension and n is the number of quantum bits.

[0090] S6. Repeat steps S4 to S5 until the correct color allocation scheme, ie, feature bundling scheme, is obtained with high probability during measurement.

[0091] Specifically, the number of times steps S4 to S5 are repeated is times, where M is the number of states that meet the condition;

[0092] After obtaining the correct color allocation scheme, the original feature data corresponding to the vertices of the same color are bundled to form a feature bundling scheme.

[0093] In order to more clearly introduce the technical solution of the present application, the following specific embodiments are used to help understand the feature bundling method based on quantum algorithm disclosed in the present application:

[0094] Create a graph with 3 vertices. Vertex 1 is connected to vertices 2 and 3, and vertices 2 and 3 are not connected. Use 2 colors (red and blue) to color it.

[0095] Using a three-dimensional qubit representation, the color of each vertex is represented as 0 for red, 1 for blue, and 2 for an invalid color. Therefore, a total of 3 data qubits are required: |q 0 q 1 q 2 >, q0 represents the color of vertex 1, q1 represents the color of vertex 2, and q2 represents the color of vertex 3.

[0096] Step 1: Initialization

[0097] Construct four types of qubits: data qubits: 3, representing the colors of vertices 1, 2, and 3 respectively;

[0098] First auxiliary qubit: 3, the same as the number of vertices, used for adjacent color comparison;

[0099] The second auxiliary qubit is used for invalid color detection: 1, used to mark invalid colors;

[0100] Output qubit: 1, used to mark the valid coloring scheme;

[0101] The following formulas represent the initialization states of four types of quantum bits:

[0102] |φ>=|000>(3 data qubits, initialized to the ground state)

[0103] |θ>=|222> (3 first auxiliary qubits, the same as the number of vertices, initialized to an excited state)

[0104] |ζ>=|0> (1 second auxiliary qubit is used for invalid color detection, initialized to the ground state)

[0105] (1 output qubit, initialized to an excited state)

[0106] Integrating the above four types of quantum bits, the overall initial state is expressed as the outer product of four quantum bits:

[0107]

[0108] Step 2: Apply the generalized Hadamard transform

[0109] Applying the Hadamard gate to the data qubit is expressed as follows:

[0110]

[0111] Applying the output qubit Door, where F 3 is a single-qubit gate that adds a global phase to a specific qubit state, and is formulated as follows:

[0112]

[0113] The initialization state changes to:

[0114] By constructing an equally probable superposition of all possible color assignments, Grover's algorithm can search for all possible solutions in parallel in a unified quantum state.

[0115] Step 3: Oracle Operation

[0116] 1. Invalid Color Detector (Ternary ICD):

[0117] By checking the data qubit |q 0 q 1 q 2 >, determine whether any vertex is assigned an invalid color, and if an invalid color is detected, flip the state of the corresponding auxiliary qubit from |0> to |2>.

[0118]

[0119] 2. Comparator

[0120] By checking the data qubit |q 0 q1 q 2 >, compare the colors of adjacent vertices, if the colors are the same, flip the state of the corresponding auxiliary qubit from |2> to |0>, that is:

[0121] For vertices 1 and 2:

[0122] For vertices 1 and 3:

[0123] 3. Generalized MCT operation:

[0124] By performing a phase reversal operation on the output qubit through the generalized MCT operation, the amplitude of the correct solution will be amplified, while the amplitude of the incorrect solution will be reduced. For example, if ζ = 2 (no invalid color) and θ 0 =θ 1 = 2 (adjacent vertices have different colors), then a phase flip is applied to the output qubit |φ>. Oracle operation U f Effect: If x is a valid coloring solution, then U f |x>=-|x>; otherwise, U f |x>=|x>.

[0125] Step 4: Generalized Diffusion Operator

[0126] Applying the diffusion operator D enables the algorithm to explore all possible solutions in the solution space by transferring probability amplitudes between quantum states. When used in conjunction with the Oracle operation, the generalized diffusion operator helps to amplify the probability amplitudes of quantum states marked as valid solutions while reducing the probability amplitudes of invalid solutions.

[0127] Apply the diffusion operator D = 2|ψ 0 ><ψ 0 |-I, where |i> corresponds to all quantum bit states from |000> to |222>. The state after applying the diffusion operator to the target quantum bit |ψ> is expressed as: D|ψ>=|ψ′>=2|ψ 0 >-|ψ>.

[0128] Step 5: Iteration

[0129] Repeat steps 3 and 4 for approximately times, M is the number of states that meet the conditions. After each iteration, the state becomes: |ψ new >=DU f |ψ 0ld >. Final measurement data qubit |q 0 q 1 q 2 >, the result is a correct coloring scheme for the graph.

[0130] The changes in quantum states are summarized as follows:

[0131] 1. Initial state:

[0132] 2. After applying the generalized Hadamard:

[0133] 3. After Oracle operation:

[0134] 4. After diffusion operator:

[0135] 5. Repeat steps 3 and 4 several times.

[0136] By repeating steps 3 and 4 multiple times, the amplitude of the correct coloring scheme is amplified, and the correct scheme can be screened out by measuring the probability distribution of each quantum state bit. The quantum states with the largest probability distribution measured are |011) and |100), which are the correct coloring schemes.

[0137] Adopt the scheme provided by the present application, obtain feature data and construct a graph structure, correspond the features to the vertices of the graph structure, and configure the colors for the vertices for feature bundling; initialize quantum bits, including data quantum bits, auxiliary quantum bits, and output quantum bits, for encoding color assignment, detection and comparison operations, and marking effective coloring schemes; apply Hadamard transformation to data quantum bits and output quantum bits, create an equal probability superposition state of all possible color assignments, and when checking the validity of color assignment, if there is an invalid color or the colors of adjacent vertices are the same, the corresponding auxiliary quantum bit state is converted, and the probability amplitude is transferred between quantum states by applying a diffusion operator, the amplitude of the quantum state corresponding to the effective coloring scheme is amplified, and the probability amplitude of the invalid solution is reduced, and the above steps are repeated until the correct color assignment scheme, i.e., the feature bundling scheme, is obtained. Therefore, the technical solution is applied to the feature bundling problem by quantum algorithms, which realizes the effective processing of large-scale feature bundling problems, improves the efficiency and accuracy of feature bundling, and avoids the problems of excessive resource consumption and limited model performance caused by feature bundling.

[0138] In addition, another aspect also involves a feature bundling system based on quantum algorithms, the structure of which is as follows Figure 2 As shown, including:

[0139] A graph structure building module 201, used to obtain feature data and build a graph structure, correspond features to vertices of the graph structure, and configure colors for the vertices to perform feature bundling;

[0140] Specifically, based on the correlation or mutual exclusivity between the features, edges are added between vertices corresponding to features having similar or mutually exclusive relationships.

[0141] A qubit initialization module 202, used to initialize qubits, wherein data qubits are used to encode all possible color assignments, auxiliary qubits are used for detection and comparison operations, and output qubits are used to mark valid coloring schemes;

[0142] Specifically, the data qubits are configured, and the number m of the data qubits is calculated using the following formula:

[0143] m=N×[logd·k]

[0144] Where N is the number of vertices, d is the dimension of the quantum system, and k is the number of colors;

[0145] Configure the first auxiliary quantum bit for adjacent vertex color comparison and initialize it to an excited state |d-1>, wherein the number r of the first auxiliary quantum bits is the same as the number n of vertices;

[0146] Configure the second auxiliary qubit to mark invalid colors and initialize it to |0>;

[0147] The configuration output qubit is initialized to the excited state |d-1>.

[0148] A Hadamard transformation module 203, for applying a Hadamard transformation to the data qubits and the output qubits to create an equiprobable superposition state of all possible color assignments;

[0149] Specifically, a generalized Hadamard gate F is applied to each data qubit. d , to convert it from the ground state to a superposition state of all possible states with equal probability;

[0150] A generalized Hadamard gate F is also applied to the output qubit d , changing it from an excited state to a superposition state in which all possible states are superimposed with equal probability.

[0151] A validity check module 204 is used to check the data qubits to determine the validity of the color assignment. If there is an invalid color or the colors of adjacent vertices are the same, the corresponding auxiliary qubit state is converted;

[0152] Specifically, the validity of the color assignment is checked based on the invalid color detector, and if an invalid color exists, it is marked by the second auxiliary quantum bit;

[0153] Based on the comparator, check whether the colors of adjacent vertices are the same. If they are the same, they are marked by the corresponding auxiliary quantum bits.

[0154] A diffusion operator application module 205 is used to apply a diffusion operator to transfer probability amplitudes between quantum states, amplify the amplitudes of quantum states corresponding to valid coloring schemes, and reduce the probability amplitudes of quantum states marked as invalid solutions;

[0155] The iterative control module 206 is used to repeatedly perform validity checks and diffusion operator applications until the correct color allocation scheme is obtained with high probability during measurement, and the original feature data corresponding to vertices of the same color are bundled, that is, the feature bundling scheme.

[0156] By using this system, the above method can be executed and the corresponding technical effects can be achieved.

[0157] An embodiment of the present invention further provides an electronic device for executing the above method, as an implementation device of the method, comprising a processor and a memory;

[0158] A memory, used for storing operation instructions;

[0159] A processor is used to execute a feature bundling method based on a quantum algorithm provided in any embodiment of the present application by calling an operation instruction.

[0160] As an example, Figure 3 A schematic diagram of the structure of an electronic device applicable to an embodiment of the present application is shown, and the electronic device 300 includes: a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, such as through a bus 302. Optionally, the electronic device 300 may also include a transceiver 304. It should be noted that in actual applications, the transceiver 304 is not limited to one. It is understandable that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the specific structure of the electronic device 300. In other embodiments of the present application, the electronic device 300 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. Optionally, the electronic device may also include a display screen 305 for displaying images, or receiving user operation instructions when necessary.

[0161] The processor 301 is applied in the embodiment of the present application to implement the method shown in the above method embodiment. The transceiver 304 may include a receiver and a transmitter. The transceiver 304 is applied in the embodiment of the present application to implement the function of the electronic device of the embodiment of the present application communicating with other devices when executed.

[0162] Processor 301 may be a CPU (Central Processing Unit), a general purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0163] The processor 301 may also include one or more processing units, for example: the processor 301 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural network processor (Neural-network Processing Unit, NPU), etc. Different processing units can be independent devices or integrated into one or more processors. Among them, the controller can be the nerve center and command center of the electronic device 300. The controller can generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. A memory can also be set in the processor 301 for storing instructions and data. In some embodiments, the memory in the processor 301 is a cache memory. The memory can save instructions or data that the processor 301 has just used or circulated.

[0164] The processor 301 can run the feature bundling method based on quantum algorithm provided in the embodiment of the present application. The processor 301 may include different devices. For example, when the CPU and GPU are integrated, the CPU and GPU can cooperate to execute the feature bundling method based on quantum algorithm provided in the embodiment of the present application. Part of the algorithm is executed by the CPU, and the other part of the algorithm is executed by the GPU to obtain faster processing efficiency.

[0165] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0166] The memory 303 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or may include a high-speed random access memory, or may include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.

[0167] Optionally, the memory 303 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the feature bundling method based on quantum algorithm provided in any embodiment of the present application.

[0168] The memory 303 can be used to store computer executable program codes, which include instructions. The processor 301 executes various functional applications and data processing of the electronic device 300 by running the instructions stored in the memory 303. The memory 303 may include a program storage area and a data storage area. Among them, the program storage area may store the code of the operating system, application program, etc. The data storage area may store data created during the use of the electronic device 300 (such as images, videos, etc. collected by the camera application), etc.

[0169] The memory 303 may also store one or more computer programs corresponding to the feature bundling method based on quantum algorithm provided in the embodiment of the present application. The one or more computer programs are stored in the above-mentioned memory 303 and are configured to be executed by the one or more processors 301. The one or more computer programs include instructions, and the above-mentioned instructions can be used to execute each step in the above-mentioned corresponding embodiment.

[0170] Of course, the code of the feature bundling method based on quantum algorithm provided in the embodiment of the present application can also be stored in an external memory.

[0171] The display screen 305 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 300 may include 1 or N display screens 305, where N is a positive integer greater than 1. The display screen 305 can be used to display information input by a user or information provided to a user and various graphical user interfaces (GUI). For example, the display screen 305 can display photos, videos, web pages, or files.

[0172] The electronic device provided in the embodiment of the present application is applicable to any embodiment of the above method. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, which will not be repeated here.

[0173] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps in the method in the above embodiment, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, all the steps in the method in the above embodiment are implemented.

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

[0175] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.

[0176] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0177] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in a box or multiple boxes. Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0178] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A feature bundling method based on quantum algorithm, characterized in that: include: S1. Acquire feature data and construct a graph structure, correspond the features to the vertices of the graph structure, and configure colors for the vertices to perform feature bundling; S2. Initialize the qubits, where the data qubits are used to encode all possible color assignments, the auxiliary qubits are used for detection and comparison operations, and the output qubits are used to mark valid coloring schemes; S3. Applying Hadamard transformation to the data qubits and the output qubits to create an equiprobable superposition state of all possible color assignments; S4. Check the data qubit to determine the validity of the color assignment, and if there is an invalid color or the colors of adjacent vertices are the same, convert the corresponding auxiliary qubit state; S5. Applying a diffusion operator to transfer probability amplitudes between quantum states, amplifying the amplitudes of quantum states corresponding to valid coloring schemes, and reducing the probability amplitudes of quantum states marked as invalid solutions; S6. Repeat steps S4 to S5 until the correct color allocation scheme, ie, feature bundling scheme, is obtained with high probability during measurement.

2. The method according to claim 1, characterized in that Step S1 also includes: adding edges between vertices corresponding to features having similar or mutually exclusive relationships based on the correlation or mutual exclusivity between the features.

3. The method according to claim 1 or 2, characterized in that: In step S2, initializing the quantum bit includes: The data qubits are configured, and the number m of the data qubits is calculated using the following formula: m=N×[logd·k] Where N is the number of vertices, d is the dimension of the quantum system, and k is the number of colors; Configure the first auxiliary quantum bit for adjacent vertex color comparison and initialize it to an excited state |d-1>, wherein the number r of the first auxiliary quantum bits is the same as the number n of vertices; Configure the second auxiliary qubit to mark invalid colors and initialize it to |0>; The configuration output qubit is initialized to the excited state |d-1>.

4. The method according to claim 1, characterized in that In step S3, applying the Hadamard transformation to the data qubit and the output qubit specifically includes: Apply a generalized Hadamard gate F to each data qubit d , to convert it from the ground state to a superposition state of all possible states with equal probability; A generalized Hadamard gate F is also applied to the output qubit d , changing it from an excited state to a superposition state in which all possible states are superimposed with equal probability.

5. The method according to claim 1, characterized in that The step S4 further comprises: Checking the validity of the color assignment based on an invalid color detector, and marking an invalid color by the second auxiliary qubit if any; Based on the comparator, check whether the colors of adjacent vertices are the same. If they are the same, they are marked by the corresponding first auxiliary quantum bit.

6. The method according to claim 1, characterized in that In step S6, steps S4 to S5 are repeated for a number of times times, where M is the number of states that meet the condition.

7. The method according to claim 1 or 6, characterized in that: Step S6 also includes: After obtaining the correct color allocation scheme, the original feature data corresponding to the vertices of the same color are bundled to form a feature bundling scheme.

8. A feature bundling system based on quantum algorithm, characterized in that: include: A graph structure building module, used to obtain feature data and build a graph structure, correspond features to vertices of the graph structure, and configure colors for the vertices to perform feature bundling; A qubit initialization module, used to initialize qubits, wherein data qubits are used to encode all possible color assignments, auxiliary qubits are used for detection and comparison operations, and output qubits are used to mark valid coloring schemes; A Hadamard transformation module for applying a Hadamard transformation to the data qubits and the output qubits to create an equiprobable superposition state of all possible color assignments; A validity check module, used to check the data qubits to determine the validity of the color assignment, and if there are invalid colors or the colors of adjacent vertices are the same, the corresponding auxiliary qubit state is converted; A diffusion operator application module, used to apply the diffusion operator to transfer probability amplitudes between quantum states, amplify the amplitudes of quantum states corresponding to valid coloring schemes, and reduce the probability amplitudes of quantum states marked as invalid solutions; An iterative control module is used to repeatedly perform validity checks and diffusion operator applications until a correct color assignment scheme, i.e., a feature bundling scheme, is obtained with high probability during measurement.

9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store operation instructions; The processor is used to execute the method according to any one of claims 1 to 7 by calling the operation instruction.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.