Data processing method, device, electronic device, server and storage medium
By carrying only the data storage address and template identifier in the data request, and executing the commands in the preset data processing template, the problem of operating command leakage during data request transmission is solved, and complex data processing and real-time requirements are met.
Patent Information
- Application Number
- CN202011119520.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-19
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-10-29
AI Technical Summary
In object storage scenarios, the problem of operation command leakage may easily occur during data request transmission.
By receiving a data request containing the data storage address and data processing template identification, the data to be processed is obtained and the commands in the corresponding data processing template are executed to process the data, reducing the need to directly carry specific command information, thereby avoiding information exposure.
It realizes the setting of complex commands in the data processing template for data processing, reduces the amount of information and processing time overhead in data requests, meets the real-time data requirements, and avoids the leakage of operation commands.
Smart Images

Figure CN112231727B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a data processing method, device, electronic device, server and storage medium. Background Art
[0002] In various object storage scenarios currently provided by various manufacturers, when a user downloads or accesses data, he can send a data request to the server. The data request contains the data storage address URL (Uniform Resource Locator), data processing commands, and related command parameters. The URL is usually used to concatenate data processing commands and command parameters. For example, a string of characters is carried in the data request: url? process = data processing command 1, command parameter 1 / data processing command 2, command parameter 2. After receiving the data request, the server obtains the URL and data processing commands 1 and 2, obtains the original data according to the URL, and executes data processing commands 1 and 2 to implement data processing of the original data, and returns the processed data to the user.
[0003] However, the above method is prone to the problem of operation command leakage during data request transmission. Summary of the invention
[0004] The present disclosure provides a data processing method, device, electronic device, server and storage medium to at least solve the technical problem of operation command leakage during data request transmission in the related art. The technical solution of the present disclosure is as follows:
[0005] In a first aspect, a data processing method is provided, comprising:
[0006] receiving a data request; the data request includes a data storage address of data to be processed and a template identifier of a data processing template; the data processing template includes at least one data processing command;
[0007] Acquire the data to be processed corresponding to the data storage address, and acquire the data processing template corresponding to the template identifier;
[0008] Execute the data processing commands contained in the corresponding data processing template to process the data to be processed.
[0009] In a possible implementation, the data processing template further includes first type parameter information;
[0010] The executing the data processing command included in the corresponding data processing template to process the data to be processed includes:
[0011] Obtaining the data processing command contained in the corresponding data processing template;
[0012] Acquire first type parameter information corresponding to the data processing command from the data processing template;
[0013] Execute a corresponding data processing command according to the first type parameter information to process the data to be processed.
[0014] In a possible implementation, the data request further includes second type parameter information, where the second type parameter information is parameter information corresponding to a user account of a client sending the data request;
[0015] The adopting the data processing command included in the corresponding data processing template to process the data to be processed includes:
[0016] Obtaining the data processing command contained in the corresponding data processing template;
[0017] Acquire second type parameter information corresponding to the data processing command from the data request;
[0018] Execute a corresponding data processing command according to the second type parameter information, and perform corresponding processing on the data to be processed.
[0019] In a possible implementation, the second type parameter information includes account identification information of the user account; and executing a corresponding data processing command according to the second type parameter information to perform corresponding processing on the to-be-processed data includes at least one of the following:
[0020] Execute a corresponding data processing command according to the account identification information, and add the account identification information to the data to be processed;
[0021] According to the account preference information corresponding to the account identification information, a data processing command corresponding to the account preference information is executed, and the data to be processed is processed accordingly based on the account preference information.
[0022] In a possible implementation, between obtaining the to-be-processed data and the corresponding data processing template and executing the data processing command included in the corresponding data processing template, the method further includes:
[0023] Query a preset cache space; the cache space is used to cache historical data processing results corresponding to each data processing template;
[0024] If the cache space contains target cache data, the target cache data is returned to the client that sends the data request; the target cache data is a data processing result obtained by executing the corresponding data processing template to process the data to be processed.
[0025] In a possible implementation, the method further includes:
[0026] If the cache space does not contain the target cache data, execute the data processing command contained in the corresponding data processing template to process the data to be processed.
[0027] In a possible implementation, the data processing commands in the data processing template include at least one of the following categories:
[0028] The first type of data processing commands configured by the client;
[0029] The second type of data processing command preset by the server;
[0030] The method further comprises:
[0031] Obtaining the first-category data processing command and / or the second-category data processing command;
[0032] The data processing template is generated based on the first type of data processing commands and / or the second type of data processing commands.
[0033] In a second aspect, a data processing method is provided, the method comprising:
[0034] Acquire a data storage address of the data to be processed and a template identifier of a data processing template; the data processing template includes at least one data processing command;
[0035] Generate a data request; the data request includes the data storage address and the template identifier;
[0036] Send the data request; the data request is used to instruct to obtain the data to be processed corresponding to the data storage address and to obtain the data processing template corresponding to the template identifier, and execute the data processing command contained in the corresponding data processing template to process the data to be processed.
[0037] In a possible implementation, the data processing commands in the data processing template include at least one of the following categories:
[0038] The first type of data processing commands configured by the client;
[0039] The second type of data processing command preset by the server;
[0040] The method further comprises:
[0041] Obtaining the first type of data processing command;
[0042] The first type of data processing command is sent to a server, and the server is used to generate the data processing template based on the first type of data processing command and / or the second type of data processing command.
[0043] According to a third aspect, a data processing device is provided, the device comprising:
[0044] A request information acquisition module is configured to execute receiving a data request, wherein the data request includes a data storage address of the data to be processed and a template identifier of a data processing template; the data processing template includes at least one data processing command;
[0045] A data and template acquisition module, configured to acquire the data to be processed corresponding to the data storage address, and to acquire the data processing template corresponding to the template identifier;
[0046] The data processing module is configured to execute the data processing commands contained in the corresponding data processing template to process the data to be processed.
[0047] In a possible implementation, the data processing template further includes first type parameter information; and the data processing module is configured to execute:
[0048] Obtaining the data processing command contained in the corresponding data processing template;
[0049] Acquire first type parameter information corresponding to the data processing command from the data processing template;
[0050] Execute a corresponding data processing command according to the first type parameter information to process the data to be processed.
[0051] In a possible implementation, the data request further includes second type parameter information, where the second type parameter information is parameter information corresponding to a user account of a client sending the data request;
[0052] The data processing module is further configured to execute:
[0053] Obtaining the data processing command contained in the corresponding data processing template;
[0054] Acquire second type parameter information corresponding to the data processing command from the data request;
[0055] Execute a corresponding data processing command according to the second type parameter information, and perform corresponding processing on the data to be processed.
[0056] In a possible implementation, the second type parameter information includes account identification information of the user account;
[0057] The data processing module is further configured to perform at least one of the following:
[0058] Execute a corresponding data processing command according to the account identification information, and add the account identification information to the data to be processed;
[0059] According to the account preference information corresponding to the account identification information, a data processing command corresponding to the account preference information is executed, and the data to be processed is processed accordingly based on the account preference information.
[0060] In a possible implementation, it also includes:
[0061] A cache query module is configured to execute a query on a preset cache space; the cache space is used to cache historical data processing results corresponding to each data processing template;
[0062] The data processing module is further configured to execute, if the cache space contains the target cache data, obtain the target cache data as a processing result corresponding to the data request, and return it to the client of the data request;
[0063] The target cache data is a historical data processing result obtained by processing the data to be processed using the corresponding data processing template.
[0064] In a possible implementation, the data processing module is further configured to execute: if the cache space does not contain the target cache data, execute the data processing command contained in the corresponding data processing template to process the data to be processed.
[0065] In a possible implementation, the data processing commands in the data processing template include at least one of the following categories:
[0066] The first type of data processing commands configured by the client;
[0067] The second type of data processing command preset by the server;
[0068] The device also includes:
[0069] A command acquisition module, configured to execute and acquire the first type of data processing commands and / or the second type of data processing commands;
[0070] The template generation module is configured to generate the data processing template based on the first type of data processing commands and / or the second type of data processing commands.
[0071] According to a fourth aspect, a data processing device is provided, the device comprising:
[0072] An information acquisition module is configured to acquire a data storage address of data to be processed and a template identifier of a data processing template; the data processing template includes at least one data processing command;
[0073] A request generation module is configured to execute and generate a data request; the data request includes the data storage address and the template identifier;
[0074] The request sending module is configured to execute and send the data request; the data request is used to indicate obtaining the data to be processed corresponding to the data storage address and obtaining the data processing template corresponding to the template identifier, and executing the data processing command contained in the corresponding data processing template to process the data to be processed.
[0075] In a possible implementation, the data processing commands in the data processing template include at least one of the following categories:
[0076] The first type of data processing commands configured by the client;
[0077] The second type of data processing command preset by the server;
[0078] The device also includes:
[0079] A command configuration module, configured to execute and obtain the first type of data processing command;
[0080] The command sending module is configured to execute sending the first type of data processing command to the server, and the server is used to generate the data processing template based on the first type of data processing command and / or the second type of data processing command.
[0081] In a fifth aspect, an electronic device is provided, including:
[0082] processor;
[0083] a memory for storing instructions executable by the processor;
[0084] Wherein, the processor is configured to execute the instructions to implement the data processing method as described in any embodiment of the first aspect above.
[0085] In a sixth aspect, a server is provided, including:
[0086] processor;
[0087] a memory for storing instructions executable by the processor;
[0088] Wherein, the processor is configured to execute the instructions to implement the data processing method as described in any embodiment of the second aspect.
[0089] In a seventh aspect, a storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the data processing method as described in any embodiment of the first aspect above.
[0090] In an eighth aspect, a storage medium is provided. When the instructions in the storage medium are executed by a processor of a server, the server is enabled to execute the data processing method as described in any embodiment of the second aspect above.
[0091] In the ninth aspect, a computer program product is provided, the program product comprising a computer program, the computer program being stored in a readable storage medium, at least one processor of a device reading and executing the computer program from the readable storage medium, so that the device executes the data processing method described in any one of the embodiments of the first aspect or the second aspect.
[0092] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0093] Based on the data processing template, when the client needs to consume data (including but not limited to accessing data and downloading data), the data request sent to the server only needs to carry the data storage address and template identifier. After receiving the request, the server obtains the original data to be processed through the data storage address, and obtains the corresponding data processing template through the template identifier, and uses the data processing commands contained in the data processing template to process the data to be processed, and returns the processed data to the client. In this way, more complex data processing commands can be pre-set in the data processing template to perform more complex data processing on the data to be processed, and the amount of information carried in the data request can be reduced, and the time overhead of generating, transmitting and parsing data requests can be reduced to meet the scenario of data real-time; at the same time, the specific command information of data processing is not directly carried in the data request, and the exposure of related information can also be avoided.
[0094] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0095] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0096] Figure 1 The invention is an application environment diagram of a data processing method according to an exemplary embodiment.
[0097] Figure 2 is an application environment diagram of a data processing method according to another exemplary embodiment.
[0098] Figure 3 The invention is a flowchart of a data processing method according to an exemplary embodiment.
[0099] Figure 4 is a flowchart of a data processing method according to another exemplary embodiment.
[0100] Figure 5 is a flow chart of a data processing method according to yet another exemplary embodiment.
[0101] Figure 6 It is a block diagram of a data processing device according to an exemplary embodiment.
[0102] Figure 7 is a block diagram of a data processing device according to another exemplary embodiment.
[0103] Figure 8 The figure is a diagram showing the internal structure of an electronic device according to an exemplary embodiment.
[0104] Fig. 9 is a diagram showing an internal structure of an electronic device according to another exemplary embodiment. DETAILED DESCRIPTION
[0105] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0106] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. 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.
[0107] The data processing method provided by the present disclosure can be applied to Figure 1In the application environment shown in FIG. 1 , the electronic device 110 interacts with the server 120 through a network. An application is installed in the electronic device 110, and the application may be a community application. After a user registers an account and logs in through the application, the user may upload content data or account data to the server, and may also access or download corresponding business data through the application, including but not limited to viewing the avatar information uploaded by the current logged-in account through the application, or downloading the content information data uploaded by the user or other accounts.
[0108] As a more specific example, see Figure 2 As shown, the data processing method provided by the present disclosure can be used in an application environment, and can also include a database and a template library, wherein the database is used to store the original data of the user account uploaded by the client (including but not limited to pictures, videos, texts, audio and other types of data), and the template library is used to store one or more pre-configured data processing templates, and the data processing template contains several data processing commands, and the data processing template can be quickly obtained through the data processing template. The multiple data processing commands contained in the data processing template. The client sends the original data to the server, and the server stores the original data in the database and returns the url of the original data to the client (the url of the original data in the present disclosure is the storage address of the original data in the database). Further, when the client or other clients need to access or download these original data, in response to the user's request instruction, based on the url of the original data and the template identifier of the data processing template selected by the user, urlB is generated, and a data request containing the urlB is generated, and a data request containing the urlB is sent to the server. On the server side, the data storage address and template identifier can be obtained based on urlB included in the data request, the database can be accessed based on the data storage address to obtain the data to be processed, and the template library can be accessed based on the template identifier to obtain the corresponding data processing template, and then the data processing command included in the corresponding data processing template can be used to process the data to be processed.
[0109] As an example, continue to refer to Figure 2On the server side, the client's data request can be sent to the gateway system, and the gateway system can parse the data request to obtain the data storage address and template identifier contained in the data request, obtain the original data (hereinafter referred to as the data to be processed) from the database according to the data storage address, and send the template identifier to the template parsing system; the template parsing system can obtain the corresponding data processing template from the template library according to the template identifier, parse the data processing template to obtain the data processing command and send it to the gateway system; the gateway system is also used to send the data processing command and the data to be processed to the command execution system; the command execution system is used to execute the data processing command obtained by parsing the data processing template for the data to be processed to obtain the processed data. Among them, one or more of the template parsing system, the gateway system, and the command execution system can be a hardware module or software module set in the server, or a hardware module or software module set in other devices other than the server, and the other device communicates with the server through the network. When the command execution system is a hardware module or software module set in other devices, the command execution system also returns the processed data to the gateway system, and the server is also used to receive the processed data transmitted by the gateway system.
[0110] The electronic device 110 may be, but is not limited to, various personal computers, laptop computers, smart phones, and tablet computers, and the server 120 may be, but is not limited to, an independent server or a server cluster consisting of multiple servers.
[0111] Figure 3 FIG. 1 is a flow chart of a data processing method according to an exemplary embodiment, which can be applied to a server. Figure 3 As shown, the method includes the following steps.
[0112] Step 301: receiving a data request, wherein the data request includes a data storage address of data to be processed and a template identifier of a data processing template; the data processing template includes at least one data processing command.
[0113] The data storage address of the data to be processed can be understood as the storage address of the data to be processed in the database, and the template identifier can be understood as information that can uniquely identify the corresponding data processing template from multiple data processing templates, such as a template ID. The data processing command in the data processing template can be a data processing command preset on the server side, or a data processing command pre-configured for a user account on the client side. The types of data processing commands include but are not limited to commands of the add, delete, modify, etc.
[0114] In the present disclosure, the data request can be sent by the client, and the server receives the data request, and obtains the data storage address and template identifier of the data to be processed from the data request. The user of the client can select data as the data to be processed, and can also select one or more data processing templates from a number of data processing templates for the data to be processed. Correspondingly, on the client, the data storage address corresponding to the data to be processed is obtained, and the template identifier of one or more data processing templates selected by the user is obtained, and the corresponding data request is generated and sent to the server. Based on the data request of the client, the server can obtain the data storage address of the data currently requested by the client and the template identifier of the data processing template used to process the data.
[0115] Step 302: Acquire the data to be processed corresponding to the data storage address, and acquire the data processing template corresponding to the template identifier.
[0116] As an exemplary embodiment, as described above, the original data uploaded by the client is stored in a database, and the data processing template is stored in a template library. The database and the template library can be respectively set in a network node accessible to the request receiving end (e.g., a server) of the data request, such as a cloud network node. The request receiving end (e.g., a server) can obtain the data to be processed corresponding to the data storage address and the data processing template corresponding to the template identifier by querying the database and the template library.
[0117] Step 303: execute the data processing command contained in the corresponding data processing template to process the data to be processed.
[0118] As an exemplary embodiment, the request receiving end of the data request (such as a server) can obtain the corresponding data processing template from the template library through the template parsing system, and parse the data processing template to obtain a data processing command; and then can execute the data processing command parsed from the data processing template through the command execution system, thereby obtaining processed data.
[0119] Through the data processing method of the above embodiment, based on the pre-configured data processing template, when the client needs to consume data (including but not limited to accessing data and downloading data), the data request sent to the server only needs to carry the data storage address and template identifier. After receiving the request, the server obtains the original data to be processed through the data storage address, and obtains the corresponding data processing template through the template identifier, and uses the data processing command contained in the data processing template to process the data to be processed, and returns the processed data to the client. In this way, more complex data processing commands can be pre-set in the data processing template to perform more complex data processing on the data to be processed, and the amount of information carried in the data request can be reduced, and the time overhead of generating, transmitting and parsing data requests can be reduced to meet the scenario of data real-time; at the same time, the specific command information of data processing is not directly carried in the data request, and the exposure of related information can also be avoided.
[0120] As an embodiment, in addition to the data processing command, the data processing template may also include first type parameter information, which may be parameter information pre-configured for the data processing command, and thus may also be understood as static parameter information. For different data processing commands, the corresponding static parameters may be different.
[0121] Based on this, the specific data processing method in the above step 303 may include:
[0122] Obtaining the data processing command contained in the corresponding data processing template;
[0123] Acquire first type parameter information corresponding to the data processing command from the data processing template;
[0124] Execute a corresponding data processing command according to the first type parameter information to process the data to be processed.
[0125] It should be noted that the first type parameter information corresponding to the data processing command in the data processing template can be one or more. For example, a data processing command is a cropping command, which contains two parameters: cropping method and cropping size. Then, two first type parameter information are obtained from the template (cropping method: center, cropping size: 90*90).
[0126] Through this embodiment, since the data processing commands and the static parameter information corresponding to the data processing commands are all included in the data processing template, when the client consumes data (including but not limited to accessing data and downloading data), it only needs to carry the template identifier in the data request, and there is no need to carry specific data processing commands and static parameter information. This will not cause the data request sent by the client to have a longer amount of data. In addition, it can also prevent the leakage of specific command information or parameter information.
[0127] As an embodiment, in addition to the data storage address and the template identifier, the data request may also include second type parameter information, which is parameter information corresponding to the user account of the client sending the data request, so the second type parameter information may also be understood as dynamic parameter information. For different user accounts, the corresponding dynamic parameter information may be different or the same.
[0128] Based on this, the specific data processing method in the above step 303 may also include:
[0129] Obtaining the data processing command contained in the corresponding data processing template;
[0130] Acquire second type parameter information corresponding to the data processing command from the data request;
[0131] Execute a corresponding data processing command according to the second type parameter information, and perform corresponding processing on the data to be processed.
[0132] As a specific example, the second type parameter information may include account identification information of the user account of the client, such as at least one of an account name and an account ID; the above-mentioned executing the corresponding data processing command according to the second type parameter information and performing corresponding processing on the data to be processed may specifically include:
[0133] A corresponding data processing command is executed according to the account identification information, and the account identification information is added to the data to be processed. For example, a data processing command for inserting a watermark is executed according to the account identification information, and a watermark is added to the data to be processed, wherein the watermark includes at least one of an account name and an account ID.
[0134] Alternatively, according to the account preference information corresponding to the account identification information, a data processing command corresponding to the account preference information is executed, and the data to be processed is processed based on the account preference information. For example, if the data to be processed is user avatar data, the account identification information is obtained from the data request, and according to the account identification information, the account preference information corresponding to the account identification is queried from the corresponding business system to obtain, such as image style preference information such as literary style, nostalgic style, handsome style, or special effect preference information such as beauty and magic watch, and correspondingly, the user avatar data to be processed is processed into the style corresponding to the image style preference information of the account, or special effects corresponding to the special effect preference information of the account are added to the user avatar data to be processed. Among them, the business system can determine the account preference information corresponding to the user account based on the previous image operation information and / or image browsing information of the user account.
[0135] It should be noted that the second type parameter information corresponding to the data processing command in the data processing template can be one or more. For example, a data processing command is an insert command, which contains two parameters: the inserted content and the insertion position corresponding to the inserted content. In this case, two second type parameter information (such as account ID, lower right corner) are obtained from the data request.
[0136] Through this embodiment, when the client consumes data (including but not limited to accessing data and downloading data), it can personalize the dynamic parameter information (i.e., the second type of parameter information) used to execute the data processing command, and include the data storage address, template identifier and dynamic parameter information in the data request sent to the server. The server can obtain the dynamic parameter information to execute the corresponding data processing command, thereby obtaining different data processing effects for different users; the sent data request does not need to carry specific data processing commands, which reduces the complexity of generating and parsing data requests and does not cause the data request sent by the client to have a longer data volume. In addition, the leakage of specific command information can also be prevented.
[0137] In addition, the data processing command can also correspond to the first type of parameter information and the second type of parameter information at the same time. For example, a data processing command is a cropping command, which contains two parameters: cropping method and cropping size. The cropping method can be configured to correspond to the first type of parameter information, and the cropping size can be configured to correspond to the second type of parameter information. The first type of parameter information corresponding to the cropping method can be obtained from the data processing template (such as: center cropping), and the second type of parameter information corresponding to the cropping size can be obtained from the data request (such as: requesting the display screen size corresponding to the client). Specifically, different data processing commands can be configured according to different scenarios to support complex data requirements in multiple scenarios.
[0138] As an exemplary scenario, when receiving requests for user avatar data of user accounts from different clients, the server needs to scale the user avatars of all user accounts by 3 times and crop them into a 90*90 image in the center. The output format is jpeg, and for different user accounts, a watermark containing the respective user account ID is added.
[0139] In this scenario, the data processing template contains data processing commands for scaling, center cropping, adding watermarks, and format conversion of the user's avatar, where the scaling data processing command corresponds to the scaling method parameter C1, the center cropping data processing command corresponds to the cropping method parameter C2 and the cropping size parameter C3, the format conversion data processing command corresponds to the output format parameter C4, and the watermarking data processing command corresponds to the user account ID parameter S1. The data processing template also contains static parameter information: scaling method parameter C1 = proportional scaling 3 times, cropping method parameter C2 = center cropping, cropping size parameter C3 = 90*90, output format parameter C4 = jpeg. The data request sent by the client also includes dynamic parameter information: specific information of the user account ID parameter S1, such as S1 = XX0011.
[0140] After the server receives the data request from the client, it parses the data request to obtain the data storage address, template identifier and dynamic parameter information, obtains the data to be processed corresponding to the user account (the user portrait data in this example) according to the data storage address, and obtains the corresponding data processing template from the template library according to the template identifier. The data processing template includes data processing commands for scaling, centering, adding watermarks and format conversion of the user portrait.
[0141] Furthermore, the server obtains the above-mentioned data processing commands of scaling, center cropping, adding watermarks and format conversion from the data processing template, and obtains the corresponding static parameter information from the data processing template. In this example, the static parameter information obtained from the data processing template is: scaling method parameter C1 = proportional scaling 3 times, cropping method parameter C2 = center cropping, cropping size parameter C3 = 90*90, output format parameter C4 = jpeg. In addition, the corresponding dynamic parameter information can also be obtained from the data request, which is the user account ID parameter S1 = XX0011 in this example.
[0142] Then, according to the static parameter information and the dynamic parameter information, the data processing command obtained from the data processing template is executed to perform data processing on the user avatar corresponding to the user account.
[0143] Finally, the server returns the processed data to the client, that is, the user portrait obtained after scaling, cropping, adding watermarks and format conversion is returned to the client.
[0144] Since the data processing commands and the static parameter information corresponding to the data processing commands are included in the data processing template, the client can also personalize the dynamic parameter information when consuming data (including but not limited to accessing data and downloading data), and include the data storage address, template identifier and dynamic parameter information set by the user in the data request sent to the server, without including specific data processing commands and static parameter information. This will not result in a longer data volume in the data request sent by the client, and will reduce the time overhead of generating, transmitting and parsing data requests. In addition, the leakage of specific commands and static parameter information can also be prevented.
[0145] As an embodiment, after obtaining the data to be processed and the template identifier in the above step 302, the following steps may also be included:
[0146] Query a preset cache space; the cache space is used to cache historical data processing results corresponding to each data processing template; if the cache space contains target cache data, obtain the target cache data as the processing result corresponding to the data request, and return it to the client; wherein the target cache data is the data processing result obtained by processing the data to be processed using the corresponding data processing template.
[0147] In addition, it may also include: if the cache space does not contain the target cache data, executing the data processing command contained in the corresponding data processing template, processing the data to be processed, and returning the processed data to the client.
[0148] In addition, after executing the step of processing the data to be processed by using the data processing command contained in the corresponding data processing template, the data processing result obtained by this execution can also be added to the cache space, and an association relationship between the data processing result and the corresponding data processing template and the data storage address is established, so as to prepare for the subsequent receipt of the same data by the client.
[0149] Through the above embodiments, based on the cache mechanism, the server does not need to repeatedly execute the same processing process for the same data, which can greatly reduce the processing level of the server.
[0150] In addition, the data processing commands in the data processing template of the present disclosure include at least one of the following categories: a first category of data processing commands configured by the client; a second category of data processing commands preset by the server; as an embodiment, the method further includes:
[0151] Obtain a first type of data processing command configured by the client, and / or obtain a second type of data processing command preset by the server; generate the data processing template based on the first type of data processing command and / or the second type of data processing command, and store the data processing template in a preset template library.
[0152] In the present disclosure, the first type of data processing command may be a data processing command configured through a template configuration page preset by a client; the second type of data processing command may be a data processing command preset in a server during the server construction phase, used to generate a data processing template, or a data processing command migrated to the server through upgrade data when the server is upgraded, used to generate or update the data processing template. The types of the first type of data processing command and the second type of data processing command are not limited, and may include one or more types of data processing commands of adding (or inserting), modifying, and deleting.
[0153] The client generates the data processing template based on the first type of data processing command and / or the second type of data processing command, and stores the data processing template in a preset template library, which may specifically include:
[0154] 1) The client obtains a template configuration instruction; the template configuration instruction may be generated by a template configuration option preset by the user triggering the client;
[0155] 2) query whether the first type of data processing command configured by the client is obtained, and query whether the command identifier of the second type of data processing command configured by the client is obtained;
[0156] The client user may configure the first type of data processing command based on the template configuration page of the client, and may also select the command identifier of the second type of data processing command based on the template configuration page.
[0157] 3) As a scenario, if the first type of data processing command configured by the client is queried, and the command identifier of the second type of data processing command configured by the client is also queried, the client obtains the first type of data processing command, and requests the server to obtain the second type of data processing command corresponding to the command identifier;
[0158] Furthermore, the client generates a data processing template based on the acquired first-type data processing commands and second-type data processing commands, and generates a corresponding template identifier for the data processing template for uniquely identifying the data processing template, and stores the data processing template and its corresponding template identifier in a preset template library.
[0159] 4) As another situation, if the locally configured first-category data processing command is found, but the command identifier of the locally configured second-category data processing command is not found, that is, the client locally only configures the first-category data processing command, and does not select the command identifier of the second-category data processing command, then the client obtains the locally configured first-category data processing command, and does not need to request the server to obtain the corresponding second-category data processing command;
[0160] Furthermore, the client generates a data processing template based on the first type of data processing command, and generates a corresponding template identifier for the data processing template for uniquely identifying the data processing template, and stores the data processing template and its corresponding template identifier in a preset template library.
[0161] 5) As another situation, if the locally configured first-category data processing command is not found, but the command identifier of the locally configured second-category data processing command is found, that is, the client user has only configured the command representation of the second-category data processing command based on the template configuration page, and has not configured the first-category data processing command, then the client requests the server to obtain the second-category data processing command corresponding to the command identifier;
[0162] Furthermore, the client generates a data processing template based on the acquired second type of data processing command, and generates a corresponding template identifier for the data processing template for uniquely identifying the data processing template, and stores the data processing template and its corresponding template identifier in a preset template library.
[0163] Based on this, the client can flexibly configure data processing commands to meet the different needs of different users. At the same time, the server can also uniformly configure data processing commands without the client sending data processing commands to the server, so as to improve configuration efficiency.
[0164] Figure 4 is a flow chart of a data processing method according to an exemplary embodiment. Figure 4 As shown, the method is used in a client-server interactive system and includes the following steps.
[0165] Step 401: The client uploads the original data of the user account.
[0166] Step 402: The server receives the original data of the user account uploaded by the client, and stores the original data in a corresponding database.
[0167] Step 403: The server returns the data storage address of the original data to the client.
[0168] Step 404: the client sends a data request, wherein the data request includes a data storage address of the data to be processed and a template identifier of a data processing template.
[0169] Step 405: Receive a data request from the client, obtain the data storage address and the template identifier from the data request, obtain the data to be processed corresponding to the data storage address, and obtain the data processing template corresponding to the template identifier.
[0170] As an embodiment, the server may query a cloud database and obtain the to-be-processed data corresponding to the data storage address from the cloud database; the cloud database is used to store various original data uploaded by the client.
[0171] In addition, the server may query a pre-set cloud template library and obtain a data processing template corresponding to the template identifier from the cloud template library; the cloud template library is used to store at least one data processing template.
[0172] Step 406, the server queries a preset cache space; the cache space is used to cache historical data processing results corresponding to each data processing template;
[0173] Step 407: If the cache space contains the target cache data, the target cache data is obtained as a processing result corresponding to the data request, and the processing result is returned to the client.
[0174] Step 408: If the cache space does not contain the target cache data, execute the data processing command contained in the corresponding data processing template, process the data to be processed, and return the processing result to the client.
[0175] Among them, after determining that the cache space does not contain the target cache data, the server can determine the parameters to be assigned contained in the data processing command to be executed, and obtain the first type parameter information and / or the second type parameter information corresponding to the parameters to be assigned; the first type parameter information is the parameter information configured in the data processing template, and the second type parameter information is the parameter information corresponding to the user account of the client carried in the data request; then, according to the first type parameter information and / or the second type parameter information, the corresponding data processing command is executed to process the data to be processed.
[0176] Through the above-mentioned embodiments, relatively complex data processing can be performed on the data to be processed, and the amount of information carried in the client request can be reduced, thereby avoiding the client requesting data that is too long. At the same time, specific information about data processing is not directly carried in the request, thereby avoiding information exposure. In addition, based on the caching mechanism, the server side does not need to repeatedly execute the same processing process for the same data, and the processing level of the server side can also be reduced.
[0177] According to an exemplary embodiment, a flowchart of another data processing method is shown, the method is applied to a data request end, such as a client, such as Figure 5 As shown, the method includes:
[0178] S501, obtaining a data storage address of data to be processed and a template identifier of a data processing template; the data processing template includes at least one data processing command.
[0179] The user can select the data to be consumed and the data processing template to be adopted through the corresponding operation interface of the client. The client automatically obtains the data storage address corresponding to the data selected by the user, and automatically obtains the template identifier corresponding to the data processing template selected by the user.
[0180] S502, generating a data request; the data request includes the data storage address and the template identifier.
[0181] As an example, in the generated data request, the template identifier may be added after the data storage address.
[0182] S503, sending the data request; the data request is used to instruct to obtain the data to be processed corresponding to the data storage address, and to obtain the data processing template corresponding to the template identifier, and execute the data processing command contained in the corresponding data processing template to process the data to be processed.
[0183] Among them, the client can send the data request to the request receiving end (such as a server); the data request is used to instruct the request receiving end to obtain the data to be processed corresponding to the data storage address, and to obtain the data processing template corresponding to the template identifier, and execute the data processing command contained in the corresponding data processing template to process the data to be processed.
[0184] Through this embodiment, users do not need to set specific data processing commands in real time when consuming data, and the data request information sent to the server will not directly carry specific data processing commands, thereby avoiding data requests being too long. At the same time, it can prevent specific data processing commands and other related data from being leaked during network transmission.
[0185] As an embodiment, the method further includes: obtaining a first type of data processing command configured by the client, and sending the first type of data processing command to a server. The server is configured to generate the data processing template based on the first type of data processing command and / or the second type of data processing command.
[0186] The server generates the data processing template based on the first type of data processing command and / or the second type of data processing command, which may specifically include:
[0187] 1) The server obtains a template configuration instruction; the template configuration instruction may be sent by the client, or may be automatically triggered when the server is started for the first time, or may be obtained from upgrade data when the server is upgraded.
[0188] 2) Query whether the first type of data processing command sent by the client is received, and query whether the preset second type of data processing command is stored in the server; wherein, the first type of data processing command, the second type of data processing command and their configuration method can refer to the description of the above embodiment.
[0189] 3) As a scenario, if a first type of data processing command sent by the client is queried and a second type of data processing command is also queried, the server generates a data processing template based on the first type of data processing command and the second type of data processing command, generates a corresponding template identifier for the data processing template, which is used to uniquely identify the data processing template, and stores the data processing template and its corresponding template identifier in a preset template library.
[0190] 4) As another situation, if the first type of data processing command sent by the client is queried, and the second type of data processing command is not queried, the server generates a data processing template based on the first type of data processing command, and generates a corresponding template identifier for the data processing template, which is used to uniquely identify the data processing template, and stores the data processing template and its corresponding template identifier in a preset template library.
[0191] 5) As another scenario, if the first type of data processing command sent by the client is not found, but the second type of data processing command is found, the server generates a data processing template based on the second type of data processing command, and generates a corresponding template identifier for the data processing template, which is used to uniquely identify the data processing template, and stores the data processing template and its corresponding template identifier in a preset template library.
[0192] Through this embodiment, different clients can flexibly configure corresponding data processing commands to meet the personalized data processing requirements of different user accounts; at the same time, the data processing commands can also be uniformly configured by the server, without the need for the client to send data processing commands to the server, so as to improve configuration efficiency.
[0193] As an embodiment, the method further includes: the client sending the data request receives the data processing result returned by the server.
[0194] It should be understood that, although the various steps in the above flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above flowchart may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0195] Figure 6 FIG. 5 is a block diagram of a data processing device 500 of a server according to an exemplary embodiment. Figure 6 , the device 500 comprises:
[0196] The request information acquisition module 501 is configured to execute receiving a data request, wherein the data request includes a data storage address of data to be processed and a template identifier of a data processing template; the data processing template includes at least one data processing command;
[0197] The data and template acquisition module 502 is configured to acquire the data to be processed corresponding to the data storage address and acquire the data processing template corresponding to the template identifier;
[0198] The data processing module 503 is configured to execute the data processing commands included in the corresponding data processing template to process the data to be processed.
[0199] As an embodiment, the data processing template further includes first type parameter information, where the first type parameter information is parameter information pre-configured for the data processing command;
[0200] The data processing module 503 is further configured to execute:
[0201] Obtaining the data processing command contained in the corresponding data processing template;
[0202] Acquire first type parameter information corresponding to the data processing command from the data processing template;
[0203] Execute a corresponding data processing command according to the first type parameter information to process the data to be processed.
[0204] As an embodiment, the data request further includes second type parameter information, where the second type parameter information is parameter information corresponding to the user account of the client;
[0205] The data processing module 503 is further configured to execute:
[0206] Obtaining the data processing command contained in the corresponding data processing template;
[0207] Acquire second type parameter information corresponding to the data processing command from the data request;
[0208] Execute a corresponding data processing command according to the second type parameter information, and perform corresponding processing on the data to be processed.
[0209] As an embodiment, the second type parameter information includes account identification information of a user account of the client; the data processing module 503 is further configured to perform at least one of the following:
[0210] Execute a corresponding data processing command according to the account identification information, and add the account identification information to the data to be processed;
[0211] According to the account preference information corresponding to the account identification information, a data processing command corresponding to the account preference information is executed, and the data to be processed is processed accordingly based on the account preference information.
[0212] As an embodiment, the data processing device 500 may further include: a result returning module configured to return the data processing result to the client.
[0213] As an embodiment, the data processing device 500 may further include:
[0214] The cache query module is configured to execute a query of a preset cache space; the cache space is used to cache historical data processing results corresponding to each data processing template; accordingly, the data processing module 503 is also configured to execute if the cache space contains target cache data, obtain the target cache data as the processing result corresponding to the data request, and return it to the client; wherein the target cache data is the historical data processing result obtained by processing the data to be processed using the data processing template.
[0215] As an embodiment, the data processing module 503 is also configured to execute the step of processing the data to be processed using the data processing command contained in the corresponding data processing template if the cache space does not contain the target cache data, and return the processed data to the client.
[0216] As an embodiment, the data processing commands in the data processing template include at least one of the following categories:
[0217] The first type of data processing commands configured by the client;
[0218] The second type of data processing command preset by the server;
[0219] The device 500 further includes:
[0220] A command acquisition module is configured to execute and acquire a first type of data processing command configured by the client, and / or acquire a second type of data processing command preset by the server;
[0221] And, a template generation module is configured to generate the data processing template based on the first type of data processing commands and / or the second type of data processing commands.
[0222] Figure 7 FIG. 6 is a block diagram of a data processing device 600 of a client according to an exemplary embodiment. Figure 7 , the device 600 comprises:
[0223] The information acquisition module 601 is configured to acquire a data storage address of the data to be processed and a template identifier of a data processing template; the data processing template includes at least one data processing command;
[0224] The request generation module 602 is configured to generate a data request; the data request includes the data storage address and the template identifier;
[0225] The request sending module 603 is configured to execute the sending of the data request; the data request is used to trigger the request receiving end to obtain the data to be processed corresponding to the data storage address, and obtain the data processing template corresponding to the template identifier; and execute the data processing command contained in the corresponding data processing template to process the data to be processed.
[0226] As an embodiment, the data processing commands in the data processing template include at least one of the following categories:
[0227] The first type of data processing commands configured by the client;
[0228] The second type of data processing commands preset by the server;
[0229] The apparatus 600 may further include:
[0230] A command configuration module, configured to execute a first type of data processing command for obtaining client configuration;
[0231] And, a command sending module is configured to execute sending the first type of data processing command to the server, and the server is also used to generate the data processing template based on the first type of data processing command and / or the second type of data processing command.
[0232] The device 600 may further include: a result receiving module configured to execute and receive a data processing result returned by the server.
[0233] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0234] Figure 8 700 is a block diagram of a device 700 for data processing according to an exemplary embodiment. For example, the device 700 may be a server. Figure 8 , the device 700 includes a processing component 720, which further includes one or more processors, and a memory resource represented by a memory 722 for storing instructions, such as applications, that can be executed by the processing component 720. The application stored in the memory 722 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 720 is configured to execute instructions to perform the above-mentioned data processing method.
[0235] The device 700 may also include a power component 724 configured to perform power management of the device 700, a wired or wireless network interface 726 configured to connect the device 700 to a network, and an input / output (I / O) interface 728. The device 700 may operate based on an operating system stored in the memory 722, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.
[0236] In an exemplary embodiment, a storage medium including instructions is also provided, such as a memory 722 including instructions, which can be executed by a processor of the device 700 to perform the above method. The storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0237] Fig. 9 8 is a block diagram of a device 800 for data processing according to an exemplary embodiment. For example, the device 800 may be a terminal device, a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0238] Reference Fig. 9 , device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0239] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0240] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 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.
[0241] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0242] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0243] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0244] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0245] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0246] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, a carrier network, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0247] In an exemplary embodiment, the device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FP7A), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0248] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0249] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0250] 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.
Claims
1. A data processing method, characterized in that: The method comprises: Receive a data request; the data request includes a data storage address of the data to be processed and a template identifier of a data processing template; the data processing template includes at least one data processing command among a zoom command, a crop command, a watermark adding command and a special effect adding command; the data to be processed is user avatar data selected by a user of the client; the template identifier is a template identifier of at least one of the data processing templates selected by the user; Acquire the data to be processed corresponding to the data storage address, and acquire the data processing template corresponding to the template identifier; wherein the data processing template further includes first type parameter information; the first type parameter information is parameter information pre-configured for the data processing command; the data request further includes second type parameter information; the second type parameter information includes account identification information and account preference information corresponding to the user account of the client sending the data request; Acquire a data processing command included in the corresponding data processing template; acquire first type parameter information corresponding to the data processing command from the data processing template; acquire second type parameter information corresponding to the data processing command from the data request; At the same time, the data processing commands in the data processing template are executed according to the first type parameter information and the second type parameter information to process the data to be processed; wherein the corresponding data processing command is obtained after configuring the parameters included in the data processing command based on the first type parameter information and the second type parameter information; the cropping command is executed based on the first type parameter information and the second type parameter information.
2. The method according to claim 1, characterized in that The second type parameter information includes account identification information of the user account; and executing a corresponding data processing command according to the second type parameter information to perform corresponding processing on the to-be-processed data includes at least one of the following: Execute a corresponding data processing command according to the account identification information, and add the account identification information to the data to be processed; According to the account preference information corresponding to the account identification information, a data processing command corresponding to the account preference information is executed, and the data to be processed is processed accordingly based on the account preference information.
3. The method according to any one of claims 1 to 2, characterized in that: Between obtaining the data to be processed and the corresponding data processing template and executing the data processing command included in the corresponding data processing template, the method further includes: Query a preset cache space; the cache space is used to cache historical data processing results corresponding to each data processing template; If the cache space contains target cache data, the target cache data is returned to the client that sends the data request; the target cache data is a data processing result obtained by executing the corresponding data processing template to process the data to be processed.
4. The method according to claim 3, characterized in that The method further comprises: If the cache space does not contain the target cache data, execute the data processing command contained in the corresponding data processing template to process the data to be processed.
5. The method according to claim 1, characterized in that: The data processing commands in the data processing template include at least one of the following categories: The first type of data processing commands configured by the client; The second type of data processing commands preset by the server; The method further comprises: Obtaining the first-category data processing command and / or the second-category data processing command; The data processing template is generated based on the first type of data processing commands and / or the second type of data processing commands.
6. A data processing method, characterized in that: The method comprises: Acquire a data storage address of the data to be processed and a template identifier of a data processing template; the data processing template includes at least one data processing command among a zoom command, a crop command, a watermark adding command and a special effect adding command; the data to be processed is user avatar data selected by a user of the client; the template identifier is a template identifier of at least one of the data processing templates selected by the user; Generate a data request; the data request includes the data storage address and the template identifier; Sending the data request; the data request is used to instruct obtaining the data to be processed corresponding to the data storage address and obtaining the data processing template corresponding to the template identifier, and obtaining the data processing command contained in the corresponding data processing template; obtaining the first type parameter information corresponding to the data processing command from the data processing template; obtaining the second type parameter information corresponding to the data processing command from the data request; and executing the data processing command in the data processing template according to the first type parameter information and the second type parameter information at the same time, processing the data to be processed; wherein the corresponding data processing command is obtained by configuring the parameters contained in the data processing command based on the first type parameter information and the second type parameter information; and the cropping command is executed based on the first type parameter information and the second type parameter information; Among them, the data processing template also includes first type parameter information; the first type parameter information is parameter information pre-configured for the data processing command; the data request also includes second type parameter information; the second type parameter information includes account identification information and account preference information corresponding to the user account of the client sending the data request.
7. The method according to claim 6, characterized in that The data processing commands in the data processing template include at least one of the following categories: The first type of data processing commands configured by the client; The second type of data processing commands preset by the server; The method further comprises: Obtaining the first type of data processing command; The first type of data processing command is sent to a server, and the server is used to generate the data processing template based on the first type of data processing command and / or the second type of data processing command.
8. A data processing device, characterized in that: The device comprises: The request information acquisition module is configured to execute and receive a data request, wherein the data request includes a data storage address of the data to be processed and a template identifier of a data processing template; the data processing template includes at least one data processing command selected by a zoom command, a crop command, a watermark adding command, and a special effect adding command; the data to be processed is user avatar data selected by a user of the client; and the template identifier is a template identifier of at least one of the data processing templates selected by the user; A data and template acquisition module, configured to execute acquisition of the to-be-processed data corresponding to the data storage address, and to acquire the data processing template corresponding to the template identifier; wherein the data processing template further includes first type parameter information; the first type parameter information is parameter information pre-configured for the data processing command; the data request further includes second type parameter information; the second type parameter information includes account identification information and account preference information corresponding to the user account of the client sending the data request; A data processing module is configured to obtain a data processing command contained in the corresponding data processing template; obtain first type parameter information corresponding to the data processing command from the data processing template; obtain second type parameter information corresponding to the data processing command from the data request; and simultaneously execute the data processing command in the data processing template according to the first type parameter information and the second type parameter information to process the data to be processed; wherein the corresponding data processing command is obtained after configuring the parameters contained in the data processing command based on the first type parameter information and the second type parameter information; and the cropping command is executed based on the first type parameter information and the second type parameter information.
9. The device according to claim 8, characterized in that The second type parameter information includes account identification information of the user account; The data processing module is further configured to perform at least one of the following: Execute a corresponding data processing command according to the account identification information, and add the account identification information to the data to be processed; According to the account preference information corresponding to the account identification information, a data processing command corresponding to the account preference information is executed, and the data to be processed is processed accordingly based on the account preference information.
10. The device according to any one of claims 8 to 9, characterized in that Also includes: A cache query module, configured to execute a query on a preset cache space; The cache space is used to cache historical data processing results corresponding to each data processing template; The data processing module is further configured to execute, if the cache space contains the target cache data, obtain the target cache data as a processing result corresponding to the data request, and return it to the client of the data request; The target cache data is a historical data processing result obtained by processing the data to be processed using the corresponding data processing template.
11. The device according to claim 10, characterized in that The data processing module is further configured to execute: if the cache space does not contain the target cache data, execute the data processing command contained in the corresponding data processing template to process the data to be processed.
12. The device according to any one of claims 8 to 9, characterized in that The data processing commands in the data processing template include at least one of the following categories: The first type of data processing commands configured by the client; The second type of data processing commands preset by the server; The device also includes: A command acquisition module, configured to execute and acquire the first type of data processing commands and / or the second type of data processing commands; The template generation module is configured to generate the data processing template based on the first type of data processing commands and / or the second type of data processing commands.
13. A data processing device, characterized in that: The device comprises: The information acquisition module is configured to execute the acquisition of the data storage address of the data to be processed and the template identifier of the data processing template; the data processing template includes at least one data processing command among a zoom command, a crop command, a watermark adding command and a special effect adding command; the data to be processed is the user portrait data selected by the user of the client; the template identifier is the template identifier of at least one of the data processing templates selected by the user; A request generation module is configured to execute and generate a data request; the data request includes the data storage address and the template identifier; A request sending module is configured to execute and send the data request; the data request is used to instruct to obtain the data to be processed corresponding to the data storage address and the data processing template corresponding to the template identifier, and obtain the data processing command contained in the corresponding data processing template; obtain the first type parameter information corresponding to the data processing command from the data processing template; obtain the second type parameter information corresponding to the data processing command from the data request; and execute the data processing command in the data processing template according to the first type parameter information and the second type parameter information at the same time, and process the data to be processed; wherein the corresponding data processing command is obtained by configuring the parameters contained in the data processing command based on the first type parameter information and the second type parameter information; and the clipping command is executed based on the first type parameter information and the second type parameter information; Among them, the data processing template also includes first type parameter information; the first type parameter information is parameter information pre-configured for the data processing command; the data request also includes second type parameter information; the second type parameter information includes account identification information and account preference information corresponding to the user account of the client sending the data request.
14. The device according to claim 13, characterized in that The data processing commands in the data processing template include at least one of the following categories: The first type of data processing commands configured by the client; The second type of data processing commands preset by the server; The device also includes: A command configuration module, configured to execute and obtain the first type of data processing command; The command sending module is configured to execute sending the first type of data processing command to the server, and the server is used to generate the data processing template based on the first type of data processing command and / or the second type of data processing command.
15. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the data processing method according to any one of claims 1 to 5.
16. A server, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the data processing method as claimed in claim 6 or 7. 17 . A storage medium, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the data processing method according to any one of claims 1 to 5.
18. A storage medium, when instructions in the storage medium are executed by a processor of a server, enables the server to execute the data processing method according to claim 6 or 7.
19. A computer program product comprising computer instructions, characterized in that When the computer instruction is executed by the processor, the data processing method according to any one of claims 1 to 5 is implemented; or, when the computer instruction is executed by the processor, the data processing method according to claim 6 or 7 is implemented.
Citation Information
Patent Citations
Data loading method and apparatus
CN105718540A
Batched instruction parsing method, batched instruction parsing apparatus and batched instruction parsing device
CN108804140A
3D sound effect processing method and related product
CN109254752A
