Data conversion method and device

By converting the target optimization function into a probability energy function and using the characteristics of probability bits, the problem of low dimensionality conversion efficiency of high-dimensional massive data is solved, and a more efficient computing resource utilization and dimensionality reduction process is achieved.

CN119557627BActive Publication Date: 2025-06-06INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510111391.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-06-06
Estimated Expiration
2045-01-23

AI Technical Summary

Technical Problem

When the existing technology processes high-dimensional massive data, the efficiency of dimensional reduction conversion is low, resulting in high demand for computing resources and complex computing processes.

Method used

By establishing the target optimization function of the data to be converted and converting it into a probability energy function, the eigenvalues ​​and eigenvectors of the covariance matrix are solved using the randomness and parallelism of the probability bits.

Benefits of technology

It greatly saves computer computing resources, shortens the time required for data dimensionality reduction conversion, and improves the efficiency of dimensionality reduction conversion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557627B_ABST
    Figure CN119557627B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a data conversion method and device, the method comprising: establishing a target optimization function corresponding to the reference data to be converted; converting the target optimization function into a probability energy function according to a target conversion relationship; detecting the target bit state of the probability energy function, wherein the target bit state is the probability bit state corresponding to the minimum energy of the probability energy function; solving the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues ​​according to the target bit state and the target conversion relationship, and obtaining the target eigenvalues ​​and the target eigenvectors corresponding to the target eigenvalues; converting the reference data according to the target eigenvalues ​​and the target eigenvectors, and obtaining the target data, wherein the data dimension of the target data is lower than the data dimension of the reference data. Through the present application, the problem of low efficiency of dimensionality reduction conversion of data is solved, thereby achieving the effect of improving the efficiency of dimensionality reduction conversion of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the computer field, and more specifically, to a data conversion method and device. Background Art

[0002] In the era of big data, information technology is developing rapidly, and a large amount of data is being collected and processed, which makes the volume and dimension of data larger and larger. How to extract effective information from high-dimensional massive data to overcome the "curse of dimensionality" has become an urgent problem to be solved. At present, the traditional computing methods are used to deal with this problem. The required computing resources are growing exponentially, the computing power of the computer for data processing is required to be high, and the calculation process is relatively complicated, and the efficiency of data dimensionality reduction conversion is not high. Summary of the invention

[0003] The embodiments of the present application provide a data conversion method and device to at least solve the problem of low efficiency of dimensionality reduction conversion of data in the related art.

[0004] According to one embodiment of the present application, a data conversion method is provided, comprising: establishing a target optimization function corresponding to reference data to be converted, wherein the target optimization function is used to solve the eigenvalues ​​of a covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues; converting the target optimization function into a probability energy function according to a target conversion relationship, wherein the target conversion relationship is used to indicate the manner in which eigenvalues ​​and eigenvectors are represented by probability bits; detecting a target bit state of the probability energy function, wherein the target bit state is a probability bit state corresponding to the minimum energy of the probability energy function; solving the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues ​​according to the target bit state and the target conversion relationship to obtain target eigenvalues ​​and target eigenvectors corresponding to the target eigenvalues; converting the reference data according to the target eigenvalues ​​and the target eigenvector to obtain target data, wherein the data dimension of the target data is lower than the data dimension of the reference data.

[0005] In an exemplary embodiment, the target optimization function is converted into a probability energy function according to a target conversion relationship, including: obtaining a feature vector expression according to a value range of a vector element of the feature vector represented by the target optimization function, and obtaining a feature value expression according to a value range of a feature value represented by the target optimization function, wherein the feature value expression is used to represent a conversion relationship between a feature value in a reference form and a feature value in a target form represented by the probability bit, the feature vector expression is used to represent a conversion relationship between a feature vector in the reference form and a feature vector in the target form represented by the probability bit, and the target conversion relationship includes the feature value expression and the feature vector expression; the feature value expression and the feature vector expression are brought into the target optimization function to obtain the probability energy function.

[0006] In an exemplary embodiment, obtaining the eigenvalue expression and the eigenvector expression according to the value range of the eigenvalue represented by the target optimization function includes: calling the function corresponding to the value range of the eigenvalue in the following function as the eigenvalue expression:

[0007]

[0008] in, is a characteristic value, and the probability bits include: and , T is The number of digits taken, M is The number of digits taken;

[0009] The step of obtaining a feature vector expression according to the value range of the vector elements of the feature vector represented by the target optimization function includes: calling a function corresponding to the value range of the vector elements of the feature vector in the following functions as the feature vector expression:

[0010]

[0011] in, is the n-dimensional feature vector The j-th element in , the probability bits include: and , S is The number of digits taken, G is The number of digits taken.

[0012] In an exemplary embodiment, detecting the target bit state of the probability energy function includes: detecting a probability parameter curve of the target probability bit included in the probability energy function, wherein the probability parameter curve is used to indicate that the energy of the probability energy function decreases with changes in the target probability bit; obtaining multiple spare bit states according to the probability parameter curve, wherein each of the spare bit states is a bit state exhibited by the target probability bit at different moments; and screening out a target number of target bit states whose state probabilities are arranged from high to low from the multiple spare bit states according to the state probability of each of the spare bit states, wherein the state probability is used to indicate the proportion of the number of occurrences of the corresponding spare bit state to the number of occurrences of the multiple spare bit states.

[0013] In an exemplary embodiment, the acquisition of multiple spare bit states according to the probability parameter curve includes: randomly generating a bit state of the target probability bit as the initial current bit state, repeating the following steps until the number of detections of the multiple spare bit states reaches the number of iterations, or the number of consecutive detections of the same bit state reaches a stable number of times: detecting the target parameter value corresponding to the current bit state on the probability parameter curve; generating a reference bit state as the spare bit state according to the target parameter value; and determining the reference bit state as the next current bit state when the number of the multiple spare bit states does not reach the number of iterations, or the number of consecutive detections of the same bit state does not reach a stable number of times.

[0014] In an exemplary embodiment, detecting the target parameter value corresponding to the current bit state on the probability parameter curve includes: detecting the target parameter value corresponding to the current bit state on the probability parameter curve through a classical computer; generating a reference bit state according to the target parameter value as a spare bit state includes: sending the target parameter value to a probability computer through the classical computer, wherein the probability computer is used to generate a reference bit state according to the target parameter value, and sending the reference bit state to the classical computer; determining the reference bit state as a spare bit state through the classical computer; or generating the reference bit state as a spare bit state according to the target parameter value and a random value through the classical computer.

[0015] In an exemplary embodiment, generating a reference bit state as a spare bit state according to the target parameter value and the random value includes: generating the reference bit state by the following formula:

[0016] m=sgn{rand(-1,1)+tanh[I]},

[0017] Among them, m is the reference bit state, I is the parameter value, rand(-1, +1) is used to randomly generate a value greater than -1 and less than 1, tanh is the hyperbolic tangent function, sgn{x>0}=1 and sgn{x<0 or x=0}=0.

[0018] In an exemplary embodiment, the method of screening out the target bit states of the front target number arranged in descending order of state probability from a plurality of the spare bit states according to the state probability of each of the spare bit states includes: screening out the state probabilities that are in the front target number in the probability sorting from a plurality of the state probabilities to obtain the target state probability, wherein the target number is the data dimension of the reference data, and the probability sorting is used to arrange the plurality of the state probabilities in descending order; and determining the spare bit state corresponding to the target state probability as the target bit state.

