Data processing method, device, server and storage medium
By splicing and storing the query fields of data generation conditions, the problem of adding new conditions that has a great impact on user data request responses is solved, and the expansion of data generation conditions and response efficiency are improved.
Patent Information
- Application Number
- CN202110571094.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-25
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-05-25
AI Technical Summary
When traditional data processing technology adds new data generation conditions, it will affect the response to user data requests, resulting in a greater impact on the response.
By obtaining the query fields to be spliced for each data generation condition, the spliced query fields are formed by splicing them, and stored together with the data being checked in the cells of the data table. When adding the query fields to be spliced, only the spliced query in the cell is modified. Field, lock the data row to ensure that the matching of user query fields and other data rows is not affected.
It realizes the expansion of data generation conditions, while reducing the impact on the response to user data requests, ensuring the efficiency and response speed of data requests.
Smart Images

Figure CN113505121B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of computer equipment, and in particular to a data processing method, device, server and storage medium. Background Art
[0002] With the development of computer technology, data processing technology has emerged; one of the data processing technologies is to generate corresponding data according to the data generation conditions selected by the user and return it to the user; for example, in the scenario where the user requests a holiday card, the user can select the corresponding data generation conditions on the client, such as the card issuer (such as father, mother, brother, sister, colleague, etc.) and the holiday type (such as Spring Festival, Dragon Boat Festival), and the backend server receives the data generation conditions selected by the user, generates the corresponding holiday card and feeds it back to the user. However, in the data processing technology provided by the traditional method, if a new data generation condition is added, it will affect the response to the user's data request. Summary of the invention
[0003] The present disclosure provides a data processing method, device, server and storage medium to at least solve the problem in the related art that when a new data generation condition is added, the response to the user data request is greatly affected. The technical solution of the present disclosure is as follows:
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided a data processing method, including:
[0005] Obtain the query fields to be spliced for each data generation condition;
[0006] Splicing the query fields to be spliced to obtain a spliced query field;
[0007] The spliced query field and the queried data are stored in cells of the data table in correspondence; any queried data is formed according to the data generation condition corresponding to the corresponding stored spliced query field;
[0008] Acquire user query fields and concatenate the user query fields to obtain a user concatenated query field; the user query field is a query field selected by the user in the query fields to be concatenated;
[0009] According to the match between the user's concatenated query field and the concatenated query field stored in the cell of the data table, the target queried data fed back to the user is determined.
[0010] In one embodiment, after the step of storing the concatenated query field and the queried data in cells of a data table correspondingly, the method further includes:
[0011] Determine the cell to be modified in the cells storing the concatenated query field;
[0012] The newly added query field to be spliced is spliced into the splicing query field of the cell to be modified to form a modified splicing query field; the newly added query field to be spliced is a query field to be spliced for newly added data generation conditions.
[0013] In one embodiment, the step of splicing the newly added query field to be spliced into the splicing query field of the cell to be modified to form a step of modifying the splicing query field includes:
[0014] Controlling the data row where the cell to be modified is located to be in a locked state;
[0015] When the data row is in a locked state, the newly added query field to be spliced is spliced into the splicing query field of the cell to be modified to form a modified splicing query field.
[0016] In one embodiment, after the step of splicing the newly added query field to be spliced into the splicing query field of the cell to be modified to form a modified splicing query field, the method further includes:
[0017] receiving a first user query field;
[0018] If the first user query field does not include the newly added query field to be spliced, splicing the first user query field with a preset field to obtain a first user spliced query field; the preset field is a field for the newly added query field to be spliced;
[0019] If the first user splicing query field matches the modified splicing query field, the queried data corresponding to the modified splicing query field is fed back to the first user; the queried data corresponding to the modified splicing query field is the queried data corresponding to the splicing query field of the cell to be modified.
[0020] In one embodiment, after the step of storing the concatenated query field and the queried data in cells of a data table correspondingly, the method further includes:
[0021] Get the newly added query fields to be spliced for the newly added data generation conditions;
[0022] Splicing the newly added query field to be spliced with the query field to be spliced to obtain a newly added spliced query field;
[0023] The newly added splicing query field and the newly added checked data are stored in the cells of the data table correspondingly; wherein the cell storing the newly added splicing query field and the cell storing the splicing query field are the same data column, and the cell storing the newly added checked data and the cell storing the checked data are the same data column.
[0024] In one embodiment, the step of splicing the query fields to be spliced to obtain the spliced query field includes:
[0025] Determine the category to which each data generation condition belongs;
[0026] According to the categories to which the data generation conditions belong, the query fields to be spliced of the data generation conditions are combined to obtain multiple field groups; wherein the query fields to be spliced of the data generation conditions of the same category are located in different field groups;
[0027] The query fields to be spliced included in the same field group are spliced to obtain the spliced query fields corresponding to the same field group.
[0028] In one embodiment, the step of splicing the query fields to be spliced included in the same field group to obtain the spliced query field corresponding to the same field group includes:
[0029] splicing the query fields to be spliced included in the same field group according to the category order of the data generation conditions to obtain the spliced query fields corresponding to the same field group;
[0030] The step of splicing the user query fields to obtain a user spliced query field includes:
[0031] The user query fields are concatenated according to the category order to obtain the user concatenated query fields.
[0032] According to a second aspect of an embodiment of the present disclosure, there is provided a data processing device, including:
[0033] A field acquisition unit, configured to execute acquisition of query fields to be spliced of each data generation condition;
[0034] A first concatenation unit is configured to concatenate query fields to obtain a concatenated query field;
[0035] The storage unit is configured to store the spliced query field and the queried data in cells of the data table in correspondence; any queried data is formed according to the data generation condition corresponding to the corresponding stored spliced query field;
[0036] A second splicing unit is configured to obtain a user query field and splice the user query field to obtain a user spliced query field; the user query field is a query field selected by the user in the query field to be spliced;
[0037] The first data feedback unit is configured to perform matching between the user concatenated query field and the concatenated query field stored in the cell of the data table to determine the target queried data to be fed back to the user.
[0038] In one embodiment, the device also includes a modification unit, which is configured to determine a cell to be modified in a cell storing a splicing query field; splice a newly added query field to be spliced into the splicing query field of the cell to be modified to form a modified splicing query field; the newly added query field to be spliced is a query field to be spliced for newly added data generation conditions.
[0039] In one embodiment, the modification unit is configured to execute control to lock the data row where the cell to be modified is located; when the data row is in the locked state, the newly added query field to be spliced is spliced into the splicing query field of the cell to be modified to form a modified splicing query field.
[0040] In one embodiment, the device also includes a second data feedback unit, which is configured to execute receiving a first user query field; if the first user query field does not include the newly added query field to be spliced, the first user query field is spliced with a preset field to obtain a first user spliced query field; the preset field is a field for the newly added query field to be spliced; if the first user spliced query field matches the modified spliced query field, the queried data corresponding to the modified spliced query field is fed back to the first user; the queried data corresponding to the modified spliced query field is the queried data corresponding to the splicing query field of the cell to be modified.
[0041] In one embodiment, the device also includes a new unit, which is configured to execute a new query field to be spliced to obtain a condition for generating new data; splicing the new query field to be spliced with the query field to be spliced to obtain a new spliced query field; storing the new spliced query field and the new searched data in the cells of the data table correspondingly; wherein the cell storing the new spliced query field and the cell storing the spliced query field are the same data column, and the cell storing the new searched data and the cell storing the searched data are the same data column.
[0042] In one embodiment, the first splicing unit is configured to determine the category to which each data generation condition belongs; combine the query fields to be spliced of the data generation conditions according to the category to which the data generation conditions belong to obtain multiple field groups; wherein the query fields to be spliced of the data generation conditions of the same category are located in different field groups; and splice the query fields to be spliced included in the same field group to obtain the spliced query fields corresponding to the same field group.
[0043] In one embodiment, the first concatenation unit is configured to execute concatenation of the query fields to be concatenated included in the same field group according to the category order of the data generation condition, to obtain the concatenated query fields corresponding to the same field group;
[0044] The second splicing unit is configured to perform splicing on the user query fields according to the category order to obtain the user spliced query fields.
[0045] According to a third aspect of an embodiment of the present disclosure, a server is provided, including:
[0046] processor;
[0047] a memory for storing instructions executable by the processor;
[0048] The processor is configured to execute the instructions to implement the above method.
[0049] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of a server, the server is enabled to execute to implement the above method.
[0050] According to a fifth aspect of an embodiment of the present disclosure, there is provided a computer program product, comprising a computer program / instructions, which implement the above method when executed by a processor.
[0051] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects: the spliced query field formed by splicing the query fields to be spliced of the data generation conditions is stored in the cells of the data table. When a new query field to be spliced of the subsequent generation conditions is added, only the spliced query field in the cell is modified, that is, only the data row where the cell is located needs to be locked, which does not affect the user's data request for other data rows. The user's spliced query field can be matched with the spliced query fields of the cells of other data rows to determine the queried data to be fed back to the user, thereby achieving the expansion of the data generation conditions while reducing the impact on the response to the user's data request.
[0052] 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
[0053] 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.
[0054] Figure 1The invention is an application environment diagram of a data processing method according to an exemplary embodiment.
[0055] Figure 2 The invention is a flowchart of a data processing method according to an exemplary embodiment.
[0056] Figure 3 The present invention is a data representation diagram according to an exemplary embodiment.
[0057] Figure 4 The present invention is a data representation diagram according to an exemplary embodiment.
[0058] Figure 5 It is a block diagram of a data processing device according to an exemplary embodiment.
[0059] Figure 6 It is a block diagram of a server according to an exemplary embodiment. DETAILED DESCRIPTION
[0060] 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.
[0061] 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.
[0062] The data processing method provided by the present disclosure can be applied to Figure 1 In the application environment shown, the terminal 110 interacts with the server 120 through the network. The terminal 110 can be, but is not limited to, various mobile phones, tablet computers, wearable devices, laptop computers, etc. The server 120 can be implemented as an independent server or a server cluster composed of multiple servers.
[0063] Figure 2 is a flow chart of a data processing method according to an exemplary embodiment. Figure 2 As shown, the data processing method is used to Figure 1 The server 120 includes the following steps:
[0064] In step S201, the query fields to be spliced of each data generation condition are obtained.
[0065] Among them, the data generation condition mainly refers to the conditions when generating data. For example, in the scenario of generating data such as holiday greeting cards, the data generation condition can be the card issuer (such as father and mother), festival (such as Spring Festival, Dragon Boat Festival), etc.; for another example, in the scenario of generating data such as letter templates, the data generation condition can be the purpose of the letter (such as thank-you letter, job application letter, etc.), letter font (such as Songti, Kaiti, etc.). The server can input the data generation condition into the data generation model so that the data generation model generates data that meets the input data generation condition based on the input data generation condition. Among them, each data generation condition has a corresponding query field. For example, in the scenario of generating data such as holiday greeting cards, the query field of the data generation condition for the card issuer to be father is A1, the query field of the data generation condition for the card issuer to be mother is A2, and the query field of the data generation condition for the festival of Dragon Boat Festival is B1. Since the query fields of the data generation conditions need to be spliced later, the query fields of the data generation conditions can also be called query fields to be spliced.
[0066] In step S202, the query fields to be spliced are spliced to obtain a spliced query field.
[0067] For example, if the query fields to be spliced of the data generation condition are A1, A2, B1 and B2, the server can splice the query fields to be spliced to obtain the spliced query fields, such as Figure 1 A1-B1, A1-B2, A2-B1, etc.
[0068] In step S203, the concatenated query field and the queried data are stored in cells of the data table in correspondence.
[0069] Among them, any queried data is formed according to the data generation condition corresponding to the corresponding stored spliced query field; for example Figure 1 The data ① being checked is formed based on the data generation conditions corresponding to the spliced query fields A1-B1. Taking the above-mentioned holiday greeting card as an example, holiday greeting card ① is formed based on the data generation conditions that the card issuer is dad and the holiday is the Dragon Boat Festival.
[0070] The server may store the concatenated query fields A1-B1 and the queried data corresponding to the concatenated query fields in the same data row / same data column to achieve corresponding storage between the concatenated query fields and the queried data.
[0071] In step S204, the user query fields are acquired and the user query fields are concatenated to obtain a user concatenated query field; the user query field is a query field selected by the user from the query fields to be concatenated.
[0072] The user query field may be a query field selected by the user in the query field of the data generation condition (i.e., the query field to be spliced). For example, if the query fields selected by the user are A1 and B1 in the query fields to be spliced, then after receiving the query fields selected by the user, the server splices the query fields A1 and B1 selected by the user to obtain the user spliced query field A1-B1.
[0073] In step S205, target queried data to be fed back to the user is determined based on the match between the user's concatenated query field and the concatenated query field stored in the cell of the data table.
[0074] After obtaining the user spliced query field A1-B1, the server matches the user spliced query field A1-B1 with the spliced query field in the data table cell, and determines that the target query data fed back to the user is ①.
[0075] In the above data processing method, the spliced query field formed by splicing the query fields to be spliced of the data generation conditions is stored in the cells of the data table. When a new query field to be spliced of the generation conditions is added subsequently, only the spliced query field in the cell is modified, that is, only the data row where the cell is located needs to be locked, which does not affect the user's data request for other data rows. The user's spliced query field can be matched with the spliced query fields of the cells of other data rows to determine the queried data to be fed back to the user, thereby realizing the expansion of the data generation conditions while reducing the impact on the response to the user's data request.
[0076] In one embodiment, after executing the above-mentioned step of storing the spliced query field and the checked data in the cells of the data table accordingly, the server may also execute the following steps: obtaining a newly added query field to be spliced for the newly added data generation condition; splicing the newly added query field to be spliced with the query field to be spliced to obtain a newly added spliced query field; storing the newly added spliced query field and the newly checked data in the cells of the data table accordingly; wherein the cell storing the newly added spliced query field and the cell storing the spliced query field are the same data column, and the cell storing the newly added checked data and the cell storing the checked data are the same data column.
[0077] like Figure 3As shown in the figure, if the query fields to be spliced of the newly added data generation condition (which can be called the newly added query fields to be spliced) are C1 and C2, then the server can splice C1 and C2 with the original query fields to be spliced A1, A2, B1, and B2, and the newly added spliced query fields are A1-B1-C1, A1-B2-C1, A2-B1-C1, A2-B2-C1, A1-B1-C2, A1-B2-C2, A 2-B1-C2, A2-B2-C2; and the server obtains the newly added searched data corresponding to the newly added splicing query fields, such as the newly added searched data corresponding to the newly added splicing query fields A1-B1-C1, A1-B2-C1, A2-B1-C1, A2-B2-C1, A1-B1-C2, A1-B2-C2, A2-B1-C2, and A2-B2-C2 are ⑤, ⑥, ⑦, ⑧, ⑨, ⑩,
[0078] Next, the server determines the data column in which the cells storing the original concatenated query fields A1-B1, A1-B2, A2-B1, and A2-B2 are located, and stores the newly added concatenated query fields in other cells of the data column; the server determines the data column storing the original searched data ① to ④, and stores the newly added searched data in other cells of the data column; wherein the newly added concatenated query fields and the newly added searched data corresponding to the newly added concatenated query fields themselves are stored in the same data row, for example, the newly added concatenated query fields A1-B1-C1 and the corresponding newly added searched data ⑤ are stored in the same data row.
[0079] In the above embodiment, if a new data generation condition is added, the server can splice the corresponding new query field to be spliced with the original query field to be spliced, forming a new spliced query field and storing it in the cell of the data table; in this processing process, if the data to be checked requested by the user is ①, since the data row where data ① is located has not been operated and is in an unlocked state, the server can directly read data ① and return it to the user. In the processing method of the new data generation condition in the above embodiment, compared with the processing method of storing the query field to be spliced of the new data generation condition in the new data column, while realizing the expansion of the data generation condition, there is no need to generate a new data column, avoiding the situation where all data rows (the entire data table) are locked due to the new data column, and does not affect the read and write operations of the original spliced query field and the corresponding checked data.
[0080] In one embodiment, after executing the above-mentioned step of storing the spliced query field and the queried data in the cells of the data table correspondingly, the server may also execute the following steps: determining the cell to be modified in the cells storing the spliced query field; splicing the newly added query field to be spliced into the spliced query field of the cell to be modified to form a modified spliced query field; the newly added query field to be spliced is the query field to be spliced for the newly added data generation condition.
[0081] For example, Figure 4 As shown, if the newly added splicing query field of the newly added data generation condition is C1, then the server can determine the cell to be modified in the cells storing the splicing query fields, such as taking the cell storing the splicing query fields A1-B1 as the cell to be modified; then, the server can splice the newly added splicing query field C1 into the splicing query field A1-B1 to obtain the modified splicing query field A1-B1-C1.
[0082] Furthermore, if the newly added data generation conditions belong to the same category (such as the card issuing object is grandfather or teacher, and these two data generation conditions are both of the card issuing object category), then the server can select any one of the newly added splicing query fields from the newly added query fields to be spliced of the newly added data generation conditions, and splice it with the splicing query field of the cell to be modified. If the newly added splicing query fields are C1 and C2, and the data generation conditions corresponding to these two newly added splicing query fields are of the same category, the server can select C1 and the splicing query field of the cell to be modified for splicing.
[0083] In the above implementation, if a new splicing query field needs to be added to the original splicing query field, the server can directly modify the splicing query field in the cell and only lock the data row where the cell is located without adding a new data column. This expands the data generation conditions while reducing the impact on the response to user data requests.
[0084] Furthermore, when the server executes the above-mentioned step of splicing the newly added query field to be spliced into the splicing query field of the cell to be modified to form a modified splicing query field, it can further execute the following steps: control the data row where the cell to be modified is located to be in a locked state; when the data row is in a locked state, splice the newly added query field to be spliced into the splicing query field of the cell to be modified to form a modified splicing query field.
[0085] That is, when modifying the concatenated query field of the cell to be modified, the server can only lock the data row where the cell to be modified is located, without locking other data rows, thereby reducing the impact on the response to the user data request.
[0086] Furthermore, after executing the above-mentioned step of splicing the newly added query field to be spliced into the splicing query field of the cell to be modified to form a modified splicing query field, the server can also execute the following steps: receiving a first user query field; if the first user query field does not include the newly added query field to be spliced, splicing the first user query field with a preset field to obtain a first user splicing query field; the preset field is a field for the newly added query field to be spliced; if the first user splicing query field matches the modified splicing query field, feeding back the checked data corresponding to the modified splicing query field to the first user; the checked data corresponding to the modified splicing query field is the checked data corresponding to the splicing query field of the cell to be modified.
[0087] For example, in the scenario where the query fields C1 and C2 to be spliced are added to the new data generation condition, the server modifies the original splicing query fields in the data table and adds the splicing query fields, and obtains the following: Figure 4 From the data table shown, it can be seen that the checked data corresponding to the modified splicing query field A1-B1-C1 is the checked data corresponding to the splicing query field A1-B1 of the cell to be modified①. At this time, if the query fields selected by the user (which can be called the first user) are A1 and B1, and the first user query field does not include the newly added query field to be spliced C1 or C2, then it can be considered that the client used by the user is an old client, and the first user cannot select the newly added query field to be spliced through the old client; therefore, the server can select any one of the newly added query fields to be spliced from the newly added query fields to be spliced C1 and C2 as the preset field, and splice the first user query field with the preset field to obtain the first user splicing query field, such as A1-B1-C1. Then, the server matches the first user splicing query field A1-B1-C1 with the splicing query field in the data table (which can be the modified splicing query field or the newly added splicing query field), determines the corresponding checked data① and ⑤, and selects one of the checked data① and ⑤ to feed back to the first user.
[0088] It can be seen that in the above implementation, after modifying the original splicing query field, if the user cannot select the newly added query field to be spliced with the new data generation condition through the old client, then the server can splice the user query field with the preset field, and then determine the corresponding queried data to achieve compatibility with the old client.
[0089] In one embodiment, when the server executes the above-mentioned step of splicing the query fields to be spliced to obtain the spliced query field, the server can execute the following steps: determining the category to which each data generation condition belongs; combining the query fields to be spliced of the data generation conditions according to the category to which the data generation conditions belong to obtain multiple field groups; wherein the query fields to be spliced of the data generation conditions of the same category are located in different field groups; splicing the query fields to be spliced included in the same field group to obtain the spliced query field corresponding to the same field group.
[0090] For example, in the scenario of generating data such as holiday greeting cards, the data generation condition that the card issuer is dad and the data generation condition that the card issuer is mom both belong to the card issuer category, so the corresponding query fields A1 and A2 to be spliced are divided into different field groups; the data generation condition that the Dragon Boat Festival and the data generation condition that the Spring Festival is mom both belong to the festival category, so the corresponding query fields B1 and B2 to be spliced are divided into different field groups. Therefore, the field groups that the server can form are (A1, B1), (A1, B2), (A2, B1) and (A2, B2). Then the server splices the query fields to be spliced in the same field group, and the resulting spliced query fields are A1-B1, A1-B2, A2-B1 and A2-B2.
[0091] In the above embodiment, when the data generation conditions have corresponding categories, the server splices the query fields to be spliced of data generation conditions of different categories to avoid the query fields to be spliced of data generation conditions of the same category being spliced into the same splicing query field, resulting in condition errors and the inability to perform field matching normally.
[0092] Furthermore, when the server executes the above-mentioned step of splicing the query fields to be spliced included in the same field group to obtain the spliced query field corresponding to the same field group, it can also further execute the following step: splicing the query fields to be spliced included in the same field group according to the category order of the data generation conditions to obtain the spliced query field corresponding to the same field group. And, when the server executes the above-mentioned step of splicing the user query fields to obtain the user spliced query field, it can also further execute the following step: splicing the user query fields according to the category order to obtain the user spliced query field.
[0093] That is, if the category order of the data generation condition is holiday-issuing object, then the server will splice the query fields to be spliced for each field group according to the category order, and the resulting spliced query fields are B1-A1, B2-A1, B1-A2, and B2-A2. Correspondingly, after receiving the user query field, the server can also splice it according to the above category order to form a user spliced query field, such as B2-A1. Then, the user spliced query field is matched with the spliced query field in the data table to determine the corresponding queried data.
[0094] In the above method, the concatenated query fields and the user query fields in the data table are formed in the same category order to ensure that the field matching is carried out normally.
[0095] In order to better understand the above method, an application example of the data processing method of the present disclosure is described in detail below. The scenario corresponding to this application example is that a user requests a template for a holiday greeting card from a server; wherein the query fields of the original data generation conditions provided by the server to the user are A1-elders, A2-colleagues, B1-Spring Festival, B2-Dragon Boat Festival; the query fields of the newly added data generation conditions are C1-cartoon style, C2-landscape style. Among the above data generation conditions, the data generation conditions corresponding to query fields A1 and A2 belong to the card issuing object category, the data generation conditions corresponding to query fields B1 and B2 belong to the holiday category, and the data generation conditions corresponding to query fields C1 and C2 belong to the greeting card style category.
[0096] The server may include a database storing data tables;
[0097] 1. Before adding data generation conditions, the server splices the query fields to be spliced of the above different categories of data generation conditions, and the obtained spliced query fields are A1-B1, A1-B2, A2-B1 and A2-B2, and generates corresponding holiday greeting cards ①, ②, ③ and ④ according to each spliced query field; then, the server stores the above spliced query fields and the corresponding holiday greeting cards in the cells of the data table (such as Figure 3 As shown). The data table includes a spliced query field data column, and the cells of the data column store the spliced query fields.
[0098] If each query field is stored in a different data column, then when a new query field of a data generation condition is added later, a new data column will need to be added. The addition of a data column will cause all data rows to be locked, which is equivalent to locking the entire data table. At this time, the server cannot read or write any data row, and cannot return the greeting card template required by the user to the user. In addition, when the data table is locked, complex operations such as copying the data table and updating synchronously are required, which is too costly. In the above processing method, the query fields of the data generation condition are spliced into one query field and stored in one cell, so that one data column can store the spliced query fields, realizing convenient expansion of data generation conditions.
[0099] Second, the server can generate a batch of holiday greeting cards offline every day or at fixed time intervals and save them in the database.
[0100] 3. The client provides the user with multiple query fields of data generation conditions, and the user selects a query field from the query fields of the multiple data generation conditions on the client, wherein the query fields selected by the user correspond to different categories of data generation conditions, for example, the query fields selected by the user are A1 and B1. The query field selected by the user is requested to the server through an online interface, and the server splices the query fields selected by the user according to the splicing order of the splicing query fields in the data table, and the obtained user splicing query fields are A1-B1; then, the server matches the user splicing query fields A1-B1 with the splicing query fields in the data table to determine the holiday cards returned to the user; if there are multiple holiday cards corresponding to the user splicing query fields A1-B1 in the data table, the server can randomly return a holiday card to the user from the multiple corresponding holiday cards.
[0101] 4. If the developer adds new query fields C1 and C2 to the data generation conditions, the server can splice the new query fields to be spliced with the original query fields to be spliced according to the first part to obtain the new spliced query fields, and store the new spliced query fields and the new queried data in the data table accordingly.
[0102] If multiple newly added data generation conditions belong to the same category, and the category to which the newly added data generation conditions belong is inconsistent with the category to which the original data generation conditions belong, the server can determine any one of the newly added splicing query fields of the newly added data generation conditions as the preset field, and splice the preset field into the original splicing query field.
[0103] If the user query fields sent by the old client are A1 and B1 (equivalent to request parameters), the server can concatenate the preset fields with the user query fields A1 and B1 sent by the old client to obtain the user concatenated query fields A1-B1-C1, and then perform query field matching.
[0104] The above processing method can make both the new and old clients meet the matching of the newly added data generation conditions, so that the server is compatible with the new and old clients.
[0105] In the above application examples, the interface performance is improved by converting the online complex data generation algorithm into a simple database condition query; and the query fields of multiple data generation conditions are spliced and unified into the same query field, which facilitates the expansion of subsequent data generation conditions and supports the addition, deletion and modification of subsequent data generation conditions, and is compatible with new and old client interface fields.
[0106] It should be understood that although Figure 1-4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-4 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0107] Figure 5 is a block diagram of a data processing device according to an exemplary embodiment. Figure 5 , the device comprises:
[0108] A field acquisition unit 501 is configured to execute acquisition of query fields to be spliced of each data generation condition;
[0109] The first concatenation unit 502 is configured to concatenate the query fields to be concatenated to obtain a concatenated query field;
[0110] The storage unit 503 is configured to store the concatenated query field and the queried data in cells of the data table in correspondence; any queried data is formed according to the data generation condition corresponding to the concatenated query field stored in correspondence;
[0111] The second splicing unit 504 is configured to execute acquiring user query fields and splicing the user query fields to obtain a user spliced query field; the user query field is a query field selected by the user in the query fields to be spliced;
[0112] The first data feedback unit 505 is configured to perform matching between the user's concatenated query field and the concatenated query field stored in the cell of the data table to determine the target queried data to be fed back to the user.
[0113] In one embodiment, the device also includes a modification unit, which is configured to determine a cell to be modified in a cell storing a splicing query field; splice a newly added query field to be spliced into the splicing query field of the cell to be modified to form a modified splicing query field; the newly added query field to be spliced is a query field to be spliced for newly added data generation conditions.
[0114] In one embodiment, the modification unit is configured to execute control to lock the data row where the cell to be modified is located; when the data row is in the locked state, the newly added query field to be spliced is spliced into the splicing query field of the cell to be modified to form a modified splicing query field.
[0115] In one embodiment, the device also includes a second data feedback unit, which is configured to execute receiving a first user query field; if the first user query field does not include the newly added query field to be spliced, the first user query field is spliced with a preset field to obtain a first user spliced query field; the preset field is a field for the newly added query field to be spliced; if the first user spliced query field matches the modified spliced query field, the queried data corresponding to the modified spliced query field is fed back to the first user; the queried data corresponding to the modified spliced query field is the queried data corresponding to the splicing query field of the cell to be modified.
[0116] In one embodiment, the device also includes a new unit, which is configured to execute a new query field to be spliced to obtain a condition for generating new data; splicing the new query field to be spliced with the query field to be spliced to obtain a new spliced query field; storing the new spliced query field and the new searched data in the cells of the data table correspondingly; wherein the cell storing the new spliced query field and the cell storing the spliced query field are the same data column, and the cell storing the new searched data and the cell storing the searched data are the same data column.
[0117] In one embodiment, the first splicing unit is configured to determine the category to which each data generation condition belongs; combine the query fields to be spliced of the data generation conditions according to the category to which the data generation conditions belong to obtain multiple field groups; wherein the query fields to be spliced of the data generation conditions of the same category are located in different field groups; and splice the query fields to be spliced included in the same field group to obtain the spliced query fields corresponding to the same field group.
[0118] In one embodiment, the first concatenation unit is configured to execute concatenation of the query fields to be concatenated included in the same field group according to the category order of the data generation condition, to obtain the concatenated query fields corresponding to the same field group;
[0119] The second splicing unit is configured to perform splicing on the user query fields according to the category order to obtain the user spliced query fields.
[0120] 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.
[0121] Figure 6 6 is a block diagram of a server 600 for a data processing method according to an exemplary embodiment. For example, the server 600 may be a server. Figure 6 The server 600 includes a processing component 620, which further includes one or more processors, and a memory resource represented by a memory 622 for storing instructions, such as applications, that can be executed by the processing component 620. The application stored in the memory 622 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 620 is configured to execute instructions to perform the above-mentioned data processing method.
[0122] The server 600 may also include a power supply component 624 configured to perform power management of the server 600, a wired or wireless network interface 626 configured to connect the server 600 to a network, and an input / output (I / O) interface 628. The server 600 may operate based on an operating system stored in the memory 622, such as Windows 8 8erver, Mac O8X, Unix, Linux, FreeB8D or the like.
[0123] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 622 including instructions, and the above instructions can be executed by a processor of the server 600 to perform the above method. The storage medium can be a computer-readable storage medium, for example, the 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.
[0124] In an exemplary embodiment, a computer program product is also provided, comprising a computer program / instruction, and the computer program / instruction implements the above method when executed by a processor.
[0125] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that 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 description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0126] 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: include: Obtain the query fields to be spliced for each data generation condition; Splicing the query fields to be spliced to obtain a spliced query field; The spliced query field and the queried data are stored in cells of the data table in correspondence; any queried data is formed according to the data generation condition corresponding to the corresponding stored spliced query field; In the cells storing the concatenated query fields, determine the cells to be modified; Controlling the data row where the cell to be modified is located to be in a locked state; When the data row is in a locked state, the newly added query field to be spliced is spliced into the splicing query field of the cell to be modified to form a modified splicing query field; the newly added query field to be spliced is a query field to be spliced of the newly added data generation condition; Acquire user query fields and concatenate the user query fields to obtain a user concatenated query field; the user query field is a query field selected by the user in the query fields to be concatenated; According to the match between the user's concatenated query field and the concatenated query field stored in the cell of the data table, the target queried data fed back to the user is determined.
2. The data processing method according to claim 1, characterized in that: After the step of splicing the newly added query field to be spliced into the splicing query field of the cell to be modified to form a modified splicing query field, the method further includes: receiving a first user query field; If the first user query field does not include the newly added query field to be spliced, splicing the first user query field with a preset field to obtain a first user spliced query field; the preset field is a field for the newly added query field to be spliced; If the first user splicing query field matches the modified splicing query field, the queried data corresponding to the modified splicing query field is fed back to the first user; the queried data corresponding to the modified splicing query field is the queried data corresponding to the splicing query field of the cell to be modified.
3. The data processing method according to claim 1, characterized in that: After the step of storing the concatenated query field and the queried data in cells of the data table in correspondence, the method further includes: Get the newly added query fields to be spliced for the newly added data generation conditions; Splicing the newly added query field to be spliced with the query field to be spliced to obtain a newly added spliced query field; The newly added splicing query field and the newly added checked data are stored in the cells of the data table correspondingly; wherein the cell storing the newly added splicing query field and the cell storing the splicing query field are the same data column, and the cell storing the newly added checked data and the cell storing the checked data are the same data column.
4. The data processing method according to any one of claims 1 to 3, characterized in that: The step of splicing the query fields to be spliced to obtain the spliced query field includes: Determine the category to which each data generation condition belongs; According to the categories to which the data generation conditions belong, the query fields to be spliced of the data generation conditions are combined to obtain multiple field groups; wherein the query fields to be spliced of the data generation conditions of the same category are located in different field groups; The query fields to be spliced included in the same field group are spliced to obtain the spliced query fields corresponding to the same field group.
5. The data processing method according to claim 4, characterized in that: The step of splicing the query fields to be spliced included in the same field group to obtain the spliced query field corresponding to the same field group includes: splicing the query fields to be spliced included in the same field group according to the category order of the data generation conditions to obtain the spliced query fields corresponding to the same field group; The step of splicing the user query fields to obtain a user spliced query field includes: The user query fields are concatenated according to the category order to obtain the user concatenated query fields.
6. A data processing device, characterized in that: include: A field acquisition unit, configured to execute acquisition of query fields to be spliced of each data generation condition; A first concatenation unit is configured to concatenate query fields to obtain a concatenated query field; The storage unit is configured to store the spliced query field and the queried data in cells of the data table in correspondence; any queried data is formed according to the data generation condition corresponding to the corresponding stored spliced query field; The modification unit is configured to determine a cell to be modified from cells storing the concatenated query field; and control the data row where the cell to be modified is located to be in a locked state; When the data row is in a locked state, the newly added query field to be spliced is spliced into the splicing query field of the cell to be modified to form a modified splicing query field; the newly added query field to be spliced is a query field to be spliced of the newly added data generation condition; A second splicing unit is configured to obtain a user query field and splice the user query field to obtain a user spliced query field; the user query field is a query field selected by the user in the query field to be spliced; The first data feedback unit is configured to perform matching between the user concatenated query field and the concatenated query field stored in the cell of the data table to determine the target queried data to be fed back to the user.
7. The data processing device according to claim 6, characterized in that: The device also includes a second data feedback unit, which is configured to execute receiving a first user query field; if the first user query field does not include the newly added query field to be spliced, the first user query field is spliced with a preset field to obtain a first user spliced query field; the preset field is a field for the newly added query field to be spliced; if the first user spliced query field matches the modified spliced query field, the queried data corresponding to the modified spliced query field is fed back to the first user; the queried data corresponding to the modified spliced query field is the queried data corresponding to the splicing query field of the cell to be modified.
8. The data processing device according to claim 6, characterized in that: The device also includes a new adding unit, which is configured to execute a new query field to be spliced to obtain a condition for generating new data; splicing the new query field to be spliced with the query field to be spliced to obtain a new spliced query field; storing the new spliced query field and the new checked data in cells of the data table correspondingly; wherein the cell storing the new spliced query field and the cell storing the spliced query field are the same data column, and the cell storing the new checked data and the cell storing the checked data are the same data column.
9. The data processing device according to any one of claims 6 to 8, characterized in that: The first splicing unit is configured to determine the category to which each data generation condition belongs; combine the query fields to be spliced of the data generation conditions according to the category to which the data generation conditions belong to obtain multiple field groups; wherein the query fields to be spliced of the data generation conditions of the same category are located in different field groups; and splice the query fields to be spliced included in the same field group to obtain the spliced query fields corresponding to the same field group.
10. The data processing device according to claim 9, characterized in that: The first concatenation unit is configured to execute concatenation of the query fields to be concatenated included in the same field group according to the category order of the data generation condition, so as to obtain the concatenated query fields corresponding to the same field group; The second splicing unit is configured to perform splicing on the user query fields according to the category order to obtain the user spliced query fields.
11. 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 method as claimed in any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of a server, the server is enabled to perform the method according to any one of claims 1 to 5.
13. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.
