A data processing method, device, computer equipment and storage medium
By obtaining data attribute information and feature values, extracting the data to be processed, and determining the data state according to the preset matching algorithm, the problem of inefficient data processing in the prior art is solved, and more efficient data processing is achieved.
Patent Information
- Application Number
- CN202111562134.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-12-20
AI Technical Summary
The existing data processing methods cannot process only selected data in a targeted manner, resulting in inefficient data processing.
By obtaining data attribute information in the data set, determining the characteristic value of the data, extracting the to-process data, determining the data state according to the preset matching algorithm, and processing the to-process data according to the target processing method and data state.
The processing of all data in the data set is reduced, and the targeted and efficient data processing is improved.
Smart Images

Figure CN114239028B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular, relates to a data processing method, device, computer equipment and computer-readable storage medium. Background Art
[0002] With the rapid development of the Internet, each platform acquires massive amounts of data every day, and needs to process the massive amounts of data according to corresponding business requirements. The existing data processing methods usually classify the massive amounts of data first, obtain multiple data tables, and then process the selected data tables. However, when only the selected data in a data table needs to be processed, the existing data processing methods will still process all the data in the data table, increasing the workload. In other words, the existing data processing methods cannot process only the selected data in a targeted manner, resulting in low data processing efficiency. Summary of the invention
[0003] The embodiments of the present application provide a data processing method, apparatus, computer device and computer-readable storage medium, which can solve the problem in the prior art that only important data in a selected data table can be processed in a targeted manner, resulting in low data processing efficiency.
[0004] In a first aspect, an embodiment of the present application provides a data processing method, including:
[0005] Acquire a first data set; the first data set includes a plurality of data; each data carries data attribute information;
[0006] Determine a characteristic value of each piece of data according to data attribute information of each piece of data in the first data set;
[0007] Extracting the data to be processed in the first data set according to the characteristic values of the respective pieces of data;
[0008] Determine the data status of the data to be processed according to a preset matching algorithm;
[0009] A target processing method of the data to be processed is acquired, and the data to be processed is processed according to the target processing method and the data state of the data to be processed to obtain target data.
[0010] Optionally, obtaining the first data set includes:
[0011] Obtain a data table; each data item in the data table carries a data identifier;
[0012] The first data set is extracted according to the data identifier.
[0013] Optionally, the preset matching algorithm is a regular expression matching algorithm; the data state includes an encrypted state and an unencrypted state; and determining the data state of the to-be-processed data according to the preset matching algorithm includes:
[0014] Detecting the data to be processed according to the regular expression matching algorithm to obtain a detection result of the data to be processed;
[0015] When it is detected that the detection result is a first detection result, determining that the data state of the data to be processed is the encrypted state; the first detection result is used to describe that the data to be processed includes characters and numbers of a preset number of digits;
[0016] When it is detected that the detection result is a second detection result, it is determined that the data state of the data to be processed is the unencrypted state; the second detection result is used to describe that the data to be processed does not contain characters and numbers of the preset number of digits.
[0017] Optionally, the target processing method is encryption; the acquiring the target processing method of the data to be processed, and processing the data to be processed according to the target processing method and the data state of the data to be processed to obtain the target data, includes:
[0018] When it is detected that the data state is an unencrypted state, encrypting the data to be processed according to a preset encryption algorithm to obtain the target data;
[0019] When it is detected that the data state is in an encrypted state, the data to be processed is determined as the target data.
[0020] Optionally, when it is detected that the data state is in an unencrypted state, encrypting the data to be processed according to a preset encryption algorithm to obtain the target data includes:
[0021] Determining the encryption priority of the data to be processed according to the characteristic value of the data to be processed;
[0022] Determining a target encryption algorithm corresponding to the data to be processed according to the encryption priority;
[0023] The data to be processed is encrypted according to the target encryption algorithm to obtain the target data.
[0024] Optionally, the target processing method is decryption; the acquiring the target processing method of the data to be processed, and processing the data to be processed according to the target processing method and the data state of the data to be processed to obtain the target data, includes:
[0025] When it is detected that the data state is in an encrypted state, decrypting the data to be processed according to a preset decryption algorithm corresponding to the preset encryption algorithm to obtain the target data;
[0026] When it is detected that the data state is an unencrypted state, the data to be processed is determined as the target data.
[0027] Optionally, when it is detected that the data state is in an encrypted state, decrypting the data to be processed according to a preset decryption algorithm corresponding to the preset encryption algorithm to obtain the target data includes:
[0028] Determining the decryption priority of the data to be processed according to the characteristic value of the data to be processed;
[0029] Determining a target decryption algorithm corresponding to the data to be processed according to the decryption priority;
[0030] The data to be processed is decrypted according to the target decryption algorithm to obtain the target data.
[0031] In a second aspect, an embodiment of the present application provides a data processing device, including:
[0032] A first acquisition unit is used to acquire a first data set; the first data set includes a plurality of data; each data carries data attribute information;
[0033] a characteristic value determining unit, configured to determine a characteristic value of each piece of data according to data attribute information of each piece of data in the first data set;
[0034] An extraction unit, configured to extract the data to be processed in the first data set according to the feature values of the respective data pieces;
[0035] A state determination unit, used to determine the data state of the to-be-processed data according to a preset matching algorithm;
[0036] The data processing unit is used to obtain a target processing method for the data to be processed, and process the data to be processed according to the target processing method and the data state of the data to be processed to obtain target data.
[0037] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the data processing method as described in any one of the first aspects are implemented.
[0038] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data processing method as described in any one of the first aspects above are implemented.
[0039] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on a computer device, the computer device can execute the data processing method described in any one of the first aspects above.
[0040] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0041] A data processing method provided by an embodiment of the present application can determine the characteristic value of each piece of data through the data attribute information carried by each piece of data in the first data set obtained, and can accurately extract the data to be processed that needs to be processed in the first data set according to the characteristic value of each piece of data, so that there is no need to process all the data in the first data set, reducing the workload; then determine the data state of the data to be processed by a preset matching algorithm; finally, determine the processing method of the data to be processed according to the obtained processing information, and perform corresponding processing on the data to be processed in a targeted manner according to the data state of the data to be processed and the above-mentioned processing method, so as to obtain the target data. In other words, the data processing method provided by the embodiment of the present application not only reduces the workload, but also, when processing the data to be processed, although the corresponding processing method has been determined, its specific processing process can still be flexibly changed according to the data state of the data to be processed, thereby improving the data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 is a flowchart of a data processing method according to an embodiment of the present application;
[0044] Figure 2 is a flowchart of a data processing method according to another embodiment of the present invention;
[0045] Figure 3 is a flow chart of a data processing method according to another embodiment of the present application;
[0046] Figure 4is a flow chart of a data processing method according to another embodiment of the present application;
[0047] Figure 5 is a flow chart of a data processing method according to another embodiment of the present application;
[0048] Figure 6 is a structural diagram of a data processing device provided by an embodiment of the present application;
[0049] Figure 7 It is a structural diagram of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0050] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0051] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0052] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0053] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0054] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0055] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0056] See also Figure 1 , Figure 1 1 is a flowchart of the implementation of the data processing method provided in one embodiment of the present application. The execution subject of the data processing method provided in one embodiment of the present application is a computer device. The computer device may be a terminal device or a server. The terminal device may be a smart phone, a tablet computer or a desktop computer, etc.
[0057] like Figure 1 As shown, the data processing method provided in an embodiment of the present application may include S101 to S105, which are described in detail as follows:
[0058] In S101, a first data set is obtained; the first data set includes a plurality of data; each data carries data attribute information.
[0059] In actual applications, when a user needs to process certain data, he can send a data processing request to a computer device.
[0060] In the embodiment of the present application, the computer device detects that the user has sent a data processing request by: detecting that the user has opened a preset APP or detecting that the user has performed a preset operation in the preset APP. Among them, the preset operation can be determined according to actual needs and is not limited here. Exemplarily, the preset operation can be clicking a preset control, that is, if the computer device detects that the user clicks a preset control in a preset APP, it is considered that the user has performed the preset operation, that is, it is considered that the user has sent a data processing request.
[0061] In one implementation of the embodiment of the present application, the computer device may obtain the first data set from other devices in advance and store it. When the computer device detects a data processing request, it may directly obtain the first data set from itself. The other device may be a data acquisition device.
[0062] In another implementation of the embodiment of the present application, the computer device may also obtain the first data set in real time from a server connected to it by wireless or wired communication. The server may be a desktop computer, a notebook or other device, or a cloud server.
[0063] In one embodiment of the present application, the computer device may obtain the first data set by the following steps, which are described in detail as follows:
[0064] Obtain a data table; each data item in the data table carries a data identifier;
[0065] The first data set is extracted according to the data identifier.
[0066] It should be noted that different data identifiers may correspond to different data processing states. The data identifiers may be represented by letters, including but not limited to A and B. The data processing states include but are not limited to processed states and unprocessed states. Exemplarily, the computer device may set the data processing state corresponding to the data identifier A to the processed state, and set the data processing state corresponding to the data identifier B to the unprocessed state.
[0067] In this embodiment, after acquiring the data table, the computer device may extract the data identifier of each data in the data table to obtain a first data set consisting of all data corresponding to the data identifier B.
[0068] In the embodiment of the present application, the data attribute information of each piece of data in the first data set includes but is not limited to: user information, vehicle information, business information, other information and special information, etc. Among them, user information includes but is not limited to: user name, mobile phone number and ID number, etc., vehicle information includes but is not limited to: license plate number and frame number, etc., business information includes but is not limited to: business type, business time and business amount, etc. Special information refers to information set by the user that needs to be processed, which can be user information, vehicle information, business information or other information.
[0069] In S102, a characteristic value of each piece of data in the first data set is determined according to data attribute information of each piece of data.
[0070] In the embodiment of the present application, after acquiring the first data set, the computer device may determine the characteristic value of each piece of data in the first data set in order to accurately determine the data to be processed.
[0071] It should be noted that different data attribute information of data may correspond to different characteristic values.
[0072] The characteristic values include, but are not limited to, a first characteristic value, a second characteristic value, a third characteristic value, a fourth characteristic value, and a fifth characteristic value. For example, the computer device may set the characteristic value corresponding to the user information to be the first characteristic value, the characteristic value corresponding to the vehicle information to be the second characteristic value, the characteristic value corresponding to the business information to be the third characteristic value, the characteristic value corresponding to other information to be the fourth characteristic value, and the characteristic value corresponding to the special information to be the fifth characteristic value.
[0073] It should be noted that the eigenvalues can be represented by numbers. For example, the number corresponding to the first eigenvalue can be set to 1, the number corresponding to the second eigenvalue can be set to 2, the number corresponding to the third eigenvalue can be set to 3, the number corresponding to the fourth eigenvalue can be set to 4, and the number corresponding to the fifth eigenvalue can be set to 5.
[0074] Therefore, in this embodiment, when the computer device detects that the data attribute information of a certain piece of data is user information, it can determine that the characteristic value of the data is the first characteristic value, that is, the number 1; when the computer device detects that the data attribute information of a certain piece of data is vehicle information, it can determine that the characteristic value of the data is the second characteristic value, that is, the number 2; when the computer device detects that the data attribute information of a certain piece of data is business information, it can determine that the characteristic value of the data is the third characteristic value, that is, the number 3; when the computer device detects that the data attribute information of a certain piece of data is other information, it can determine that the characteristic value of the data is the fourth characteristic value, that is, the number 4; when the computer device detects that the data attribute information of a certain piece of data is special information, it can determine that the characteristic value of the data is the fifth characteristic value, that is, the number 5.
[0075] In S103, the data to be processed in the first data set is extracted according to the feature values of the respective pieces of data.
[0076] In the embodiment of the present application, in combination with S101, the computer device may determine data with the first characteristic value, the second characteristic value, and the fifth characteristic value as data to be processed. That is, when the computer device detects that there are data with the characteristic values of number 1, number 2, and number 3 in the first data set, the computer device may determine the data as data to be processed.
[0077] In S104, the data state of the data to be processed is determined according to a preset matching algorithm.
[0078] In the embodiment of the present application, data status includes but is not limited to: an encrypted state and an unencrypted state.
[0079] The preset matching algorithm can be determined according to actual needs, and is not limited here. For example, the preset matching algorithm can be a regular expression matching algorithm or a string matching algorithm (KMP algorithm). Among them, a regular expression, also known as a regular expression, is a logical formula for string operations, that is, using some pre-defined specific characters and combinations of these specific characters to form a "regular string".
[0080] Since when the data state of the data to be processed is in an encrypted state, the data to be processed usually consists of characters and numbers of a preset number of digits, therefore, in one embodiment of the present application, the computer device can detect the data to be processed one by one according to the regular expression, obtain the detection result, and determine the data state of the data to be processed according to the detection result. The preset number of digits can be determined according to actual needs and is not limited here.
[0081] It should be noted that the detection result includes a first detection result and a second detection result. The first detection result is used to describe that the data to be processed is in an encrypted state, and the second detection result is used to describe that the data to be processed is in an unencrypted state.
[0082] In this embodiment, when the computer device detects through a regular expression that a certain data to be processed has characters and numbers with a preset number of digits, it can determine that the detection result of the data to be processed is the first detection result, that is, the data to be processed is in an encrypted state.
[0083] When the computer device detects through a regular expression that a certain data to be processed does not have characters and numbers with a preset number of digits, it can determine that the detection result of the data to be processed is the second detection result, that is, the data to be processed is in an unencrypted state.
[0084] In S105, a target processing method of the data to be processed is obtained, and the data to be processed is processed according to the target processing method and the data state of the data to be processed to obtain target data.
[0085] It should be noted that the computer device may pre-store preset processing methods for the data to be processed, wherein the preset processing methods include but are not limited to: encryption and decryption.
[0086] In one embodiment of the present application, after determining the data status of the data to be processed, the computer device may determine a target processing method for the data to be processed according to a preset rule.
[0087] The preset rule may be: when processing information exists, the target processing method of the data to be processed is determined according to the processing information; when processing information does not exist, the preset processing method is directly determined as the target processing method. The processing information is obtained by user input.
[0088] In one implementation of this embodiment, a plurality of preset buttons may be set in a preset APP related to data processing in a computer device, and each preset button corresponds to a preset processing method. For example, assuming that the computer device is provided with a preset button A1 and a preset button A2, and the preset processing methods include encryption and decryption, the computer device may set the preset processing method corresponding to the preset button A1 to encryption, and set the preset processing method corresponding to the preset button A2 to decryption.
[0089] Based on this, when the computer device detects that the user clicks a preset button on a preset APP, it can determine that the processing information input by the user is detected. Therefore, the computer device can determine the target processing method of the data to be processed based on the processing information.
[0090] In another implementation of this embodiment, the user can also directly input processing information, that is, "encryption" or "decryption", on the display interface of the preset APP.
[0091] In one embodiment of the present application, after the computer device determines the target processing method of the data to be processed, since the target processing method of the data to be processed can be encryption or decryption, when the computer device determines that the target processing method of the data to be processed is encryption, the computer device can specifically perform the following steps: Figure 2 Steps S201 to S202 shown in the figure process the data to be processed, which are described in detail as follows:
[0092] In S201, when it is detected that the data state is an unencrypted state, the data to be processed is encrypted according to a preset encryption algorithm to obtain target data.
[0093] In S202, when it is detected that the data state is in an encrypted state, the data to be processed is determined as the target data.
[0094] In this embodiment, the computer device can determine whether to encrypt the data to be processed according to the data state of the data to be processed. Specifically, when the computer device detects that the data state of the data to be processed is unencrypted, it indicates that the data to be processed needs to be encrypted. Therefore, the computer device can encrypt the data to be processed according to a preset encryption algorithm, and determine the encrypted data to be processed as the target data. When the computer device detects that the data state of the data to be processed is encrypted, in order to reduce the pressure of the computer device, improve the processing efficiency of the computer device, and avoid duplication of work, the computer device may not perform any processing on the data to be processed, and directly determine the data to be processed as the target data.
[0095] The preset encryption algorithm can be determined according to actual needs and is not limited here. The preset encryption algorithm can be a symmetric encryption algorithm, such as the Data Encryption Standard (DES) algorithm. Among them, a symmetric encryption algorithm refers to an algorithm that uses the same key for encryption and decryption, and the key refers to a string of numbers, letters or special symbols. The preset encryption algorithm can also be an asymmetric encryption algorithm, such as the RSA algorithm.
[0096] In another embodiment of the present application, in order to improve the data security of the data to be processed, the computer device can specifically Figure 3 Steps S301 to S303 shown in the figure encrypt the data to be processed, which are described in detail as follows:
[0097] In S301, the encryption priority of the data to be processed is determined according to the characteristic value of the data to be processed.
[0098] In S302, a target encryption algorithm corresponding to the data to be processed is determined according to the encryption priority.
[0099] In S303, the data to be processed is encrypted according to the target encryption algorithm.
[0100] In this embodiment, the computer device can pre-store the correspondence between different characteristic values and preset encryption priorities. Therefore, the computer device can determine the encryption priority of the data to be processed based on the characteristic values of the data to be processed and the correspondence between different characteristic values and preset encryption priorities.
[0101] At the same time, the computer device may also pre-store the correspondence between different preset encryption priorities and different preset encryption algorithms. The higher the preset encryption priority, the higher the level of the corresponding preset encryption algorithm. For example, if the preset encryption priority is the first priority, the corresponding preset encryption algorithm may be a data digest algorithm; if the preset encryption priority is the second priority, the corresponding preset encryption algorithm may be an asymmetric encryption algorithm; if the preset encryption priority is the third priority, the corresponding preset encryption algorithm may be a symmetric encryption algorithm.
[0102] In actual applications, the degree of harm caused by the leakage of different data is different. For example, the degree of harm caused by the leakage of data attribute information that is user information is much greater than the leakage of data attribute information that is vehicle information. At the same time, since the data attribute information is special information, which is data set by the user and needs to be processed accordingly, therefore, in combination with S101, the computer device can set the encryption priority of the data with the characteristic value of the first characteristic value to be higher than the encryption priority of the data with the characteristic value of the second characteristic value and the characteristic value of the fifth characteristic value, and set the encryption priority of the data with the characteristic value of the fifth characteristic value to be higher than the encryption priority of the data with the characteristic value of the second characteristic value. In other words, the encryption priority of user information is higher than the encryption priority of vehicle information and special information, and the encryption priority of special information is higher than the encryption priority of vehicle information.
[0103] It can be understood that the encryption priority of data with the first characteristic value is the first priority, the encryption priority of data with the fifth characteristic value is the second priority, and the encryption priority of data with the second characteristic value is the third priority.
[0104] Based on this, the computer device can determine that the target encryption algorithm corresponding to the data to be processed whose characteristic value is the first characteristic value is a data digest algorithm, and encrypt the data to be processed according to the data digest algorithm, that is, the computer device can encrypt user information according to the data digest algorithm.
[0105] The computer device can determine that the target encryption algorithm corresponding to the data to be processed whose characteristic value is the fifth characteristic value is an asymmetric encryption algorithm, and encrypt the data to be processed according to the asymmetric encryption algorithm, that is, the computer device can encrypt special information according to the asymmetric encryption algorithm.
[0106] The computer device can determine that the data to be processed has a characteristic value as the second characteristic value, and its corresponding target encryption algorithm is a symmetric encryption algorithm, and encrypts the data to be processed according to the symmetric encryption algorithm, that is, the computer device can encrypt the vehicle information according to the symmetric encryption algorithm.
[0107] In another embodiment of the present application, when the computer device determines that the target processing method of the data to be processed is decryption, the computer device may specifically perform the following steps: Figure 4 Steps S401 to S402 shown in the figure process the data to be processed, which are described in detail as follows:
[0108] In S401, when it is detected that the data state is an encrypted state, the data to be processed is decrypted according to a preset decryption algorithm corresponding to the preset encryption algorithm to obtain the target data.
[0109] In S402, when it is detected that the data state is an unencrypted state, the data to be processed is determined as the target data.
[0110] In this embodiment, the computer device can determine whether to decrypt the data to be processed according to the data state of the data to be processed. Specifically, when the computer device detects that the data state of the data to be processed is an encrypted state, it indicates that the data to be processed needs to continue to be decrypted. Therefore, the computer device can decrypt the data to be processed according to a preset decryption algorithm corresponding to the preset encryption algorithm. When the computer device detects that the data state of the data to be processed is an unencrypted state, it indicates that the data to be processed is plaintext data. Therefore, the computer device does not need to decrypt the data to be processed and directly determines the data to be processed as the target data.
[0111] In another embodiment of the present application, in combination with S301 to S303, in order to improve the success rate of decryption of the data to be processed, the computer device can specifically perform the following steps: Figure 5 Steps S501 to S503 shown in the figure are used to decrypt the data to be processed, as described in detail as follows:
[0112] In S501, the decryption priority of the data to be processed is determined according to the characteristic value of the data to be processed.
[0113] In S502, a target decryption algorithm corresponding to the data to be processed is determined according to the decryption priority.
[0114] In S503, the data to be processed is decrypted according to the target decryption algorithm.
[0115] In this embodiment, the computer device may pre-store the correspondence between different characteristic values and preset decryption priorities. Therefore, the computer device may determine the decryption priority of the data to be processed based on the characteristic value of the data to be processed and the correspondence between the characteristic value and the preset decryption priority.
[0116] At the same time, the computer device may also pre-store the correspondence between different preset decryption priorities and different preset decryption algorithms. The higher the preset decryption priority, the higher the level of the corresponding preset decryption algorithm. For example, if the preset decryption priority is the first priority, the corresponding preset decryption algorithm may be a data summary algorithm; if the preset decryption priority is the second priority, the corresponding preset decryption algorithm may be an asymmetric decryption algorithm; if the preset decryption priority is the third priority, the corresponding preset decryption algorithm may be a symmetric decryption algorithm. The asymmetric decryption algorithm corresponds to the asymmetric encryption algorithm, and the symmetric decryption algorithm corresponds to the symmetric encryption algorithm.
[0117] It should be noted that the decryption priority of the data to be processed may correspond to the encryption priority of the data to be processed. That is, when the encryption priority of a certain data to be processed is the first priority, the decryption priority of the data to be processed is also the first priority; when the encryption priority of a certain data to be processed is the second priority, the decryption priority of the data to be processed is also the second priority; when the encryption priority of a certain data to be processed is the third priority, the decryption priority of the data to be processed is also the third priority.
[0118] Therefore, in combination with S301 to S303, the computer device can determine that the decryption priority of the data with the characteristic value of the first characteristic value is higher than the decryption priority of the data with the characteristic value of the second characteristic value and the characteristic value of the fifth characteristic value, and determine that the decryption priority of the data with the characteristic value of the fifth characteristic value is higher than the decryption priority of the data with the characteristic value of the second characteristic value. In other words, the decryption priority of the user information is higher than the decryption priority of the vehicle information and the special information, and the decryption priority of the special information is higher than the decryption priority of the vehicle information.
[0119] It can be understood that the computer device can determine that the decryption priority of data with the first characteristic value is the first priority, the decryption priority of data with the fifth characteristic value is the second priority, and the decryption priority of data with the second characteristic value is the third priority.
[0120] Based on this, the computer device can determine that the data to be processed has a characteristic value of the first characteristic value, and its corresponding target decryption algorithm is the data summary algorithm, and decrypt the data to be processed according to the data summary algorithm, that is, the computer device can decrypt user information according to the data summary algorithm.
[0121] The computer device can determine that the data to be processed has a characteristic value of the fifth characteristic value, and its corresponding target decryption algorithm is an asymmetric decryption algorithm, and decrypt the data to be processed according to the asymmetric decryption algorithm, that is, the computer device can decrypt special information according to the asymmetric decryption algorithm.
[0122] The computer device can determine that the data to be processed has a characteristic value as the second characteristic value, and its corresponding target decryption algorithm is a symmetric decryption algorithm, and decrypts the data to be processed according to the symmetric decryption algorithm, that is, the computer device can decrypt the vehicle information according to the symmetric decryption algorithm.
[0123] From the above, it can be seen that a data processing method provided by an embodiment of the present application can determine the characteristic value of each piece of data through the data attribute information carried by each piece of data in the first data set obtained, and can accurately extract the data to be processed that needs to be processed in the first data set according to the characteristic value of each piece of data, without having to process all the data in the first data set, thereby reducing the workload; then determine the data state of the data to be processed by a preset matching algorithm; finally, determine the processing method of the data to be processed according to the obtained processing information, and perform corresponding processing on the data to be processed in a targeted manner according to the data state of the data to be processed and the above processing method, thereby obtaining the target data. In other words, the data processing method provided by an embodiment of the present application not only reduces the workload, but also, when processing the data to be processed, although the corresponding processing method has been determined, its specific processing process can still be flexibly changed according to the data state of the data to be processed, thereby improving the data processing efficiency.
[0124] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0125] Corresponding to a data processing method described in the above embodiment, Figure 6 The structure block diagram of the data processing device provided by an embodiment of the present application is shown. For the convenience of description, only the part related to the embodiment of the present application is shown. Figure 6 The data processing device 600 includes: a first acquisition unit 61, a feature value determination unit 62, an extraction unit 63, a state determination unit 64 and a data processing determination unit 65. Among them:
[0126] The first acquisition unit 61 is used to acquire a first data set; the first data set includes multiple pieces of data; each piece of data carries data attribute information.
[0127] The feature value determination unit 62 is used to determine the feature value of each piece of data in the first data set according to the data attribute information of each piece of data.
[0128] The extraction unit 63 is used to extract the data to be processed in the first data set according to the feature values of the data.
[0129] The state determination unit 64 is used to determine the data state of the to-be-processed data according to a preset matching algorithm.
[0130] The data processing unit 65 is used to obtain a target processing method of the data to be processed, and process the data to be processed according to the target processing method and the data state of the data to be processed to obtain target data.
[0131] In one embodiment of the present application, the first acquisition unit 61 specifically includes: a second acquisition unit and a data determination unit. Among them:
[0132] The second acquisition unit is used to acquire a data table; each data item in the data table carries a data identifier.
[0133] The data determination unit is used to extract the first data set according to the data identifier.
[0134] In one embodiment of the present application, the state determination unit 64 specifically includes: a detection unit, an encrypted state determination unit and an unencrypted state determination unit. Among them:
[0135] Detecting the data to be processed according to the regular expression matching algorithm to obtain a detection result of the data to be processed;
[0136] When it is detected that the detection result is a first detection result, determining that the data state of the data to be processed is the encrypted state; the first detection result is used to describe that the data to be processed includes characters and numbers of a preset number of digits;
[0137] When it is detected that the detection result is a second detection result, it is determined that the data state of the data to be processed is the unencrypted state; the second detection result is used to describe that the data to be processed does not contain characters and numbers of the preset number of digits.
[0138] In one embodiment of the present application, the target processing method is encryption; the data processing unit 64 specifically includes: a first encryption unit and a first target data determination unit. Among them:
[0139] The first encryption unit is used to encrypt the data to be processed according to a preset encryption algorithm to obtain the target data when it is detected that the data state is an unencrypted state.
[0140] The first target data determination unit is used to determine the data to be processed as the target data when it is detected that the data state is an encrypted state.
[0141] In one embodiment of the present application, the first encryption unit specifically includes: an encryption priority determination unit, an encryption algorithm determination unit, and a second encryption unit. Among them:
[0142] The encryption priority determination unit is used to determine the encryption priority of the data to be processed according to the characteristic value of the data to be processed.
[0143] The encryption algorithm determination unit is used to determine the target encryption algorithm corresponding to the data to be processed according to the encryption priority.
[0144] The second encryption unit is used to encrypt the data to be processed according to the target encryption algorithm to obtain the target data.
[0145] In one embodiment of the present application, the target processing method is decryption; the data processing unit 64 specifically includes: a first decryption unit and a second target data determination unit. Among them:
[0146] The first decryption unit is used to decrypt the data to be processed according to a preset decryption algorithm corresponding to the preset encryption algorithm to obtain the target data when it is detected that the data state is an encrypted state.
[0147] The second target data determination unit is used to determine the data to be processed as the target data when it is detected that the data state is an unencrypted state.
[0148] In one embodiment of the present application, the first decryption unit specifically includes: a decryption priority determination unit, a decryption algorithm determination unit and a second decryption unit. Among them:
[0149] The decryption priority determination unit is used to determine the decryption priority of the data to be processed according to the characteristic value of the data to be processed.
[0150] The decryption algorithm determination unit is used to determine the target decryption algorithm corresponding to the data to be processed according to the decryption priority.
[0151] The second decryption unit is used to decrypt the data to be processed according to the target decryption algorithm to obtain the target data.
[0152] From the above, it can be seen that a data processing device provided by an embodiment of the present application can determine the characteristic value of each piece of data by acquiring the data attribute information carried by each piece of data in the first data set, and can accurately extract the data to be processed that needs to be processed in the first data set according to the characteristic value of each piece of data, without having to process all the data in the first data set, thereby reducing the workload; then determine the data state of the data to be processed by a preset matching algorithm; finally, determine the processing method of the data to be processed according to the acquired processing information, and perform corresponding processing on the data to be processed in a targeted manner according to the data state of the data to be processed and the above processing method, thereby obtaining the target data. In other words, the data processing method provided by the embodiment of the present application not only reduces the workload, but also, when processing the data to be processed, although the corresponding processing method has been determined, its specific processing process can still be flexibly changed according to the data state of the data to be processed, thereby improving the data processing efficiency.
[0153] Figure 7 This is a schematic diagram of the structure of a computer device provided in one embodiment of the present application. Figure 7As shown, the computer device 7 of this embodiment includes: at least one processor 70 ( Figure 7 Only one is shown in the figure) a processor, a memory 71, and a computer program 72 stored in the memory 71 and executable on the at least one processor 70, and when the processor 70 executes the computer program 72, the steps in any one of the above-mentioned data processing method embodiments are implemented.
[0154] Those skilled in the art will understand that Figure 7 It is only an example of the computer device 7 and does not constitute a limitation on the computer device 7. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0155] The processor 70 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0156] In some embodiments, the memory 71 may be an internal storage unit of the computer device 7, such as a hard disk or memory of the computer device 7. In other embodiments, the memory 71 may also be an external storage device of the computer device 7, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the computer device 7. The memory 71 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 71 may also be used to temporarily store data that has been output or is to be output.
[0157] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any one of the above data processing method embodiments can be implemented.
[0158] An embodiment of the present application provides a computer program product. When the computer program product runs on a computer device, the computer device can implement the steps of any of the above data processing method embodiments when executing the computer device.
[0159] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0160] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any one of the above data processing method embodiments can be implemented.
[0161] An embodiment of the present application provides a computer program product. When the computer program product is run on a computer device, the computer device can implement the steps in any of the above data processing method embodiments when executing the computer program product.
[0162] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0163] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0164] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0165] In the embodiments provided in the present application, it should be understood that the disclosed data processing apparatus and method can be implemented in other ways. For example, the apparatus / computer equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of the apparatus or unit, which can be electrical, mechanical or other forms.
[0166] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0167] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A data processing method, characterized in that: include: Acquire a first data set; the first data set includes a plurality of data; each data carries data attribute information; Determine a characteristic value of each piece of data according to data attribute information of each piece of data in the first data set, where different data attribute information corresponds to different characteristic values; Extracting the data to be processed in the first data set according to the characteristic values of the respective pieces of data; Determine the data status of the data to be processed according to a preset matching algorithm; Acquiring a target processing method of the data to be processed, and processing the data to be processed according to the target processing method and the data state of the data to be processed to obtain target data; The obtaining of the first data set includes: Obtain a data table; each data in the data table carries a data identifier, and different data identifiers correspond to different data processing states, and the data processing states include a processed state and an unprocessed state; extracting the first data set according to the data identifier; Wherein, the preset matching algorithm is a regular expression matching algorithm; the data state includes an encrypted state and an unencrypted state; and determining the data state of the to-be-processed data according to the preset matching algorithm includes: Detecting the data to be processed according to the regular expression matching algorithm to obtain a detection result of the data to be processed; When it is detected that the detection result is a first detection result, it is determined that the data state of the data to be processed is the encrypted state; the first detection result is used to describe that the data to be processed includes characters and numbers with a preset number of digits.
2. The data processing method according to claim 1, characterized in that: When it is detected that the detection result is a second detection result, it is determined that the data state of the data to be processed is the unencrypted state; the second detection result is used to describe that the data to be processed does not contain characters and numbers of the preset number of digits.
3. The data processing method according to any one of claims 1 to 2, characterized in that: The target processing method is encryption; the obtaining of the target processing method of the data to be processed, and processing the data to be processed according to the target processing method and the data state of the data to be processed to obtain the target data, including: When it is detected that the data state is an unencrypted state, encrypting the data to be processed according to a preset encryption algorithm to obtain the target data; When it is detected that the data state is in an encrypted state, the data to be processed is determined as the target data.
4. The data processing method according to claim 3, characterized in that: When it is detected that the data state is in an unencrypted state, encrypting the data to be processed according to a preset encryption algorithm to obtain the target data includes: Determining the encryption priority of the data to be processed according to the characteristic value of the data to be processed; Determining a target encryption algorithm corresponding to the data to be processed according to the encryption priority; The data to be processed is encrypted according to the target encryption algorithm to obtain the target data.
5. The data processing method according to any one of claims 1 to 2, characterized in that: The target processing method is decryption; the target processing method of the data to be processed is obtained, and the data to be processed is processed according to the target processing method and the data state of the data to be processed to obtain the target data, including: When it is detected that the data state is in an encrypted state, decrypting the data to be processed according to a preset decryption algorithm corresponding to the preset encryption algorithm to obtain the target data; When it is detected that the data state is an unencrypted state, the data to be processed is determined as the target data.
6. The data processing method according to claim 5, characterized in that: When it is detected that the data state is in an encrypted state, decrypting the data to be processed according to a preset decryption algorithm corresponding to the preset encryption algorithm to obtain the target data includes: Determining the decryption priority of the data to be processed according to the characteristic value of the data to be processed; Determining a target decryption algorithm corresponding to the data to be processed according to the decryption priority; The data to be processed is decrypted according to the target decryption algorithm to obtain the target data.
7. A data processing device, characterized in that: include: A first acquisition unit is used to acquire a first data set; the first data set includes a plurality of data; each data carries data attribute information; a characteristic value determining unit, configured to determine a characteristic value of each piece of data according to data attribute information of each piece of data in the first data set, wherein different data attribute information corresponds to different characteristic values; An extraction unit, configured to extract the data to be processed in the first data set according to the feature values of the respective data pieces; A state determination unit, used to determine the data state of the to-be-processed data according to a preset matching algorithm; A data processing unit, used for acquiring a target processing mode of the data to be processed, and processing the data to be processed according to the target processing mode and a data state of the data to be processed to obtain target data; The first acquisition unit specifically includes: a second acquisition unit and a data determination unit, the second acquisition unit is used to acquire a data table; each piece of data in the data table carries a data identifier, different data identifiers correspond to different data processing states, and the data processing states include a processed state and an unprocessed state; The data determination unit is used to extract the first data set according to the data identifier; Among them, the preset matching algorithm is a regular expression matching algorithm; the data state includes an encrypted state and an unencrypted state; the state determination unit is specifically used to: detect the data to be processed according to the regular expression matching algorithm to obtain the detection result of the data to be processed; when it is detected that the detection result is a first detection result, determine that the data state of the data to be processed is the encrypted state; the first detection result is used to describe that the data to be processed includes characters and numbers with a preset number of digits.
8. A computer 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 data processing method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Data search method and device
CN103714142A
Data encryption method and device, computer device and storage medium
CN109246130A
Processing method for judging PPTX document encryption and terminal
CN112100631A