[0019] In an exemplary embodiment, solving the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues ​​based on the target bit state and the target conversion relationship includes: setting the state of the probability bit in the target conversion relationship to the target bit state; calculating the eigenvalues ​​of the covariance matrix corresponding to the reference data under the target bit state and the eigenvectors corresponding to the eigenvalues.

[0020] In an exemplary embodiment, the establishing of the target optimization function corresponding to the reference data to be converted includes: establishing a covariance matrix of the reference data; and establishing the target optimization function according to a mathematical relationship between eigenvalues ​​and eigenvectors of the covariance matrix of the reference data.

[0021] In an exemplary embodiment, establishing the target optimization function according to the mathematical relationship between the eigenvalues ​​and eigenvectors of the covariance matrix of the reference data includes: establishing the target optimization function by the following formula:

[0022] ,

[0023] in, The eigenvalues ​​of the covariance matrix representing the reference data, The eigenvector of the covariance matrix used to represent the reference data, S t is the covariance matrix, the data dimension of the reference data is n, || || is the vector 2-norm, and arg min() is used to solve the value of the independent variable that minimizes the value of the function.

[0024] According to another embodiment of the present application, a data conversion device is provided, including: an establishment module, used to establish a target optimization function corresponding to the reference data to be converted, wherein the target optimization function is used to solve the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues; a first conversion module, used to convert the target optimization function into a probability energy function according to a target conversion relationship, wherein the target conversion relationship is used to indicate the way in which the eigenvalues ​​and the eigenvectors are represented by probability bits; a detection module, used to detect the target bit state of the probability energy function, wherein the target bit state is the probability bit state corresponding to the minimum energy of the probability energy function; a solution module, used to solve the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues ​​according to the target bit state and the target conversion relationship, and obtain the target eigenvalues ​​and the target eigenvectors corresponding to the target eigenvalues; a second conversion module, used to convert the reference data according to the target eigenvalues ​​and the target eigenvectors to obtain target data, wherein the data dimension of the target data is lower than the data dimension of the reference data.

[0025] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0026] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0027] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0028] Through the present application, since the target optimization function corresponding to the reference data to be converted is established and the target optimization function is converted into a probability energy function represented by a probability bit according to the target conversion relationship, the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues ​​can be solved by using the operation of detecting the target bit state of the probability energy function, and the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues ​​are solved by using the advantages of the randomness and parallelism of the probability bits to solve the optimization problem. Compared with the traditional method of calculating the eigenvalues ​​and eigenvectors using matrix operations, the computing power resources of the computer can be greatly saved, and the time required for the dimensionality reduction conversion of the data can be shortened, and the dimensionality reduction conversion efficiency of the data can be improved. Therefore, the problem of low efficiency of the dimensionality reduction conversion of the data can be solved, and the effect of improving the dimensionality reduction conversion efficiency of the data can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a hardware structure block diagram of a server device of a data conversion method according to an embodiment of the present application;

[0030] Figure 2 is a flow chart of a data conversion method according to an embodiment of the present application;

[0031] Figure 3 It is a flow chart of a principal component analysis solution method for probability-classical hybrid computing for data dimensionality reduction according to an embodiment of the present application;

[0032] Figure 4 It is a structural block diagram of a data conversion device according to an embodiment of the present application. DETAILED DESCRIPTION

[0033] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0035] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a data conversion method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0036] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the data conversion method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0037] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0038] In this embodiment, a data conversion method is provided. Figure 2 is a flow chart of a data conversion method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0039] Step S202, establishing a target optimization function corresponding to the reference data to be converted, wherein the target optimization function is used to solve the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues;

[0040] Step S204, converting the target optimization function into a probability energy function according to a target conversion relationship, wherein the target conversion relationship is used to indicate a manner in which eigenvalues ​​and eigenvectors are represented by probability bits;

[0041] Step S206, detecting a target bit state of the probability energy function, wherein the target bit state is a probability bit state corresponding to a minimum energy of the probability energy function;

[0042] Step S208, solving the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues ​​according to the target bit state and the target conversion relationship, and obtaining the target eigenvalues ​​and the target eigenvectors corresponding to the target eigenvalues;

[0043] Step S210, converting the reference data according to the target eigenvalue and the target eigenvector to obtain target data, wherein the data dimension of the target data is lower than the data dimension of the reference data.

[0044] Through the above steps, since the target optimization function corresponding to the reference data to be converted is established and the target optimization function is converted into a probability energy function represented by a probability bit according to the target conversion relationship, the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues ​​can be solved by using the operation of the target bit state of the detection probability energy function, and the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues ​​are solved by using the advantages of the randomness and parallelism of the probability bits to solve the optimization problem, compared with the traditional method of calculating the eigenvalues ​​and eigenvectors using matrix operations, the computing power resources of the computer can be greatly saved, and the time required for the dimensionality reduction conversion of the data can be shortened, and the dimensionality reduction conversion efficiency of the data can be improved. Therefore, the problem of low efficiency of the dimensionality reduction conversion of the data can be solved, and the effect of improving the dimensionality reduction conversion efficiency of the data can be achieved.

[0045] In the embodiment provided in step S202, the reference data includes, but is not limited to, data from the fields of image processing, natural language processing, bioinformatics, financial engineering and data analysis, system recommendation, machine learning and data mining, and signal processing. By utilizing the data conversion method provided in this application, data including but not limited to the above fields can be converted into data dimensionality reduction to simplify further processing operations on data in various fields. For example, in the field of image processing, in image recognition, classification, and object detection tasks, the original image data usually has a very high dimension. A high-resolution color image may have millions of pixels, and each pixel has three channels of RGB, forming an extremely large feature space. Through the dimensionality reduction method provided in this application, the key features of the image can be extracted, the data dimension can be reduced, and the training speed and prediction performance of the machine learning model can be improved. In the field of natural language processing, text data, especially large corpora, often have tens of thousands of dimensions, and each word or phrase is a feature. In the face of massive text data, the text data can be converted into a low-dimensional space through data dimensionality reduction technology, which is convenient for subsequent clustering analysis, topic modeling, or sentiment analysis. In the field of signal processing, signal data, such as audio, video streams, and sensor outputs, often need dimensionality reduction to remove redundancy, reduce noise, and extract key features of the signal. For example, in speech recognition, dimensionality reduction can be used to extract the time-frequency features of speech signals, thereby improving recognition accuracy.

[0046] Optionally, in an embodiment of the present application, the reference data to be converted includes but is not limited to data to be reduced in dimension, and the data dimension includes but is not limited to the number of features contained in the indicating data. High-dimensional data is a data set with a large number of features (dimensions), and the number of dimensions is usually much larger than the number of samples. In practical applications, these features may be various measurements, attributes, variables or parameters. Low-dimensional data is a data set with a small number of features, and the number of dimensions is usually small relative to the number of samples. Low-dimensional data is easier to analyze and visualize, and is more efficient in computation. The target data obtained by processing the reference data through steps S202-S210 is low-dimensional data relative to the reference data, and the reference data is high-dimensional data relative to the target data.

[0047] Optionally, in an embodiment of the present application, the target optimization function includes but is not limited to being established based on the mathematical relationship between the eigenvalues ​​of the covariance matrix of the reference data and the eigenvectors corresponding to the eigenvalues.

[0048] Optionally, in an embodiment of the present application, effective low-dimensional data may be captured by performing eigenvalue decomposition on a covariance matrix of reference data.

