Data processing method, device, server and storage medium
By encrypting the data table according to user permissions and generating a target data table, the problem of increased server load and security risks caused by changes in data type calculation logic in the existing technology is solved, and the security and efficiency of data transmission are achieved.
Patent Information
- Application Number
- CN202210858713.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-19
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2042-07-19
AI Technical Summary
In the prior art, when user permissions are different, the calculation logic of data type changes lead to an increase in server load, and plain text data transmission is easily cracked, increasing security risks.
By obtaining the data table and encrypting it according to the encryption parameters of the user permissions, the target data table is generated to ensure that the encryption position remains unchanged, and even if the data type calculation logic changes, it will not affect the generation of the target data table.
The amount of data modification is reduced, the security of data transmission is guaranteed, and the workload and error risk caused by logical modification are reduced.
Smart Images

Figure CN115412293B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method, device, server and storage medium. Background Art
[0002] With the continuous development of Internet technology, data visualization has become a way for different users to intuitively understand objects, products, etc. However, due to the different permissions of different users, when displaying data to different users, the content of different data types displayed has different encryption situations.
[0003] In the prior art, a common approach is to obtain the original data on the back end (i.e., the server side), and then, based on different user permissions, encrypt the original data using an encrypted version of the data type calculation logic corresponding to the permission to obtain content suitable for the data type that the user can view on the front end (i.e., the terminal device side).
[0004] However, when the calculation logic of a data type changes, the content of the data type corresponding to different user permissions needs to be modified again, which increases the load on the server. Summary of the invention
[0005] In view of this, the present application provides a data processing method, device, server and storage medium, which first obtains at least one data table, then encrypts at least one data table according to the encryption parameters of the user's corresponding permissions, obtains at least one target data table, and finally sends at least one target data table to the terminal device corresponding to the user. By utilizing the relationship between the data in the data table and the data that cannot be accessed by the user's permissions, when the data type calculation logic changes, the encrypted position does not change, and the modification occurs when the data table is generated, and the subsequent target data table generation is not affected, which not only reduces the modification amount, but also ensures the security of subsequent data transmission.
[0006] A first aspect of an embodiment of the present application provides a data processing method, the method comprising:
[0007] Acquire at least one data table, wherein the at least one data table is a two-dimensional table obtained by processing original data based on data type calculation logic;
[0008] Encrypting the at least one data table according to an encryption parameter of the authority corresponding to the user to obtain at least one target data table, wherein the encryption parameter is a position of data included in at least one data type corresponding to a time node that is inaccessible under the authority;
[0009] The at least one target data table is sent to a terminal device corresponding to the user.
[0010] In a possible design of the first aspect, encrypting the at least one data table according to the encryption parameters of the permissions corresponding to the user to obtain at least one target data table includes:
[0011] Determining, in at least one data table, an area to be encrypted according to a location of data included in at least one data type corresponding to a time node that is inaccessible under the authority;
[0012] The data in the to-be-encrypted area of the at least one data table is encrypted to obtain the at least one target data table.
[0013] Optionally, the encryption method includes any of the following:
[0014] Replacing the data in the area to be encrypted with a preset symbol;
[0015] or,
[0016] Replacing the data in the area to be encrypted with preset data;
[0017] or,
[0018] The data of the area to be encrypted is set to empty.
[0019] In another possible design of the first aspect, before encrypting the at least one data table according to the encryption parameters corresponding to the user's permissions to obtain at least one target data table, the method further includes:
[0020] receiving an access request from the user, wherein the access request carries an identifier of the user;
[0021] Determining the authority corresponding to the user according to the identifier of the user;
[0022] The encryption parameters are determined according to the authority corresponding to the user.
[0023] In yet another possible design of the first aspect, before obtaining at least one data table, the method further includes:
[0024] Acquiring the original data;
[0025] The original data is processed based on the data type calculation logic to obtain the at least one data table.
[0026] Optionally, before obtaining the original data, the method further includes:
[0027] Obtain the behavior information of each user within a preset time period;
[0028] The behavior information of each user is stored in a local database as the original data.
[0029] In yet another possible design of the first aspect, sending the at least one target data table to a terminal device corresponding to the user includes:
[0030] According to the time sequence of generation of the at least one target data table, the at least one target data table is sent to the terminal device corresponding to the user.
[0031] A second aspect of an embodiment of the present application provides a data processing device, the data processing device comprising: an acquisition module, a processing module, and a sending module;
[0032] The acquisition module acquires at least one data table, wherein the at least one data table is a two-dimensional table obtained by processing the original data based on the data type calculation logic;
[0033] The processing module is used to encrypt the at least one data table according to the encryption parameter of the authority corresponding to the user to obtain at least one target data table, wherein the encryption parameter is the position of data included in at least one data type corresponding to the time node that is inaccessible under the authority;
[0034] The sending module is used to send the at least one target data table to the terminal device corresponding to the user.
[0035] In a possible design of the second aspect, the processing module is specifically configured to:
[0036] Determining, in at least one data table, an area to be encrypted according to a location of data included in at least one data type corresponding to a time node that is inaccessible under the authority;
[0037] The data in the to-be-encrypted area of the at least one data table is encrypted to obtain the at least one target data table.
[0038] Optionally, the encryption method includes any of the following:
[0039] Replacing the data in the area to be encrypted with a preset symbol;
[0040] or,
[0041] Replacing the data in the area to be encrypted with preset data;
[0042] or,
[0043] The data of the area to be encrypted is set to empty.
[0044] In another possible design of the second aspect, the acquisition module is further used to receive an access request from the user, where the access request carries an identifier of the user;
[0045] The processing module is further used to determine the authority corresponding to the user according to the user identification, and determine the encryption parameter according to the authority corresponding to the user.
[0046] In yet another possible design of the second aspect, the acquisition module is further used to acquire the original data;
[0047] The processing module is further used to process the original data based on the data type calculation logic to obtain the at least one data table.
[0048] Optionally, the acquisition module is further used to acquire behavior information of each user within a preset time period;
[0049] The processing module is further used to store the behavior information of each user in a local database as the original data.
[0050] In yet another possible design of the second aspect, the processing module is further used to: send the at least one target data table to a terminal device corresponding to the user according to a time order in which the at least one target data table is generated.
[0051] A third aspect of the embodiment of the present application further provides a server, including: a processor, a memory;
[0052] The memory stores computer-executable instructions;
[0053] The processor executes the computer-executable instructions so that the server performs the data processing method as described in the first aspect and various possible designs above.
[0054] The fourth aspect of the embodiment of the present application also provides a computer-readable storage medium, which stores computer execution instructions. When the computer execution instructions are executed by a processor, they are used to implement the data processing method described in the first aspect and various possible designs.
[0055] The fifth aspect of the embodiments of the present application also provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the data processing method described in the first aspect and various possible designs.
[0056] The technical solution provided in the embodiment of the present application obtains at least one data table, which is obtained by processing the original data based on the data type calculation logic, and then encrypts the at least one data table according to the encryption parameters of the user's corresponding permissions to obtain at least one target data table, and sends the at least one target data table to the terminal device corresponding to the user. In this solution, the relationship between the data in the data table and the data that cannot be accessed by the user's permissions is used. When the data type calculation logic changes, the encrypted position does not change, and the modification occurs when the data table is generated, and the subsequent target data table generation is not affected, which not only reduces the modification amount, but also ensures the security of subsequent data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application 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 labor.
[0058] Figure 1 A schematic diagram of an application scenario of data processing provided in an embodiment of the present application;
[0059] Figure 2 A flowchart of a first embodiment of a data processing method provided in an embodiment of the present application;
[0060] Figure 3 A schematic diagram of displaying a target data table in a user graphical interface provided by an embodiment of the present application;
[0061] Figure 4 A flowchart of a second embodiment of the data processing method provided in the present application;
[0062] Figure 5 A schematic diagram comparing technical problem 2 in the prior art with the method provided in the embodiment of the present application;
[0063] Figure 6 A schematic diagram of a data processing device provided in an embodiment of the present application;
[0064] Figure 7 A schematic diagram of the structure of a server provided in an embodiment of the present application.
[0065] The above drawings show clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0066] In order to enable those skilled in the art to better understand the technical solution of the present application, the present application is described clearly and completely below in conjunction with the drawings in the embodiments of the present application. However, the present application can be implemented in many other ways different from the above description. Therefore, based on the embodiments provided by the present application, all other embodiments obtained by those of ordinary skill in the art without creative work should fall within the scope of protection of the present application.
[0067] It should be noted that the terms "first", "second", and "third" in the claims, description, and drawings of the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. The data used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than that illustrated or described herein. In addition, the terms "including", "having", and their variant forms are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0068] The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0069] Before introducing the embodiments of the present application, the professional terms and background technologies involved in the present application are first explained:
[0070] 1. Professional terms:
[0071] Daily Active User (DAU)
[0072] The number of users who logged into the product within seven days (Weekly Active Users, WAU). 2. Technical background:
[0074] In daily life, when a user uses a product, he or she can view the relevant data of the product according to his or her own permissions.
[0075] Taking game products as an example, since game data types have different data confidentiality levels, for data of the same structure, data types with higher confidentiality levels need to be encrypted for ordinary users. For example, payment is not visible to all users, but only to users with higher permissions.
[0076] For example, Table 1 is data of a game that can be viewed by user A on the terminal device side, as shown in Table 1:
[0077] Table 1:
[0078] date DAU Payment WAU 01-01 561 * * 01-02 590 * *
[0079] That is, user A has lower access rights and can only access DAU, but cannot see payment status and WAU.
[0080] Among them, "DAU, payment status, WAU" is the data type of the game, that is, the identifier of the data indicating the game, which can also be an indicator.
[0081] For example, Table 2 is data of a game that can be viewed by user B on the terminal device side, as shown in Table 2:
[0082] Table 2:
[0083] date DAU Payment WAU 01-01 561 56987 3600 01-02 590 69821 3952
[0084] That is, user B has higher access rights and can access DAU, payment status, and WAU.
[0085] For example, Table 3 is data of a game that can be viewed by user C on the terminal device side, as shown in Table 3:
[0086] Table 3:
[0087] date DAU Payment WAU 01-01 561 * 3600 01-02 590 * 3952
[0088] That is, user C has general access rights and can access DAU and WAU but cannot see payment status.
[0089] In the prior art, for users with different permissions, there are two ways to encrypt data before displaying it on each user's terminal device:
[0090] First, the server sends the data to the terminal device side, and the terminal device side encrypts some data types in the data according to the user's authority, and then displays the encrypted data and the data that does not need to be encrypted on the user graphical interface of the terminal device.
[0091] Second, after the server side obtains the original data, it encrypts the original data using the encrypted version of the data type calculation logic corresponding to the user's permissions to obtain content suitable for the data type that the user can view on the front end (i.e., the terminal device side).
[0092] Specifically, the server limits the data type calculation logic according to the user's authority, and then uses the encrypted data type calculation logic to process the original data to obtain content suitable for the data type that can be viewed by the user on the terminal device side.
[0093] However, both of the above two methods have certain technical problems:
[0094] First, for the first method mentioned above, since the data is transmitted in plain text on the network, the data packet is easy to be hijacked and leaked, and the encryption module of the front-end program is easy to be cracked, resulting in encryption failure;
[0095] Second, for the second method mentioned above, if the data processing logic changes, the same logic will be changed in multiple codes (for example, there are 10 data type modules in an unencrypted version, encrypted version 1 only encrypts data type 1, and encrypted version 2 only encrypts data type 2. At this time, the calculation logic of data type 5 needs to be modified, so the same logic needs to be modified 3 times in the above 3 versions, that is, the calculation logic of data type 5 is modified in all 3 versions), which increases a lot of workload.
[0096] The present application aims at the above technical problems. The inventors found that in the prior art, there are problems that plaintext data transmission is easy to be cracked, and the modification workload and error risk are increased due to different encryption logics. In actual implementation, the data positions of each data type obtained after processing the data according to the data type calculation logic are certain, and the viewing rules for data with different user permissions can also be whether the data at the corresponding data position is viewed. When sending data to users with different permissions, only the data at the position that needs to be encrypted is encrypted, and after encryption, it can be sent to the corresponding user device.
[0097] Based on the above problems existing in the prior art, Figure 1 The following is a schematic diagram of an application scenario of data processing provided in the embodiment of the present application, which is used to solve the above technical problems. Figure 1 As shown, the application scenario schematic diagram includes: a terminal device 11 and a server 12.
[0098] Among them, the number of terminal devices 11 can be one or more, that is, the number of users with different permissions can be one or more; the terminal device 11 can be a mobile phone, computer, tablet, smart watch and other devices with display function.
[0099] Taking games as an example, the server 12 may be a data service device that provides services for a certain game application installed on the terminal device 11 .
[0100] In a possible implementation, user A wants to view some information about the game and then accesses the client of the game. In response to the login, the server presents the background data on the user graphical interface of the terminal device 11 corresponding to user A.
[0101] Furthermore, the presentation may be as shown in Table 1 above. User A may see the DAU situation of date 01-01 and date 01-02 on the user graphical interface of the terminal device 11, that is, the number of active users on these two days is 561 and 590 respectively.
[0102] The specific implementation of the server in this scenario and the undisclosed contents are given in the following embodiments.
[0103] It should be understood that the above application scenarios are only examples and are not limitations of the present application.
[0104] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0105] Figure 2 The following is a flow chart of the first embodiment of the data processing method provided in the present application. Figure 2 As shown, the data processing method may include the following steps:
[0106] Step 21: Obtain at least one data table.
[0107] The data table is obtained by processing the original data based on the data type calculation logic, and the data table includes data included in at least one data type corresponding to at least one time node.
[0108] Optionally, taking a type of data as an example, the data type calculation logic corresponding to the data type may be a process of extracting, counting, and analyzing the original data to obtain the data corresponding to the data type. The data type calculation logic may be adjusted according to actual needs.
[0109] In this step, the data table may be a table that has not been encrypted before being displayed to the user. The server performs classification, statistics, analysis and other calculation processes on the relevant data from the original data of the product (for example, a game) through the data type calculation logic to obtain data corresponding to different data types (for example, games, it may be game indicators) at different time nodes.
[0110] In a possible implementation, Table 4 is a schematic diagram of data table A1, as shown in Table 4:
[0111] Table 4:
[0112]
[0113]
[0114] That is, in data table A1, the data types can be: DAU, daily payment, WAU and number of daily payments. Specifically, on the time node of January 1, the DAU is 561, the daily payment is 56987, the WAU is 3600, and the number of daily payments is 56.
[0115] In actual applications, users may need to access a lot of data, not only table A1, but also table B1 or even more, which are displayed in different locations on the user's corresponding terminal device.
[0116] It should be understood that the attributes referred to by the rows and columns of the data table can be swapped, that is, in one implementation, the row header is the time node and the column header is the data type; in another implementation, the column header is the time node and the row header is the data type.
[0117] Step 22: Encrypt at least one data table according to encryption parameters of the permissions corresponding to the user to obtain at least one target data table.
[0118] The encryption parameter is the location of data included in at least one data type corresponding to a time node that is inaccessible under the authority corresponding to the user.
[0119] In this step, different users have different access rights to the at least one data table, that is, for users with different permissions, data of a certain data type at a certain time node displayed on the user graphical interface of the terminal device is invisible or false data.
[0120] In a possible implementation, Table 5-1 is a schematic diagram of a data table A2 (target data table) that can be viewed by user D, as shown in Table 5-1:
[0121] Table 5-1:
[0122] date DAU Same-day payment WAU Number of payments made on the day 01-01 561 * 3600 56 01-02 590 * 3952 90 01-03 564 * 3200 64 01-04 530 * 3152 53 01-05 521 * 3700 61
[0123] In another possible implementation, Table 5-2 is another schematic diagram of the data table A2 (target data table) viewable by user D, as shown in Table 5-2:
[0124] Table 5-2:
[0125]
[0126]
[0127] In another possible implementation, Table 5-3 is another schematic diagram of the data table A2 (target data table) viewable by user D, as shown in Table 5-3:
[0128] Table 5-3:
[0129] date DAU Same-day payment WAU Number of payments made on the day 01-01 561 3600 56 01-02 590 3952 90 01-03 564 3200 64 01-04 530 3152 53 01-05 521 3700 61
[0130] That is, according to Table 4, which is an unencrypted data table, based on different user permissions, for example, users with lower permissions cannot access the daily payment data of all time nodes, that is, the daily payment data needs to be encrypted.
[0131] The encryption parameter refers to the data of the day's payment at the time point that the user with the permission cannot view.
[0132] Optionally, the encryption method may include any of the following:
[0133] The first method is to replace the data in the area to be encrypted with preset symbols, such as "*", "#", "...", or code, etc.
[0134] The second method is to replace the data in the area to be encrypted with preset data, for example, false data;
[0135] The third method is to set the data in the area to be encrypted to be empty, that is, the encryption position of the target data table in the user graphical interface of the subsequent terminal device is left empty.
[0136] Specifically, in the implementation of Table 4, the purpose of the encryption parameters is: to encrypt the data corresponding to the daily payment of all time nodes, which can be replaced by "*" to obtain Table 5-1; can be replaced by false data (for example, 8888) to obtain Table 5-2; can be replaced by leaving the encrypted position empty to obtain Table 5-3.
[0137] In some implementations, data can also be encrypted by replacing the data with false data, for example, the real data is 61, and the false data is 888, 666, or 000.
[0138] In some other implementations, the data may be encrypted by replacing the data with false data, for example, the real data is 61 and the false data is empty.
[0139] Step 23: Send at least one target data table to the terminal device corresponding to the user.
[0140] In this step, after encrypting the at least one data table on the server side, at least one target data table is obtained, and the at least one target data table is sent to a terminal device corresponding to the user.
[0141] Furthermore, at least one target data table is displayed on a user graphical interface of a terminal device corresponding to the user.
[0142] Optionally, on the terminal device side, the display rule may be to display each target data table in the user graphical interface in the time sequence in which each data table is encrypted, or to fill each target data table in accordance with a preset table framework.
[0143] In one possible implementation, Figure 3 The following is a schematic diagram of the display of the target data table provided in the embodiment of the present application in the user graphical interface. Figure 3 As shown:
[0144] In column 1 of the user graphical interface, the specific data of DAU and WAU from dates 01-01 to 01-05 are displayed, which are "561, 590, 564, 530, 521" and "3600, 3952, 3200, 3152, 3700" respectively. However, in the payment item of the day, due to limited user permissions, the encrypted "*" is displayed.
[0145] In column 2, the specific data of DAU from 10:00 to 12:00 on date 01-01 are displayed, which are "51, 50, 21" respectively, and the specific data of the number of users with active duration greater than 4 minutes are "49, 48, 18". Only two indicators are displayed in this column, which means that there is no encrypted data.
[0146] In column 3, the specific data of DAU and the number of payments on the day from dates 01-01 to 01-05 are displayed, which are "561, 590, 564, 530, 521" and "56, 90, 64, 53, 61" respectively. However, in the cumulative payment item, due to limited user permissions, an encrypted "*" is displayed.
[0147] The data processing method provided in the embodiment of the present application obtains at least one data table, which is obtained by processing the original data based on the data type calculation logic, and then encrypts the at least one data table according to the encryption parameters of the user's corresponding authority to obtain at least one target data table, and sends the at least one target data table to the terminal device corresponding to the user. In this scheme, the relationship between the data in the data table and the data that cannot be accessed by the user's authority is used. When the data type calculation logic changes, the encrypted position does not change, and the modification occurs when the data table is generated, and the subsequent target data table generation is not affected, which reduces the modification amount and ensures the security of subsequent data transmission.
[0148] Based on the above embodiments, Figure 4 The following is a flow chart of the second embodiment of the data processing method provided in the present application. Figure 4As shown, the data processing method is explained in more detail and comprehensively:
[0149] Step 41: Obtain original data.
[0150] In this step, for a certain product, in order to better understand various aspects of the product, the server side monitors the behavior information of multiple users, that is, the original data, in real time.
[0151] Taking games as an example, the behavior information may be: what time the user logged into the game, whether the user opened the game store, when the game store was opened, whether items were purchased from the game store, the time of purchase, the amount spent, whether a specific game was started, and what mode the game was in, for example, human-computer, matching, or ranking.
[0152] Taking shopping software as an example, the behavior information may include: what time the user logged into the shopping software, whether the user made any purchases, the time of purchase, the amount spent, the types of items the user browsed, the items the user added to the shopping cart, and the time of addition.
[0153] It should be understood that the raw data may be the behavior information of each user within a preset time period, and the preset time period may be 30 minutes, 1 day, 5 days, 1 week, one month, etc.
[0154] That is, the behavior information of each user within a preset time period is obtained, and the behavior information of each user is stored in a local database as original data.
[0155] Step 42: Process the original data to obtain at least one data table.
[0156] In this step, in order to more directly display the data required by the user on the user graphical interface, it is also necessary to extract, analyze and process the original data to generate at least one data table.
[0157] The data table may be a two-dimensional table, wherein rows and columns are data corresponding to different time nodes and different data types.
[0158] Optionally, different data tables can display data of different indicators, and different data tables can also display data including the same indicator.
[0159] In a data table, each row can be data of different indicators (i.e., data types) at a time node. Taking games as an example, the data type can be DAU, current payment, number of items added to the shopping cart, WAU, cumulative payment, etc.
[0160] Optionally, based on data type calculation logic, the original data is processed to obtain at least one data table.
[0161] In a possible implementation, taking the game as an example, the raw data collected from 10:00 on February 1 to 12:59 on February 1 is as follows:
[0162] 1. User X1 logged in at 10:00, user X2 logged in at 10:05, ... user X17 logged in at 10:45, ... user X79 logged in at 12:59;
[0163] 2. User X1 purchased game skin H1 at 10:00 and spent 69, user X3 purchased game skin H2 at 10:13 and spent 119, ... user X35 purchased game skin H11 at 11:13 and spent 139, ... user X66 purchased game skin H9 at 12:50 and spent 79;
[0164] 3. User X3 added game skin H3 to the shopping cart at 10:05, user X6 added game skin H9 to the shopping cart at 10:35, ... user X26 added game skin H9 and game skin H99 to the shopping cart at 11:35, ... user X69 added game skin H3 and game skin H9 to the shopping cart at 12:55;
[0165] Furthermore, taking the data type as an example, which may be DAU, payment at that time, and the number of items added to the shopping cart, the data type calculation logic may be to sort out the DAU, payment at that time, and the number of items added to the shopping cart within each hour.
[0166] For example, DAU can be the total number of users logging into the game at each moment; payment at that time can be the total amount of shopping by all users at each moment; and the number of items added to the shopping cart can be the total number of items added to the shopping cart by all users at each moment.
[0167] For example, Table 6 is detailed data (ie, a data table) of different data types within 3 hours from 10:00 on February 1 to 12:59 on February 1, as shown in Table 6:
[0168] Table 6:
[0169] Hourly time DAU Pay at that time Number of items added to cart 10 o'clock 24 789 13 11 o'clock 31 699 36 12 o'clock 26 709 18
[0170] That is, in the time interval of 10 o'clock, the DAU was 24 times, the payment at that time was 789, and the number of items added to the shopping cart was 13; in the time interval of 11 o'clock, the DAU was 31 times, the payment at that time was 699, and the number of items added to the shopping cart was 36; in the time interval of 12 o'clock, the DAU was 26 times, the payment at that time was 709, and the number of items added to the shopping cart was 18.
[0171] Algorithmically, Table 6 can be described as: [{'oclock':'10','DAU':'24,''oclock_pay':'789','total_amount':13}, {'oclock':'36','DAU':'31,''oclock_pay':'699','total_amount':13}, {'oclock':'12','DAU':'26,''oclock_pay':'709','total_amount':18}].
[0172] That is, the content of each curly brace represents the value of a row of data, and a key-value pair is used in each curly brace to represent the column name and its corresponding value.
[0173] In addition, according to different data types in the data table and / or different user needs, the original data can be processed by data type calculation logic to generate at least one different data table. The above is only an example of a data table, and the generation of multiple data tables is similar.
[0174] Optionally, when the calculation logic of a data type in the data type calculation logic needs to be readjusted, the structural framework of the data table is not affected, that is, the method of calculating data changes, and the location where the result is stored or displayed remains unchanged.
[0175] Step 43: Receive the user's access request.
[0176] The access request carries the user's identification and the content requested for access.
[0177] In this step, when a user needs to view some data on his terminal device, the terminal device sends an access request to the server.
[0178] Optionally, the content requested for access is at least one data table.
[0179] In one possible implementation, taking a game as an example, a user needs to view the game details page. The terminal device responds to the click operation and generates an access request carrying the user's identification. The terminal device sends the access request to the server through wireless communication. The server then receives the access request and parses the access request.
[0180] In another possible implementation, taking shopping as an example, the user needs to check the number of purchases on the product page of the shopping software. The terminal device responds to the user clicking on the logo of a certain product on the product page, and then the server backend responds to the request and calls up the detailed information of the product, including the number of purchases, after-sales evaluation, etc.
[0181] Step 44: Determine the authority corresponding to the user according to the user's identification.
[0182] In this step, the role of encryption is mainly to distinguish the degree to which users with different permissions can access the data.
[0183] Optionally, a correspondence between user identifiers corresponding to different authority levels may be stored inside the server.
[0184] For example, for users with low permissions, the privacy requirements involved in the data they access are generally lower, for example, the data characteristics may be DAU, WAU, etc.; for users with medium permissions, the privacy requirements involved in the data they access are relatively general, for example, the data characteristics may be DAU, WAU, and the number of items added to the shopping cart, etc.; for users with high permissions, the privacy requirements involved in the data they access are relatively high, for example, the data characteristics may be DAU, the number of items added to the shopping cart, and the payment at that time, etc.
[0185] It should be understood that low, medium, and high permissions are only examples and are not other feasible bases for determining the size of permissions.
[0186] That is, depending on the permissions, the specific data of the data features that users can see may vary.
[0187] Optionally, based on the user's identification, the server can determine the size or type of permissions corresponding to the user, that is, what type of data is applicable for viewing.
[0188] In a possible implementation, the method of determining the corresponding authority of the user may be: in the database of the server, a correspondence between the user's identification and the authority level is pre-established.
[0189] For example, Table 7 is a table of correspondence between a user's identification and permission level, as shown in Table 7:
[0190] Table 7:
[0191] User's ID Permission Level X1 high X2……X76 middle X98…X117 Low
[0192] For example, Table 8 is a table showing the correspondence between another user's identification and permission level, as shown in Table 8:
[0193] Table 8:
[0194] User's ID Permission Level X1 1 X2……X76 2 X86…X97 3 X98…X113 4 X115…X1103 5
[0195] Note: The higher the number corresponding to the permission level, the smaller the permission, that is, permission level 1 has the highest permission, and permission level 5 has the lowest permission.
[0196] Step 45: Determine encryption parameters according to the corresponding permissions of the user.
[0197] In this step, the encryption parameter is used to encrypt data included in at least one data type corresponding to a time node that is inaccessible under the authority corresponding to the user.
[0198] Optionally, due to different permissions corresponding to users, the encryption conditions of data displayed on the user graphical interface in the terminal devices of different users are also different, that is, different user permissions correspond to different encryption parameters.
[0199] Exemplarily, the correspondence between different permission levels and specific contents of accessible data is pre-stored inside the server.
[0200] Specifically, users with high authority can access more data, and when encryption occurs, there are fewer encryption areas; users with low authority can access less data, and when encryption occurs, there are more encryption areas.
[0201] In a possible implementation, Table 9 is a correspondence table between encryption parameters and permissions corresponding to users, and the contents of Table 6 and Table 8 are combined, as shown in Table 9:
[0202] Table 9:
[0203]
[0204]
[0205] That is, permission 1 does not have any encryptable area in the data table; permission 2 cannot access the rows at 10 o'clock, 11 o'clock, and 12 o'clock, and the data in the columns with the data type of payment at that time in the data table; permission 3 cannot access the rows at 11 o'clock and 12 o'clock, and the data in the columns with the data type of payment at that time and the number of items added to the shopping cart; permission 4 cannot access the rows at 10 o'clock, 11 o'clock, and 12 o'clock, and the data in the columns with the data type of payment at that time and the number of items added to the shopping cart; permission 5 cannot access the rows at 10 o'clock, 11 o'clock, and 12 o'clock, and the data in the columns with the data type of DAU, payment at that time, and the number of items added to the shopping cart.
[0206] In another possible implementation, Table 10 is a correspondence table of another encryption parameter and the permissions corresponding to the user, which is combined with the contents of Table 6 and Table 7, as shown in Table 10:
[0207] Table 10:
[0208]
[0209] That is, when the permission is high, there is no encryptable area in the data table; when the permission is medium, the data in the rows at 10 o'clock, 11 o'clock, and 12 o'clock and the columns with data type of payment at that time in the data table cannot be accessed; when the permission is low, the data in the rows at 10 o'clock, 11 o'clock, and 12 o'clock and the columns with data type of payment at that time and the number of items added to the shopping cart cannot be accessed.
[0210] For example, Table 11 is an example of the area that needs to be encrypted in the data table, as shown in Table 11:
[0211] Table 11:
[0212]
[0213]
[0214] That is, in the data table (Table 11), there are 8 data of type E, type F, type G, type H and type I respectively, among which the encryption parameters (i.e. the italic font part in Table 11) can be set to (E 1, F 2), (G 3, H 4) and (H 5, I6).
[0215] Specifically, the encryption parameters (E1, F2) can be E1, F1, E2 and F2 encryption; the encryption parameters (G3, H4) can be G3, G4, H3 and H4 encryption; the encryption parameters (H5, I6) can be H5, H6, I5 and I6 encryption.
[0216] Step 46: Encrypt the data in the data table according to the encryption parameters to obtain a target data table.
[0217] In this step, the encryption parameters have defined the location of the data to be encrypted in the data table. The data at each location in the data table is traversed to determine whether the data at each location falls within the interval shown by the encryption parameters (the interval is the area to be encrypted).
[0218] Furthermore, if yes, the data that falls into it is encrypted, and after traversing all the data and performing encryption processing, the obtained data table is the target data table.
[0219] Based on Table 9, in a possible implementation, combined with processing Table 6, Table 12 is a target data table corresponding to permission 1 (that is, the encryption parameter is none), as shown in Table 12:
[0220] Table 12:
[0221] Hourly time DAU Pay at that time Number of items added to cart 10 o'clock 24 789 13 11 o'clock 31 699 36 12 o'clock 26 709 18
[0222] In another possible implementation, combined with processing Table 6, Table 13 is a target data table corresponding to permission 2 (ie, the encryption parameters are paid at 10 o'clock, 11 o'clock and 12 o'clock), as shown in Table 13:
[0223] Table 13:
[0224]
[0225]
[0226] In another possible implementation, combined with processing Table 6, Table 14 is a target data table corresponding to permission 3 (that is, the encryption parameters are the current payment and the number of items added to the shopping cart at 11 o'clock and 12 o'clock), as shown in Table 14:
[0227] Table 14:
[0228] Hourly time DAU Pay at that time Number of items added to cart 10 o'clock 24 789 13 11 o'clock 31 * * 12 o'clock 26 * *
[0229] In another possible implementation, combined with processing Table 6, Table 15 is a target data table corresponding to permission 4 (that is, the encryption parameters are the number of items paid at the time and added to the shopping cart at 10 o'clock, 11 o'clock and 12 o'clock), as shown in Table 15:
[0230] Table 15:
[0231] Hourly time DAU Pay at that time Number of items added to cart 10 o'clock 24 * * 11 o'clock 31 * * 12 o'clock 26 * *
[0232] Based on Table 10, in a possible implementation, combined with processing Table 6, Table 16 is a target data table corresponding to authority: high (that is, the encryption parameter is none), as shown in Table 16:
[0233] Table 16:
[0234] Hourly time DAU Pay at that time Number of items added to cart 10 o'clock 24 789 13 11 o'clock 31 699 36 12 o'clock 26 709 18
[0235] In another possible implementation, combined with processing of Table 6, Table 17 is a target data table corresponding to the authority: (ie, the encryption parameters are paid at 10 o'clock, 11 o'clock and 12 o'clock), as shown in Table 17:
[0236] Table 17:
[0237] Hourly time DAU Pay at that time Number of items added to cart 10 o'clock 24 * 13 11 o'clock 31 * 36 12 o'clock 26 * 18
[0238] In another possible implementation, combined with processing Table 6, Table 18 is a target data table corresponding to authority: low (that is, the encryption parameters are the current payment and the number of items added to the shopping cart at 11 o'clock and 12 o'clock), as shown in Table 18:
[0239] Table 18:
[0240] Hourly time DAU Pay at that time Number of items added to cart 10 o'clock 24 789 13 11 o'clock 31 * * 12 o'clock 26 * *
[0241] Further, in a possible implementation, combined with processing Table 6, Table 19 is a target data table corresponding to Permission 4 (that is, the encryption parameters are DAU at 10 o'clock, 11 o'clock and 12 o'clock, the number of items paid at that time and added to the shopping cart), as shown in Table 19:
[0242] Table 19:
[0243] Hourly time DAU Pay at that time Number of items added to cart 10 o'clock * * * 11 o'clock * * * 12 o'clock * * *
[0244] In another possible implementation, combined with processing Table 11, Table 20 is a target data table (that is, the encryption parameters are (E 1, F2), (G 3, H 4) and (H 5, I 6) in the encryption parameters), as shown in Table 20:
[0245] Table 20:
[0246]
[0247]
[0248] Optionally, the encryption process can use decorators, interfaces, etc. to call encryption parameters to encrypt the data in the data table.
[0249] Step 47: Transmit at least one target data table to a terminal device corresponding to the user.
[0250] In this step, in response to the user's access request, after the above steps 44, 45 and 46, the server generates at least one target data table, which needs to be displayed on the user's terminal device. At this time, the at least one target data table is transmitted to the user's corresponding terminal device.
[0251] Furthermore, after receiving these target data tables, the terminal device may display a similar Figure 3 The effect shown is just an example.
[0252] As an implementation, the transmission process may be wireless transmission, that is, processing at least one target data table to generate a data packet, transmitting the data packet to the terminal device side for decompression, and displaying it according to the display rules of the user graphical interface.
[0253] As another implementation, the generation time of each target data table is not necessarily the same. When viewing some data on the user's own terminal device, each target data table is displayed in a corresponding page in the order of generation time.
[0254] The technical solution provided in the embodiment of the present application obtains original data, processes the original data, obtains at least one data table, then receives a user's access request, determines the user's corresponding authority based on the user's identification, and determines encryption parameters based on the user's corresponding authority, then encrypts the data in the data table based on the encryption parameters to obtain a target data table, and transmits at least one target data table to the user's corresponding terminal device, thereby realizing data encryption. During the processing of this solution, when the calculation logic of a certain data type in the data type calculation logic needs to be readjusted, it does not affect the structural framework of the data table, that is, the method of calculating data changes, and the location where the results are stored or displayed remains unchanged, thereby reducing the large workload and high error rate caused by copying multiple copies of business logic code to batch modify logic in the prior art, reducing the amount of development code on the indicator calculation server, improving service performance, and avoiding the risk of information leakage transmitted in plain text.
[0255] Based on the above embodiments, Figure 5 A schematic diagram comparing the technical problem 2 in the prior art with the method provided in the embodiment of the present application, such as Figure 5 As shown, one original data is used as an example to form multiple data tables and has three encryption parameters.
[0256] In the prior art, for the initial data table, that is, the data table before encryption, an encrypted version 1 is generated after the first encryption parameter is processed, an encrypted version 2 is generated after the second encryption parameter is processed, and an encrypted version 3 is generated after the third encryption parameter is processed.
[0257] Optionally, encryption version 1 is to encrypt the first line, encryption version 2 is to encrypt the second line, and encryption version 3 is to encrypt the third line.
[0258] The calculation business logic of encrypted version 1, encrypted version 2 and encrypted version 3 are all independent business logics copied from the logic of the original version. After the calculation logic of the indicator in the 5th row is changed, it is necessary to modify the corresponding position of each version, that is, 4 modifications (including 1 modification of the original version).
[0259] Under the technical solution provided in the embodiment of the present application, the calculation logic has only one unencrypted version, and the encrypted version is obtained by adjusting the encryption parameters and then referring to the unencrypted version of the calculation logic.
[0260] Specifically, assuming that the calculation logic of the indicator in the 5th row needs to be modified, since encryption version 1, encryption version 2, and encryption version 3 refer to the unencrypted business logic, encryption parameters are applied on top of them. By modifying different encryption parameters, the purpose of encrypting different areas is achieved. Therefore, only the unencrypted version of the business logic needs to be modified, which can avoid the error problem caused by multiple modifications to one logic in the prior art.
[0261] Furthermore, for changes in the encryption parameters themselves, such as changes in the encryption area of encryption version 1, if changes are made to the version of the prior art, the business code logic needs to be modified, while if changes are made to the solution provided in the embodiment of the present application, only the parameters of the encryption area need to be modified. Relatively speaking, modifying the logic is simpler and less prone to errors.
[0262] Based on the above method embodiment, Figure 6 A schematic diagram of a data processing device provided in an embodiment of the present application, such as Figure 6 As shown, the data processing device includes: an acquisition module 61, a processing module 62 and a sending module 63.
[0263] An acquisition module 61 acquires at least one data table, where the at least one data table is a two-dimensional table obtained by processing the original data based on a data type calculation logic;
[0264] A processing module 62 is used to encrypt at least one data table according to an encryption parameter of the authority corresponding to the user to obtain at least one target data table, wherein the encryption parameter is a position of data included in at least one data type corresponding to a time node that is inaccessible under the authority;
[0265] The sending module 63 is used to send at least one target data table to the terminal device corresponding to the user.
[0266] In a possible design of the embodiment of the present application, the processing module 62 is specifically used to:
[0267] Determine, in at least one data table, a region to be encrypted according to a location of data included in at least one data type corresponding to a time node that is inaccessible under the authority;
[0268] Encrypt data in a to-be-encrypted area in at least one data table to obtain at least one target data table.
[0269] Optionally, the encryption method includes any of the following:
[0270] Replace the data in the area to be encrypted with preset symbols;
[0271] or,
[0272] Replace the data in the area to be encrypted with the preset data;
[0273] or,
[0274] Set the data in the area to be encrypted to empty.
[0275] In another possible design of the embodiment of the present application, the acquisition module 61 is further used to receive an access request from a user, where the access request carries an identifier of the user;
[0276] The processing module 62 is further used to determine the authority corresponding to the user according to the user's identification, and determine the encryption parameters according to the authority corresponding to the user.
[0277] In another possible design of the embodiment of the present application, the acquisition module 61 is also used to acquire original data;
[0278] The processing module 62 is further used to process the original data based on the data type calculation logic to obtain at least one data table.
[0279] Optionally, the acquisition module 61 is further used to acquire the behavior information of each user within a preset time period;
[0280] The processing module 62 is further used to store the behavior information of each user in a local database as raw data.
[0281] In another possible design of the embodiment of the present application, the processing module 62 is further used to: send at least one target data table to a terminal device corresponding to the user according to the time order of generation of the at least one target data table.
[0282] The data processing device provided in the embodiment of the present application can be used to execute the technical solution corresponding to the data processing method in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0283] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0284] Figure 7 This is a schematic diagram of the structure of the server provided in the embodiment of the present application. Figure 7 As shown, the server may include: a processor 71 , a memory 72 , and computer program instructions stored in the memory 72 and executable on the processor 71 .
[0285] The processor 71 executes the computer execution instructions stored in the memory 72, so that the processor 71 executes the scheme in the above embodiment. The processor 71 can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0286] The memory 72 is connected to the processor 71 via a system bus and completes communication between them. The memory 72 is used to store computer program instructions.
[0287] Optionally, the structure of the server further includes: a transceiver 73, which is connected to the processor 71 via a system bus and completes communication between them.
[0288] In implementation, the transceiver 73 may correspond to Figure 6 The obtaining module 61 and the sending module 63 in the illustrated embodiment.
[0289] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0290] It should be understood that the server may be Figure 1 The server 12 in the illustrated embodiment.
[0291] The server provided in the embodiment of the present application can be used to execute the technical solution corresponding to the data processing method in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0292] An embodiment of the present application also provides a chip for executing instructions, which is used to execute the technical solution of the data processing method in the above embodiment.
[0293] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a server, the server executes the technical solution of the data processing method in the above embodiment.
[0294] An embodiment of the present application further provides a computer program product, including a computer program, which, when executed by a processor, is used to execute the technical solution of the data processing method in the above embodiment.
[0295] The computer readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or dedicated server.
[0296] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0297] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
Claims
1. A data processing method, characterized in that: include: Acquire at least one data table, wherein the at least one data table is a two-dimensional table obtained by processing original data based on data type calculation logic; The data position of each data type in the data table is certain; Encrypting the at least one data table according to an encryption parameter of the authority corresponding to the user to obtain at least one target data table, wherein the encryption parameter is a position of data included in at least one data type corresponding to a time node that is inaccessible under the authority; The step of encrypting the at least one data table according to the encryption parameters of the permissions corresponding to the user to obtain at least one target data table includes: Determining, in at least one data table, an area to be encrypted according to a location of data included in at least one data type corresponding to a time node that is inaccessible under the authority; Encrypting the data in the to-be-encrypted area in the at least one data table to obtain the at least one target data table; The at least one target data table is sent to a terminal device corresponding to the user.
2. The method according to claim 1, characterized in that The encryption method includes any of the following: Replacing the data in the area to be encrypted with a preset symbol; or, Replacing the data in the area to be encrypted with preset data; or, The data of the area to be encrypted is set to empty.
3. The method according to any one of claims 1 to 2, characterized in that: Before encrypting the at least one data table according to the encryption parameters corresponding to the user's authority to obtain at least one target data table, the method further includes: receiving an access request from the user, wherein the access request carries an identifier of the user; Determining the authority corresponding to the user according to the identifier of the user; The encryption parameters are determined according to the authority corresponding to the user.
4. The method according to any one of claims 1 to 2, characterized in that: Before acquiring at least one data table, the method further includes: Acquiring the original data; The original data is processed based on the data type calculation logic to obtain the at least one data table.
5. The method according to claim 4, characterized in that Before obtaining the original data, the method further includes: Obtain the behavior information of each user within a preset time period; The behavior information of each user is stored in a local database as the original data.
6. The method according to any one of claims 1-2, characterized in that: The sending the at least one target data table to the terminal device corresponding to the user includes: According to the time sequence of generation of the at least one target data table, the at least one target data table is sent to the terminal device corresponding to the user.
7. A data processing device, characterized in that: include: An acquisition module, which acquires at least one data table, wherein the at least one data table is a two-dimensional table obtained by processing the original data based on the data type calculation logic; The data position of each data type in the data table is certain; A processing module, configured to encrypt the at least one data table according to an encryption parameter of the authority corresponding to the user, to obtain at least one target data table, wherein the encryption parameter is a position of data included in at least one data type corresponding to a time node that is inaccessible under the authority; The step of encrypting the at least one data table according to the encryption parameters of the permissions corresponding to the user to obtain at least one target data table includes: Determining, in at least one data table, an area to be encrypted according to a location of data included in at least one data type corresponding to a time node that is inaccessible under the authority; Encrypting the data in the to-be-encrypted area in the at least one data table to obtain the at least one target data table; A sending module is used to send the at least one target data table to the terminal device corresponding to the user.
8. A server, characterized in that: include: A processor, a memory, and computer program instructions stored on the memory and executable on the processor; When the processor executes the computer program instructions, the data processing method as described in any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the data processing method as described in any one of claims 1 to 6 above.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, it is used to implement the data processing method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
A data processing method and device
CN109815284A