[0049] In the embodiment provided in step S204, a probabilistic bit (p-bit for short) is a basic unit used in the field of probabilistic computing, which is completely different from the concept of a bit in traditional digital computing, which can only store a certain state of 0 or 1. The design concept of p-bit is based on the quantum bit (qubit) in quantum computing, but p-bit runs in a classical physical system and can work under room temperature conditions, without the need for an ultra-low temperature environment required in quantum computing. In terms of characteristics and working principles, traditional bits are either 0 or 1 at any point in time, while the special feature of p-bit is that it can be randomly sampled between 0 and 1 with a certain probability. Specifically, the value of a p-bit at a certain moment is not a certain 0 or 1, but may be 0 or 1 according to a preset probability distribution. This randomness gives p-bit a unique advantage in processing probabilistic operations and solving optimization problems, because it can directly implement random search and sampling at the algorithm level without simulating this randomness through software. Probabilistic computing uses the randomness and parallelism of p-bit, and has significant performance advantages for certain types of problems. The following are some key advantages:

[0050] Random search and parallelism: p-bit can perform random search in the solution space of the problem, which is very useful in solving complex optimization problems because multiple p-bits can be used to sample multiple possible solutions simultaneously, improving the search efficiency.

[0051] Handling uncertainty: p-bit is well suited for handling information containing uncertainty and ambiguity, which is particularly important in probabilistic reasoning and decision analysis.

[0052] Simulating quantum behavior: Although the p-bit is a classical computing unit, its design and operation mimic the behavior of a qubit in some aspects, such as its ability to process random phenomena, providing inspiration for the development of new computing models and algorithms.

[0053] Room-temperature operation: An important advantage of the p-bit is that it can be operated at room temperature, which greatly reduces the hardware cost and operating conditions compared to quantum computers that require extremely low temperatures to operate.

[0054] Optionally, the target conversion relationship is used to indicate the manner in which the eigenvalues ​​and eigenvectors are represented by probability bits, including but not limited to the conversion relationship between the eigenvalues ​​in reference form and the eigenvalues ​​in target form represented by probability bits and the conversion relationship between the eigenvectors in reference form and the eigenvectors in target form represented by probability bits. By converting the target optimization function into a probability energy function according to the target conversion relationship, the target optimization function with the eigenvalues ​​and eigenvectors as independent variables can be converted into a probability energy function with one or more probability bits as independent variables, so that the eigenvalues ​​and eigenvectors can be quickly solved by using the characteristics of the probability bits.

[0055] In the embodiment provided in step S206, it includes but is not limited to using a simulated annealing algorithm to search for the minimum energy state in the probability energy function, and gradually stabilizing the system in the lowest energy state by controlling the temperature parameter. Alternatively, in the field of classical computing, a stochastic gradient descent algorithm can be used to gradually reduce the value of the energy function in combination with the randomness of the probability bit to find the minimum energy state. Alternatively, a dedicated probability computing hardware, such as a probability computer chip, can be designed or used to detect the minimum energy state through hardware parallel computing to accelerate the solution process.

[0056] Optionally, in an embodiment of the present application, the target bit state is the probability bit state corresponding to the minimum energy of the probability energy function, the probability bit state of a single probability bit includes a 0 state and a 1 state, and the probability bit state of multiple probability bits is a combination of multiple probability bit states, for example, it can be [0,0,1,0,1] or [0,0,0,0,1] state, etc.

[0057] In the embodiment provided in step S208, solving the eigenvalues ​​of the reference data and the eigenvectors corresponding to the eigenvalues ​​according to the target bit state and the target conversion relationship includes but is not limited to decoding the probability bit state back to the numerical form of the eigenvalues ​​and the eigenvectors using a classical calculation method. If the p-bit state contains multiple possible solutions, iterative decoding can be performed to improve the accuracy and stability of the solution by running the solution process multiple times. In order to ensure correct dimensionality reduction, a post-processing algorithm can also be designed, such as determining the orthogonality of the eigenvectors to ensure that the solved eigenvectors constitute an orthogonal basis.

[0058] In the embodiment provided in step S210, converting the reference data according to the target eigenvalues ​​and the target eigenvectors includes but is not limited to constructing a projection matrix using the eigenvectors corresponding to the first d largest eigenvalues ​​obtained, multiplying the high-dimensional reference data by the projection matrix to obtain low-dimensional target data, where d is the data dimension of the desired low-dimensional data.

[0059] Optionally, in an embodiment of the present application, including but not limited to for a continuously updated data set, when the number of samples of the newly collected data reaches a quantity threshold or when the collection duration of the data reaches a time threshold, steps S202-S210 are executed to achieve a data dimensionality reduction conversion of the newly collected data.

[0060] As an optional implementation, the target optimization function is converted into a probability energy function according to a target conversion relationship, including: obtaining a feature vector expression according to the value range of the vector elements of the feature vector represented by the target optimization function, and obtaining a feature value expression according to the value range of the feature value represented by the target optimization function, wherein the feature value expression is used to represent the conversion relationship between the feature value in a reference form and the feature value in a target form represented by probability bits, the feature vector expression is used to represent the conversion relationship between the feature vector in a reference form and the feature vector in a target form represented by probability bits, and the target conversion relationship includes a feature value expression and a feature vector expression; the feature value expression and the feature vector expression are brought into the target optimization function to obtain a probability energy function.

[0061] Optionally, in an embodiment of the present application, a vector element is a number included in a feature vector, and an N-dimensional feature vector includes N vector elements.

[0062] Optionally, in an embodiment of the present application, the reference form is a traditional digital style, and the target form is a form represented by probability bits.

[0063] Optionally, in an embodiment of the present application, bringing the eigenvalue expression and the eigenvector expression into the target optimization function includes but is not limited to converting the eigenvalues ​​and eigenvectors in the reference form in the target optimization function into eigenvalues ​​and eigenvectors in the target form, and finally obtaining a probability energy function with probability bits as independent variables.

[0064] Through the above steps, a method for converting a conventional optimization problem into an energy function under the framework of probability calculation is provided. By representing eigenvectors and eigenvalues ​​as probability bits and solving them under the framework of probability energy function, this method makes full use of the parallelism and randomness of probability calculation and can more efficiently handle the dimensionality reduction problem of high-dimensional data sets.

[0065] Optionally, in the embodiment of the present application, the expression of the eigenvalue and the expression of the eigenvector are determined, including but not limited to, by the following steps:

[0066] Step 1: Assume the expression of eigenvalues ​​and eigenvectors:

[0067] Eigenvalue expression construction: Based on the scale and accuracy requirements of the problem, it is assumed that the eigenvalue is a value represented by a probability bit (p-bit). For example, if the range of the eigenvalue is 0 to 100, we can set it to use 10 p-bits to represent the value in this range, where the probability of each p-bit sampling result being 0 or 1 within a certain period of time is determined by the probability distribution we set.

[0068] Eigenvector expression construction: Similarly, each element of the eigenvector can also be represented by a set of p-bits. Assuming that the value range of each element is from -1 to 1, it can be represented by 16 p-bits, where some bits are used to represent the integer part and some bits are used to represent the decimal part. We also set the number and probability distribution of p-bits based on the accuracy requirements and computing resources of the problem.

[0069] Step 2: Establish state probability distribution:

[0070] Initialize the p-bit state: Set an initial probability distribution for each p-bit used to represent eigenvalues ​​and eigenvectors. This is usually a uniform distribution to ensure that all possible values ​​in the initial state have a chance to be sampled.

[0071] Construct state probability distribution: Based on the initialized probability distribution, construct a joint probability distribution covering all p-bit states through simulation or sampling techniques. This step can use Monte Carlo methods or other probabilistic sampling techniques to ensure that we can evaluate the probability of occurrence of all possible eigenvalue and eigenvector combinations.

[0072] Step 3: Evaluate the plausibility of the assumptions:

[0073] Target optimization function calculation: Using the assumed eigenvalue and eigenvector expressions, calculate the value of the target optimization function. For each possible p-bit state combination, we should be able to obtain a value for the optimization function.

[0074] Probability energy function construction and evaluation: According to the p-bit expression of eigenvalues ​​and eigenvectors, the optimization function is converted into a probability energy function. The value of the probability energy function should be proportional to the value of the optimization function, which depends on the conversion method we set. When evaluating the value of the probability energy function, considering the probability distribution of the p-bit state, we can calculate the average energy value under different states and the distribution of these values.

[0075] Judging the rationality of the assumptions: By comparing the average energy values ​​in different p-bit states, we can evaluate whether the eigenvalue and eigenvector expressions we assumed are reasonable. If the average energy value in a certain state is significantly lower than that in other states, this may mean that the eigenvalue and eigenvector representation we set is close to the true solution, or at least can effectively optimize the problem. On the contrary, if the average energy values ​​in all states are high or unevenly distributed, this may indicate that our assumptions need to be adjusted to more accurately reflect the characteristics of the problem.

[0076] Step 4: Adjust and Iterate:

[0077] Parameter adjustment: Based on the evaluation results of step 3, adjust the p-bit expression and probability distribution of eigenvalues ​​and eigenvectors to try to reduce the average energy value or distribute the energy values ​​more evenly.

[0078] Iterative optimization: Repeat steps 2 and 3 until a stable eigenvalue and eigenvector expression that can effectively optimize the problem is found. This may require multiple rounds of iteration and evaluation until we find a reasonable hypothesis that meets the optimization goal.

[0079] Through the above steps, we can not only construct the conversion process from the target optimization function to the probability energy function, but also continuously adjust and optimize our assumptions according to the evaluation results of the state probability distribution to ensure that the final eigenvalue and eigenvector expressions are both reasonable and can effectively solve the data dimensionality reduction problem. This iterative optimization and probability evaluation strategy provides a more flexible and accurate way to solve eigenvalues ​​and eigenvectors, especially for those cases where the eigenvalues ​​and eigenvectors are unevenly distributed or have complex structures.

[0080] As an optional implementation, obtaining the eigenvalue expression and the eigenvector expression according to the value range of the eigenvalue represented by the target optimization function includes: calling the function corresponding to the value range of the eigenvalue in the following function as the eigenvalue expression:

[0081]

[0082] in, is the eigenvalue, and the probability bits include: and , T is The number of digits taken, M is The number of digits taken;

[0083] Obtaining a feature vector expression according to a value range of a vector element of a feature vector represented by a target optimization function includes: calling a function corresponding to the value range of the vector element of the feature vector in the following function as the feature vector expression:

[0084]

[0085] in, is the n-dimensional feature vector The j-th element in , the probability bits include: and , S is The number of digits taken, G is The number of digits taken.

[0086] Optionally, in an embodiment of the present application, T, M, S, and G are the number of bits of corresponding probability bits, and their specific values ​​are related to the scale of the problem to be solved. Specifically, the larger the values ​​selected for T, M, S, and G, the higher the calculation accuracy of the final eigenvalues ​​and eigenvectors. , , and represents the probability bit, that is , , and is a number that is either 0 or 1. , , , .

[0087] As an optional implementation, detecting the target bit state of a probability energy function includes: detecting a probability parameter curve of a target probability bit included in the probability energy function, wherein the probability parameter curve is used to indicate that the energy of the probability energy function decreases as the target probability bit changes; obtaining multiple spare bit states according to the probability parameter curve, wherein each spare bit state is a bit state exhibited by the target probability bit at different moments; and screening out a target number of target bit states whose state probabilities are arranged in descending order from the multiple spare bit states according to the state probability of each spare bit state, wherein the state probability is used to indicate the proportion of the number of occurrences of the corresponding spare bit state to the number of occurrences of the multiple spare bit states.

[0088] Optionally, in an embodiment of the present application, a probability parameter curve is used to indicate that the energy of a probability energy function decreases as the target probability bit changes. The probability parameter curve includes but is not limited to a partial derivative curve of the probability energy function with respect to the target probability bit.

[0089] Optionally, in an embodiment of the present application, during the optimization iteration process, the target probability bit p-bit will go through multiple states, which are so-called "standby bit states". Each state corresponds to a different energy value, and by monitoring these states and the corresponding energies, the distribution information about the solution can be obtained. For example, within a certain iteration cycle, p-bit may exhibit a variety of different bit states, and the frequency of occurrence of each state and the corresponding energy value are recorded.

[0090] Optionally, in an embodiment of the present application, after obtaining a series of spare bit states, including but not limited to sorting these states according to the probability of occurrence of each spare state (state probability), the state with the highest state probability is selected as the final "target bit state". The state probability is calculated based on the frequency of occurrence of the spare bit state during the iteration process, which reflects which p-bit states are more likely to correspond to the optimal or near-optimal solution. In probability calculation, the bit state with a larger state probability means that the state is explored and visited more times by the algorithm during the iteration process, which is usually because it has a lower energy value under the current parameter setting. The algorithm tends to explore more near states with lower energy because these states are more likely to be candidates for global minimum or local minimum. As the iteration proceeds, the algorithm gradually approaches the minimum value of energy by adjusting the parameters of the bit state and energy function. In this process, those bit states with relatively low energy values ​​will appear more frequently due to the preference of the algorithm, so the state probability will be relatively high. That is, the bit state with a high state probability is more likely to correspond to a state with lower energy. Therefore, the target bit state with the former target number of state probabilities arranged from high to low can be screened out according to the state probability.

[0091] Optionally, in the embodiment of the present application, the target quantity includes but is not limited to the data dimension used to indicate the reference data. By obtaining the target bit state of the target quantity, it is ensured that all the characteristic values ​​corresponding to the reference data can be finally obtained.

[0092] Through the above steps, by detecting the probability parameter curve and screening the target bit state, not only can the solution process be accelerated, but also the obtained eigenvalues ​​and eigenvectors can be ensured to be of high quality, thereby improving the accuracy of data dimensionality reduction. This method is particularly effective when processing high-dimensional data sets, and can overcome the influence of the curse of dimensionality, while making full use of the parallelism of probability calculations and the precision advantages of classical calculations to achieve the purpose of saving resources and improving computing power.

[0093] As an optional implementation, multiple spare bit states are obtained according to a probability parameter curve, including: randomly generating a bit state of a target probability bit as an initial current bit state, repeating the following steps until the number of times multiple spare bit states are detected reaches the number of iterations, or the number of times the same bit state is detected continuously reaches a stable number of times: detecting the target parameter value corresponding to the current bit state on the probability parameter curve; generating a reference bit state as a spare bit state according to the target parameter value; and determining the reference bit state as the next current bit state when the number of multiple spare bit states does not reach the number of iterations, or the number of times the same bit state is not detected continuously reaches a stable number of times.

[0094] Optionally, in an embodiment of the present application, the setting of the number of iterations mainly depends on the solution accuracy of the eigenvalues ​​and eigenvectors. A higher number of iterations means that the algorithm will explore the state space more thoroughly, and it is possible to find a solution closer to the global minimum, but it will also increase the computing time and resource consumption. In practical applications, the number of iterations is usually preset through experiments, or dynamically adjusted according to specific properties of the problem (such as data dimension, eigenvalue distribution, etc.). For example, for higher dimensional data, more iterations may be required to ensure algorithm convergence.

[0095] Optionally, in an embodiment of the present application, the setting of the number of stable times is to determine whether the algorithm has converged to a stable state, that is, the change in the value of the probability energy function tends to be flat, and the bit state remains unchanged or changes slightly in several consecutive iterations. The number of stable times can be regarded as a threshold for detecting convergence. When the number of consecutive detections of the same bit state reaches the number of stable times, the algorithm believes that a possible local or global minimum has been found, and the iteration is stopped. The setting of this parameter helps to avoid over-calculation and ensures that the iteration can be stopped in time after a relatively stable solution is found.

[0096] Optionally, in the embodiment of the present application, a bit state of the target probability bit is randomly generated as the initial current bit state. This process is usually performed when the algorithm starts to initialize the value of p-bit. Since p-bit is randomly represented with a certain probability between 0 and 1, this initial state can be randomly generated to provide a starting point for subsequent iterations.

[0097] Optionally, in an embodiment of the present application, detecting the target parameter value corresponding to the current bit state on the probability parameter curve includes but is not limited to calculating the value of the probability energy function and possible partial derivatives or other gradient information under the current bit state. This part involves the numerical evaluation of the probability energy function, and calculating its energy and change trend according to the current state, providing a basis for the next step of generating a reference bit state.

[0098] Optionally, in an embodiment of the present application, a reference bit state is generated according to the target parameter value, that is, the partial derivative or gradient information obtained in the previous step is used to determine how to update the current bit state to reduce the energy of the probability energy function. The generated reference bit state is used as the next candidate state, which can be the result obtained by a probabilistic algorithm (such as energy-based random sampling) or a deterministic algorithm (such as gradient descent).

[0099] Through the above steps, since the state of the probability bit is randomly sampled between 0 and 1, the algorithm can effectively explore the multi-dimensional state space of the probability energy function by randomly generating the initial current bit state and repeating the iteration. This helps to find the global minimum of the energy function or the local minimum close to the global minimum, and then obtain a better solution for the eigenvalues ​​and eigenvectors of the reference data.

[0100] As an optional implementation, detecting the target parameter value corresponding to the current bit state on the probability parameter curve includes: detecting the target parameter value corresponding to the current bit state on the probability parameter curve by a classical computer;

[0101] Generating a reference bit state as a spare bit state according to a target parameter value, comprising: sending the target parameter value to a probabilistic computer through a classical computer, wherein the probabilistic computer is used to generate a reference bit state according to the target parameter value, and sending the reference bit state to the classical computer; determining the reference bit state as a spare bit state through the classical computer; or,

[0102] A reference bit state is generated as a backup bit state by a classical computer according to a target parameter value and a random value.

[0103] Optionally, in an embodiment of the present application, a classical computer processes information based on deterministic logic, using bits as the basic unit of information storage and processing. A bit can only be in one of two states, 0 or 1, at any time, which is the basis of binary logic, enabling computers to perform precise arithmetic and logical operations. Probabilistic computers use probabilistic bits (p-bits) as the basic unit of information processing. P-bits can randomly represent states of 0 and 1 with a certain probability within a certain period of time. This randomness provides computers with a new way to deal with probability and uncertainty problems.

[0104] Optionally, in an embodiment of the present application, generating a reference bit state as a backup bit state according to a target parameter value includes but is not limited to generating a reference bit state through collaboration between a classical computer and a probabilistic computer, that is, sending the target parameter value to the probabilistic computer through a classical computer, and then the probabilistic computer uses its own randomness to generate a reference bit state according to the indication of the target parameter value, and sends the reference bit state to the classical computer, and the classical computer determines the reference bit state as a backup bit state; generating a reference bit state as a backup bit state according to the target parameter value also includes but is not limited to generating a reference bit state by a classical computer in combination with a pseudo-random generation algorithm, that is, generating a reference bit state as a backup bit state by a classical computer based on the target parameter value and a random value.

[0105] Through the above steps, through the synergy of classical computers and probabilistic computers, an effective combination of precise control and random exploration of data dimension reduction optimization problems is achieved. In each iteration, the classical computer is responsible for calculating the target parameter value under the current bit state and providing it to the probabilistic computer as a guide, so that the probabilistic computer can generate new reference bit states based on these parameters and use its inherent randomness. These states may be closer to the solution of the optimization problem. Subsequently, the reference bit state is received by the classical computer and recorded as part of the spare bit state for subsequent screening processes. This collaborative working mode can not only use the determinism and precision of the classical computer to guide the iterative process, but also accelerate the exploration of the solution space through the randomness of the probabilistic computer, thereby improving the efficiency of solving the target bit state.

[0106] As an optional implementation, generating a reference bit state as a spare bit state according to the target parameter value and the random value includes: generating the reference bit state by the following formula:

[0107] m=sgn{rand(-1,1)+tanh[I]},

[0108] Wherein, m is the reference bit state, I is the parameter value, rand(-1, +1) is used to randomly generate a value greater than -1 and less than 1, tanh is the hyperbolic tangent function, sgn{x>0}=1 and sgn{x<0 or x=0}=0.

[0109] Optionally, in an embodiment of the present application, a classical computer may use the formula m=sgn{rand(-1,1)+tanh[I]} to continuously generate spare bit states.

[0110] Through the above steps, an alternative solution is provided to generate reference bit states by combining a classical computer with a pseudo-random number generation algorithm, which provides flexibility and feasibility for hybrid computing when hardware resources are limited. In this way, even the randomness based on software simulation can effectively simulate the effect of probability calculation in data dimensionality reduction tasks, and then find better eigenvalues ​​and eigenvectors.

[0111] As an optional implementation, a target bit state of the front target number arranged in a state probability from high to low is screened out from multiple spare bit states according to the state probability of each spare bit state, including: screening out the state probability that is at the front target number in the probability sorting from multiple state probabilities to obtain the target state probability, wherein the target number is the data dimension of the reference data, and the probability sorting is used to arrange multiple state probabilities in order from large to small; and determining the spare bit state corresponding to the target state probability as the target bit state.

[0112] Optionally, in an embodiment of the present application, the probability sorting for arranging multiple state probabilities in order from large to small is not deduplicated. For example, when the multiple state probabilities are C, B, A, B, C, D, F, E (A>B>C>D>E>F), the probability sorting is A, B, B, C, C, D, E, F.

[0113] Through the above steps, the minimum value of the probability energy function is effectively located through probability sorting and state probability screening. Under the premise of ensuring calculation accuracy and stability, the efficiency of data dimensionality reduction can be significantly improved, especially when processing high-dimensional data. It can effectively overcome the dimensionality curse and save computing resources.

[0114] As an optional implementation, the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues ​​are solved according to the target bit state and the target conversion relationship, including: setting the state of the probability bit in the target conversion relationship to the target bit state; calculating the eigenvalues ​​of the covariance matrix corresponding to the reference data in the target bit state and the eigenvectors corresponding to the eigenvalues.

[0115] Optionally, in an embodiment of the present application, it includes but is not limited to directly decoding the target bit state into a binary representation of the eigenvalue and the eigenvector. In the target conversion relationship, the state of each probability bit (0 or 1) corresponds to a binary bit in the eigenvalue or the eigenvector. For example, if the eigenvalue is represented by 8 bits of binary, then the first 8 bits in the target bit state can be decoded into the numerical value of the eigenvalue. For the eigenvector, if the vector dimension is 4 and each eigenvector element is also represented by 8 bits of binary, then the subsequent 32 bits in the target bit state can be decoded into 4 elements of the eigenvector. According to the decoded binary representation, a classical algorithm is used to perform numerical conversion to obtain the exact numerical values ​​of the eigenvalue and the eigenvector. For example, the binary bit string can be converted to a decimal value using 2's complement representation, and then the classical mathematical methods such as eigenvalue decomposition are applied to ensure the accuracy and reliability of the solution.

[0116] As an optional implementation, establishing a target optimization function corresponding to the reference data to be converted includes: establishing a covariance matrix of the reference data; and establishing a target optimization function based on the mathematical relationship between eigenvalues ​​and eigenvectors of the covariance matrix of the reference data.

[0117] Optionally, in an embodiment of the present application, data includes but is not limited to being organized into a data matrix, each row of which represents a sample point, and each column represents a feature or dimension. For example, in an application of handwritten digit recognition, the reference data may contain multiple digital images, each image as a sample point, and the pixel values ​​in the image as features. Data also includes but is not limited to being organized into multiple data vectors, each data vector represents a sample, and the vector elements in each data vector represent the performance of the sample in different features or dimensions.

[0118] Optionally, in the embodiment of the present application, the mathematical relationship between the eigenvalues ​​and eigenvectors of the covariance matrix of the reference data includes but is not limited to ,in, is the covariance matrix, real number is the eigenvalue and Dimensional vector is the feature vector.

[0119] As an optional implementation, establishing a target optimization function according to the mathematical relationship between the eigenvalues ​​and eigenvectors of the covariance matrix of the reference data includes: establishing the target optimization function by the following formula:

[0120] ,

[0121] in, The eigenvalues ​​of the covariance matrix representing the reference data, The eigenvector of the covariance matrix used to represent the reference data, S t is the covariance matrix, the data dimension of the reference data is n, || || is the vector 2-norm, and argmin() is used to find the value of the independent variable that minimizes the function value.

[0122] Optionally, in the embodiment of the present application, for a given vector , the 2-norm of the vector .

[0123] Through the above steps, the non-negative property of the norm is applied to solve The minimum =0 and The value of the covariance matrix S t The eigenvalues ​​and eigenvectors of .

[0124] As an optional implementation, the present application also provides a principal component analysis solution method for probability-classical hybrid computing for data dimensionality reduction. Figure 3 1 is a flow chart of a principal component analysis solution method for probabilistic-classical hybrid computing for data dimensionality reduction according to an embodiment of the present application. Figure 3 As shown, the method comprises the following steps:

[0125] Step S1, extract the eigenvalue problem corresponding to the principal component analysis dimensionality reduction algorithm:

[0126] Principal component analysis is a commonly used data dimensionality reduction method, which can obtain low-dimensional data while maintaining the discreteness (variance) of the original data as much as possible. In order to better describe the direction of the principal component, principal component analysis performs eigenvalue decomposition on the covariance matrix to capture effective low-dimensional data, that is, the optimization problem in the algorithm can be transformed into solving the eigenvalue problem of the covariance matrix: ,in, is the covariance matrix, X is the data matrix of the original data (i.e. the reference data to be converted), m is the number of sample data points, is the total number of data features (also called data directions) of each sample data point, Subtract the corresponding mean from each column of the data matrix X The covariance matrix can also be expressed by the formula: Calculate, where is the covariance matrix The element in the i-th row and j-th column represents the covariance between the i-th feature and the j-th feature. and are the elements of the kth row and ith column of the data matrix X and the elements of the kth row and jth column of the data matrix X, respectively. and are the means of the i-th and j-th features respectively. Real number For the matrix The eigenvalues ​​of The corresponding non-zero solution called belonging to The eigenvector of The eigenvector corresponding to the largest eigenvalue Constructing the projection matrix , its column vector is the optimal projection direction.

[0127] Step S2, transform the eigenvalue problem of the covariance matrix into a quadratic unconstrained optimization problem: According to the definition of the linear least squares problem, that is, finding the real number and dimensional real column vector satisfy , which can be expressed as:

[0128] ,

[0129] Through operation ,

[0130] Since the covariance matrix is ​​a real symmetric matrix, it satisfies , then we can finally get .

[0131] Step S3, a probabilistic algorithm is designed to solve the quadratic unconstrained problem, and the rest are solved using the classical algorithm:

[0132] More specifically, step S3 includes the following sub-steps:

[0133] Sub-step S31, design a binary expression of the solution. In order to design a probability calculation algorithm to solve The minimum value of , assuming the eigenvalue With the eigenvector Each element in , It can be represented by binary bits, and each element in the eigenvalue and eigenvector is greater than or equal to 0, then it can be assumed that:

[0134] ,

[0135] ,

[0136] Among them, T, M, S, G are the number of probability bits required. , , , is a number that is either 0 or 1, then , , It is worth noting that the values ​​of T, M, S, and G are related to the scale of the problem being solved. The binary forms of eigenvalues ​​and eigenvector elements are not unique and can be set according to specific scenarios.

[0137] Sub-step S32, bringing the binary expression of the solution into the target loss function , which transforms it into a quadratic unconstrained optimization problem.

[0138] For ease of understanding, here we solve As an example, we choose the covariance matrix , and assume that the eigenvalue Expressed in two bits, it can be expressed as , T=1, M=0, two-dimensional feature vector Each element in is represented by two bits, so it can be expressed as , , S=0, G=1. Substitute it into the function In the result:

[0139] ;

[0140] ,

[0141] The probability energy function is obtained, that is, a quadratic unconstrained optimization problem is obtained.

[0142] Sub-step S33, initialize the randomly generated bit string of length 6 as variables The initial value of (i.e. the initial current bit state).

[0143] Sub-step S34, obtaining the input of the probability computer. Function The input can be obtained by taking partial derivatives of the variables separately, as follows:

[0144] ,

[0145] ,

[0146] ,

[0147] ,

[0148] ,

[0149] .

[0150] Through the above content, six probability parameter curves are obtained, using the initial value The above probability parameter curve can be used to calculate the input value .

[0151] Sub-step S35, according to Get the corresponding output , , , , The bit string value of is the reference bit state.

[0152] Sub-step S36, setting the iteration stop condition: when the output , , , , The iteration stops when the distribution of the bit string values ​​no longer changes (that is, the number of consecutive detections of the same bit state reaches a stable number) or the maximum number of iterations is reached.

[0153] Sub-step S37: If the iteration stop condition is not met, the reference bit state output last time is , , , , Re-do The value of is iterated according to the probability parameter curve and the iteration mechanism until the iteration stop condition is reached, and the number of the previous target with the highest probability at this time is output. , , , , The bit value is the target bit state;

[0154] Sub-step S38, using the classical algorithm to calculate, the output of the highest probability of the number of front targets , , , , The numerical solution of the eigenvalue and the corresponding eigenvector can be obtained by substituting the bit string value into the binary form of the set eigenvalue and eigenvector.

[0155] After step S3, the method further comprises:

[0156] Step S4, obtaining the optimal projection direction and the corresponding projection matrix. The eigenvector corresponding to the largest eigenvalue Constructing the projection matrix , its column vector is the optimal projection direction, so the first d largest eigenvalues ​​and the corresponding eigenvectors can be selected from the eigenvalues ​​calculated in step S38, thereby obtaining the projection direction and projection matrix .

[0157] Step S5, obtain low-dimensional data. Use classical algorithms to realize high-dimensional data matrix X and projection matrix Multiplying them together can give us a low-dimensional (specifically dimension) data (i.e., target data).

[0158] Through the above process, probability calculation is combined with data dimensionality reduction. The eigenvalue problem of the covariance matrix to be solved is extracted for the principal component analysis algorithm used for data dimensionality reduction, and it is converted into a quadratic unconstrained optimization problem. The probability calculation is designed according to its form to solve it. The rest is solved using classical algorithms, which fully utilizes the performance advantages of probability calculation and the outstanding performance of classical computers in handling traditional computing complex problems to solve the data dimensionality reduction problem, thereby improving the solution efficiency and ultimately improving the efficiency of data dimensionality reduction conversion.

[0159] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0160] In the present embodiment, a data conversion device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions thereof will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and contemplated.

[0161] Figure 4 is a structural block diagram of a data conversion device according to an embodiment of the present application, such as Figure 4 As shown, the device comprises:

[0162] Establishing module 402, used to establish a target optimization function corresponding to the reference data to be converted, wherein the target optimization function is used to solve the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues;

[0163] A first conversion module 404, configured to convert the target optimization function into a probability energy function according to a target conversion relationship, wherein the target conversion relationship is used to indicate a manner in which eigenvalues ​​and eigenvectors are represented by probability bits;

[0164] A detection module 406, configured to detect a target bit state of the probability energy function, wherein the target bit state is a probability bit state corresponding to a minimum energy of the probability energy function;

[0165] A solution module 408 is used to solve the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues ​​according to the target bit state and the target conversion relationship, and obtain the target eigenvalues ​​and the target eigenvectors corresponding to the target eigenvalues;

[0166] The second conversion module 410 is used to convert the reference data according to the target eigenvalue and the target eigenvector to obtain target data, wherein the data dimension of the target data is lower than the data dimension of the reference data.

[0167] Through the above steps, since the target optimization function corresponding to the reference data to be converted is established and the target optimization function is converted into a probability energy function represented by a probability bit according to the target conversion relationship, the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues ​​can be solved by using the operation of detecting the target bit state of the probability energy function, and the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues ​​are solved by using the advantages of the randomness and parallelism of the probability bits to solve the optimization problem. Compared with the traditional method of calculating the eigenvalues ​​and eigenvectors using matrix operations, the computing power resources of the computer can be greatly saved, and the time required for the dimensionality reduction conversion of the data can be shortened, and the dimensionality reduction conversion efficiency of the data can be improved. Therefore, the problem of low efficiency of the dimensionality reduction conversion of the data can be solved, and the effect of improving the dimensionality reduction conversion efficiency of the data can be achieved.

[0168] As an optional implementation, the first conversion module includes: a first acquisition unit, used to obtain a feature vector expression according to the value range of the vector elements of the feature vector represented by the target optimization function, and to obtain a feature value expression according to the value range of the feature value represented by the target optimization function, wherein the feature value expression is used to represent the conversion relationship between the feature value in the reference form and the feature value in the target form represented by the probability bit, and the feature vector expression is used to represent the conversion relationship between the feature vector in the reference form and the feature vector in the target form represented by the probability bit, and the target conversion relationship includes the feature value expression and the feature vector expression; and an introduction unit, used to introduce the feature value expression and the feature vector expression into the target optimization function to obtain the probability energy function.

[0169] Optionally, the first acquisition unit is further used to: call a function corresponding to the value range of the eigenvalue in the following function as the eigenvalue expression:

[0170] ,

[0171] in, is the eigenvalue, and the probability bits include: and , T is The number of digits taken, M is The number of digits taken;

[0172] Call the function corresponding to the value range of the vector elements of the eigenvector in the following function as the eigenvector expression:

[0173]

[0174] in, is the n-dimensional feature vector The j-th element in , the probability bits include: and , S is The number of digits taken, G is The number of digits taken.

[0175] As an optional implementation, the detection module includes: a first detection unit, used to detect a probability parameter curve of a target probability bit included in a probability energy function, wherein the probability parameter curve is used to indicate that the energy of the probability energy function decreases with the change of the target probability bit; a second acquisition unit, used to acquire a plurality of spare bit states according to the probability parameter curve, wherein each spare bit state is a bit state exhibited by the target probability bit at different times;

[0176] A screening unit is used to screen out a target number of target bit states whose state probabilities are arranged from high to low from multiple spare bit states according to the state probabilities of each spare bit state, wherein the state probability is used to indicate the proportion of the number of occurrences of the corresponding spare bit state to the number of occurrences of multiple spare bit states.

[0177] Optionally, the second acquisition unit is also used to: randomly generate a bit state of the target probability bit as the initial current bit state, and repeat the following steps until the number of times multiple spare bit states are detected reaches the number of iterations, or the number of times the same bit state is detected continuously reaches a stable number of times: detect the target parameter value corresponding to the current bit state on the probability parameter curve; generate a reference bit state as a spare bit state according to the target parameter value; if the number of multiple spare bit states does not reach the number of iterations, or the number of times the same bit state is not detected continuously reaches a stable number of times, determine the reference bit state as the next current bit state.

[0178] Optionally, the second acquisition unit is also used to: detect a target parameter value corresponding to a current bit state on the probability parameter curve, including: detecting the target parameter value corresponding to the current bit state on the probability parameter curve through a classical computer; generating a reference bit state as a spare bit state according to the target parameter value, including: sending the target parameter value to a probability computer through a classical computer, wherein the probability computer is used to generate a reference bit state according to the target parameter value, and sending the reference bit state to the classical computer; determining the reference bit state as a spare bit state through the classical computer; or, generating a reference bit state as a spare bit state according to the target parameter value and a random value through a classical computer.

[0179] Optionally, the second acquisition unit is further used to: generate a reference bit state as a spare bit state according to the target parameter value and the random value, including: generating the reference bit state by the following formula:

[0180] m=sgn{rand(-1,1)+tanh[I]},

[0181] Wherein, m is the reference bit state, I is the parameter value, rand(-1, +1) is used to randomly generate a value greater than -1 and less than 1, tanh is the hyperbolic tangent function, sgn{x>0}=1 and sgn{x<0 or x=0}=0.

[0182] As an optional implementation, the screening module includes: a screening unit, used to screen out state probabilities that are at the front target number in the probability sorting from multiple state probabilities to obtain a target state probability, wherein the target number is a data dimension of the reference data, and the probability sorting is used to arrange multiple state probabilities in order from large to small; a determination unit, used to determine the spare bit state corresponding to the target state probability as the target bit state.

[0183] As an optional implementation, the solution module includes: a setting unit, used to set the state of the probability bit in the target conversion relationship to the target bit state; a calculation unit, used to calculate the eigenvalues ​​of the covariance matrix corresponding to the reference data in the target bit state and the eigenvectors corresponding to the eigenvalues.

[0184] As an optional implementation, the establishment module includes: a first establishment unit for establishing a covariance matrix of reference data; and a second establishment unit for establishing a target optimization function according to the mathematical relationship between the eigenvalues ​​and eigenvectors of the covariance matrix of the reference data.

[0185] Optionally, the second establishing unit is further used to: establish the target optimization function by the following formula:

[0186] ,

[0187] in, The eigenvalues ​​of the covariance matrix representing the reference data, The eigenvector of the covariance matrix used to represent the reference data, S t is the covariance matrix, the data dimension of the reference data is n, || || is the vector 2-norm, and argmin() is used to find the value of the independent variable that minimizes the function value.

[0188] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0189] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0190] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0191] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0192] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0193] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0194] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0195] An embodiment of the present application also provides a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.

[0196] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0197] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0198] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A data conversion method, characterized in that: include: Establishing a target optimization function corresponding to the reference data to be converted, wherein the reference data is original image data from the field of image processing, and the target optimization function is used to solve the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues; Converting the target optimization function into a probability energy function according to a target conversion relationship, wherein the target conversion relationship is used to indicate a manner in which eigenvalues ​​and eigenvectors are represented by probability bits; Detecting a target bit state of the probability energy function, wherein the target bit state is a probability bit state corresponding to a minimum energy of the probability energy function; Solving the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues ​​according to the target bit state and the target conversion relationship, to obtain target eigenvalues ​​and target eigenvectors corresponding to the target eigenvalues; The reference data is converted according to the target feature value and the target feature vector to obtain target data, wherein the data dimension of the target data is lower than the data dimension of the reference data.

2. The method according to claim 1, characterized in that: The step of converting the target optimization function into a probability energy function according to the target conversion relationship includes: Acquire a feature vector expression according to the value range of the vector elements of the feature vector represented by the target optimization function, and acquire a feature value expression according to the value range of the feature value represented by the target optimization function, wherein the feature value expression is used to represent the conversion relationship between the feature value of the reference form and the feature value of the target form represented by the probability bit, and the feature vector expression is used to represent the conversion relationship between the feature vector of the reference form and the feature vector of the target form represented by the probability bit, and the target conversion relationship includes the feature value expression and the feature vector expression; Substitute the eigenvalue expression and the eigenvector expression into the target optimization function to obtain the probability energy function.

3. The method according to claim 2, characterized in that The step of obtaining the eigenvalue expression and the eigenvector expression according to the value range of the eigenvalue represented by the target optimization function includes: Call the function corresponding to the value range of the eigenvalue in the following function as the eigenvalue expression: , in, is a characteristic value, and the probability bits include: and , T is The number of digits taken, M is The number of digits taken; The step of obtaining a feature vector expression according to the value range of the vector element of the feature vector represented by the target optimization function includes: The function corresponding to the value range of the vector elements of the feature vector in the following function is called as the feature vector expression: , in, is the n-dimensional feature vector The j-th element in , the probability bits include: and , S is The number of digits taken, G is The number of digits taken.

4. The method according to claim 1, characterized in that: The detecting a target bit state of the probability energy function comprises: Detecting a probability parameter curve of a target probability bit included in the probability energy function, wherein the probability parameter curve is used to indicate a situation in which the energy of the probability energy function decreases with a change in the target probability bit; Acquire a plurality of spare bit states according to the probability parameter curve, wherein each of the spare bit states is a bit state exhibited by the target probability bit at different times; According to the state probability of each of the spare bit states, the target bit states of the first target number arranged in descending order of state probability are screened out from the multiple spare bit states, wherein the state probability is used to indicate the proportion of the number of occurrences of the corresponding spare bit state to the number of occurrences of the multiple spare bit states.

5. The method according to claim 4, characterized in that The acquiring a plurality of spare bit states according to the probability parameter curve comprises: A bit state of the target probability bit is randomly generated as the initial current bit state, and the following steps are repeatedly performed until the number of times the plurality of spare bit states are detected reaches the number of iterations, or the number of times the same bit state is continuously detected reaches the stable number of times: Detecting a target parameter value corresponding to the current bit state on the probability parameter curve; Generating a reference bit state as a standby bit state according to the target parameter value; When the number of the plurality of standby bit states does not reach the iteration number, or the number of times the same bit state is continuously detected does not reach the stable number, the reference bit state is determined as the next current bit state.

6. The method according to claim 5, characterized in that The detecting a target parameter value corresponding to the current bit state on the probability parameter curve includes: Detecting the target parameter value corresponding to the current bit state on the probability parameter curve by a classical computer; The step of generating a reference bit state according to the target parameter value as a standby bit state includes: Sending the target parameter value to a probabilistic computer through the classical computer, wherein the probabilistic computer is used to generate a reference bit state according to the target parameter value, and sending the reference bit state to the classical computer; determining the reference bit state as one of the spare bit states through the classical computer; or, The reference bit state is generated as a spare bit state by the classical computer according to the target parameter value and the random value.

7. The method according to claim 6, characterized in that The step of generating a reference bit state according to the target parameter value and the random value as a standby bit state includes: The reference bit state is generated by the following formula: m=sgn{rand(-1,1)+tanh[I]}, Among them, m is the reference bit state, I is the parameter value, rand(-1, +1) is used to randomly generate a value greater than -1 and less than 1, tanh is the hyperbolic tangent function, sgn{x>0}=1 and sgn{x<0 or x=0}=0.

8. The method according to claim 4, characterized in that The step of selecting the target bit states of the first target number arranged in descending order of state probability from the plurality of spare bit states according to the state probability of each spare bit state comprises: Filter out the state probabilities that are in the aforementioned target number in the probability sorting from the plurality of state probabilities to obtain the target state probability, wherein the target number is the data dimension of the reference data, and the probability sorting is used to arrange the plurality of state probabilities in descending order; The spare bit state corresponding to the target state probability is determined as the target bit state.

9. The method according to claim 1, characterized in that: The step of solving the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues ​​according to the target bit state and the target conversion relationship includes: Setting the state of the probability bit in the target conversion relationship to the target bit state; Calculate the eigenvalues ​​of the covariance matrix corresponding to the reference data in the target bit state and the eigenvectors corresponding to the eigenvalues.

10. The method according to claim 1, characterized in that The step of establishing a target optimization function corresponding to the reference data to be converted includes: Establishing a covariance matrix of the reference data; The target optimization function is established according to the mathematical relationship between the eigenvalues ​​and eigenvectors of the covariance matrix of the reference data.

11. The method according to claim 10, characterized in that The objective optimization function is established according to the mathematical relationship between the eigenvalues ​​and eigenvectors of the covariance matrix of the reference data, comprising: The objective optimization function is established by the following formula: , in, The eigenvalues ​​of the covariance matrix representing the reference data, The eigenvector of the covariance matrix used to represent the reference data, S t is the covariance matrix, the data dimension of the reference data is n, || || is the vector 2-norm, and arg min() is used to solve the value of the independent variable that minimizes the value of the function.

12. A data conversion device, characterized in that: include: An establishment module is used to establish a target optimization function corresponding to the reference data to be converted, wherein the reference data is original image data from the field of image processing, and the target optimization function is used to solve the eigenvalues ​​of the covariance matrix corresponding to the reference data and the eigenvectors corresponding to the eigenvalues; A first conversion module, configured to convert the target optimization function into a probability energy function according to a target conversion relationship, wherein the target conversion relationship is used to indicate a manner in which eigenvalues ​​and eigenvectors are represented by probability bits; A detection module, used to detect a target bit state of the probability energy function, wherein the target bit state is a probability bit state corresponding to a minimum energy of the probability energy function; A solution module, used for solving the eigenvalue of the covariance matrix corresponding to the reference data and the eigenvector corresponding to the eigenvalue according to the target bit state and the target conversion relationship, to obtain the target eigenvalue and the target eigenvector corresponding to the target eigenvalue; The second conversion module is used to convert the reference data according to the target feature value and the target feature vector to obtain target data, wherein the data dimension of the target data is lower than the data dimension of the reference data.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 11 when executed by a processor.

14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 11 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Data processing method and device, equipment and storage medium

    CN114723317A

  • Quantum principal component analysis method and device and quantum computer operating system

    CN115618956A