Data processing method and device, equipment and storage medium
By having the front-end build and send modified data to the back-end for processing in the supply chain product management, and the back-end returning the target data for partial rendering by the front-end, the resource consumption problem during batch operations is solved and the user experience is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- KE COM (BEIJING) TECHNOLOGY CO LTD
- Filing Date
- 2025-11-25
- Publication Date
- 2026-04-28
AI Technical Summary
In supply chain product management, when performing batch operations on product data, excessive front-end resource consumption leads to frequent page rendering and negatively impacts user experience.
The front-end obtains the location information of product data, constructs and modifies the data, and sends it to the back-end. The back-end queries and modifies the category data and returns the target data. The front-end performs local rendering based on the location information, reducing the number of rendering operations and resource consumption.
This reduces front-end resource consumption, decreases the frequency of page rendering operations, improves operational smoothness, and ensures a better user data processing experience.
Smart Images

Figure CN121934933A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a data processing method, apparatus, device, and storage medium. Background Technology
[0002] In the field of supply chain merchandise management, batch operations on merchandise data typically rely on online spreadsheets, allowing users to paste and edit data through an Excel-like interface. When a user enters a product identifier, the system calls a backend API to retrieve the product's detailed data and merges it with the pasted data. However, when dealing with large volumes of data, this process frequently triggers frontend page rendering, leading to excessive frontend resource consumption. Furthermore, multiple rendering operations can cause page lag, significantly reducing operational smoothness and impacting user experience. Summary of the Invention
[0003] To address the aforementioned technical problems, this disclosure provides a data processing method, apparatus, device, and storage medium.
[0004] In a first aspect, embodiments of this disclosure provide a data processing method applied to a backend, comprising: In response to a modification request in an online form, retrieve the product data to be modified from the online form and determine the location information of the product data to be modified in the online form; Extract the corresponding product inventory unit identifier and the character to be modified from the product data to be modified, and construct the modification data based on the corresponding product inventory unit identifier, the character to be modified, and the location information; The modified data is sent to the backend; the backend is used to query the category data from the target category database based on the product inventory unit identifier in the modified data, and modify the category data according to the character to be modified corresponding to the product inventory unit identifier to obtain the target data. The target data carries the location information corresponding to the product inventory unit identifier. Receive the target data returned by the backend, and render the target data in an online table based on the location information in the target data.
[0005] Secondly, embodiments of this disclosure provide a data processing method applied to a backend, comprising: The system receives modified data sent by the front end. The modified data is the data obtained by the front end in response to the modification request of the online table. It extracts the corresponding product inventory unit identifier and the character to be modified from the product data to be modified in the online table, and constructs the data based on the corresponding product inventory unit identifier, the character to be modified, and the position information of the product data to be modified in the online table. Category data is retrieved from a pre-built category database based on the product inventory unit identifier in the modified data; Modify the category data according to the characters to be modified corresponding to the product inventory unit identifier to obtain the target data; The target data is returned to the front end so that the front end can render the target data in an online table based on the location information in the target data.
[0006] Thirdly, embodiments of this disclosure provide a data processing apparatus, including: The acquisition unit is used to respond to the modification request of the online table, acquire the product data to be modified in the online table, and determine the location information of the product data to be modified in the online table; The construction unit is used to extract the corresponding product inventory unit identifier and the character to be modified from the product data to be modified, and to construct the modification data based on the corresponding product inventory unit identifier, the character to be modified, and the location information. The sending unit is used to send the modified data to the backend; wherein, the backend is used to query the category data from the target category database according to the product inventory unit identifier in the modified data, and modify the category data according to the character to be modified corresponding to the product inventory unit identifier to obtain the target data, and the target data carries the location information corresponding to the product inventory unit identifier; The rendering unit is used to receive the target data returned by the backend and render the target data in an online table based on the position information in the target data.
[0007] Fourthly, embodiments of this disclosure provide a data processing apparatus, including: The receiving unit is used to receive the modified data sent by the front end. The modified data is the result of the front end responding to the modification request of the online table by extracting the corresponding product inventory unit identifier and the character to be modified from the product data to be modified in the online table, and constructing it based on the corresponding product inventory unit identifier, the character to be modified, and the position information of the product data to be modified in the online table. The query unit is used to retrieve category data from a pre-built category database based on the product inventory unit identifier in the modified data; The modification unit is used to modify the category data according to the character to be modified corresponding to the product inventory unit identifier, so as to obtain the target data; The return unit is used to return the target data to the front end, so that the front end can render the target data in the online table based on the location information in the target data.
[0008] Fifthly, embodiments of this disclosure provide an electronic device, including: Memory; Processor; and Computer programs; The computer program is stored in memory and configured to be executed by a processor to implement the first and second aspects of the method as described above.
[0009] In a sixth aspect, embodiments of this disclosure provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the first and second aspects of the method described above.
[0010] The data processing method disclosed herein, applied to a front-end, includes: responding to a modification request from an online table, obtaining the product data to be modified in the online table, and determining the location information of the product data to be modified in the online table; extracting the corresponding product inventory unit identifier and the character to be modified from the product data to be modified, and constructing modified data based on the corresponding product inventory unit identifier, the character to be modified, and the location information; sending the modified data to a back-end; wherein, the back-end is used to query the category data from the target category database based on the product inventory unit identifier in the modified data, and modify the category data according to the character to be modified corresponding to the product inventory unit identifier to obtain the target data, the target data carrying the location information corresponding to the product inventory unit identifier; receiving the target data returned by the back-end, and rendering the target data in the online table according to the location information in the target data. The method provided in this application involves the front-end generating modified data based on the product data to be modified pasted by the user into an online form, and the back-end generating target data that can be directly rendered by the front-end based on the modified data, carrying the position information of the product data in the online form, so that the front-end can directly locate the product data and perform local rendering. This effectively reduces the resources consumed by the front-end, reduces the frequency of page rendering operations, further improves the smoothness of operation, and ensures that users have a good data processing experience. Attached Figure Description
[0011] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0012] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A flowchart illustrating the processing of a multi-threaded pool provided in this embodiment of the disclosure; Figure 2 A flowchart illustrating a data processing method provided in an embodiment of this disclosure; Figure 3A flowchart illustrating a polling-based batch fetching process provided in this embodiment of the disclosure; Figure 4 This is a schematic diagram of a data retrieval process provided in an embodiment of the present disclosure; Figure 5 A flowchart illustrating another data processing method provided in an embodiment of this disclosure; Figure 6 A flowchart illustrating a data splicing process provided in this embodiment of the disclosure; Figure 7 A complete flowchart of a data processing method provided in this disclosure embodiment; Figure 8 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of the present disclosure; Figure 9 This is a schematic diagram of another data processing apparatus provided in an embodiment of the present disclosure; Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0014] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0015] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0016] Currently, in the product creation process of the supply chain product center, the publishing, adding, and editing of stock keeping units (SKUs) are generally handled in batches using online spreadsheets. This online spreadsheet is a suite of online spreadsheet functions integrated into the business system. Its operation logic is highly similar to offline Excel, allowing users to directly perform Excel-like data entry, editing, and formatting adjustments within the system. Typically, the online spreadsheet is row-based, with each row corresponding to one SKU. It also supports batch copying and pasting entire rows or multiple rows of data from external Excel files into the online spreadsheet for efficient data entry.
[0017] To improve user efficiency, after a user enters an SKU number, the system automatically calls the backend interface to retrieve the associated data for that SKU and automatically populates the corresponding fields. However, this synchronous SKU data retrieval method is problematic in actual business scenarios. The product creation process involves a massive amount of data, potentially thousands of records being edited simultaneously, and it supports multi-store operations (meaning the same SKU may have different attribute values in different stores, requiring the interface to query and aggregate data from multiple store dimensions simultaneously). This high-concurrency, multi-dimensional data retrieval mode results in slow frontend response times, significantly extended interface response times, and frequent request timeouts or loading failures. Figure 1 As shown, Figure 1 This disclosure provides a multi-threaded pool processing flowchart, also known as a front-end multi-threaded pool solution. In this solution, after a user pastes a large amount of SKU data, the system extracts all SKU IDs and uses a thread pool to initiate multiple interface requests in parallel, fetching product category data and SKU basic data respectively. For example, setting the maximum concurrency of the category thread pool to 5 and the SKU thread pool to 3 allows for the simultaneous processing of multiple query tasks, significantly shortening the overall data retrieval time and avoiding long wait times caused by serial requests. Subsequently, dynamic column judgment is performed based on the category data and basic data, and dynamic column data concatenation or direct retention of the original columns is performed for row data assembly. Finally, the dynamic columns and data view are merged and rendered. However, this solution has several drawbacks: First, improper thread pool parameter configuration may lead to resource contention or excessive system load, such as a surge in server pressure due to excessive concurrency. Second, the large differences in request response times between different business modules (such as categories and SKUs) can easily cause some threads to be idle while others are blocked, affecting resource utilization. Third, data merging and state management are complex in a multi-threaded environment, and the lack of an effective synchronization mechanism may lead to data corruption or duplicate processing, increasing system maintenance costs.
[0018] Furthermore, the entire row of SKU data pasted by the user needs to be merged with the data returned by the API, cell by cell, along the row dimension. If the user has already pasted data into a cell, the user's input is retained. If the cell is empty, the default value retrieved by the API is used to fill it. This merging logic triggers multiple table data updates and interface re-renders when dealing with large amounts of data, causing a significant increase in front-end performance pressure, resulting in noticeable page lag or even unresponsiveness, severely impacting the user's operational smoothness and overall experience.
[0019] To address the aforementioned technical problems, this disclosure provides a data processing method. This will be described in detail through one or more of the following embodiments.
[0020] The data processing method provided in this disclosure is applicable to data processing scenarios. This method can be executed by a data processing device, which can be implemented in software and / or hardware and can be integrated into an electronic device. The electronic device can include, but is not limited to, mobile terminals such as smartphones, laptops, digital radio receivers, personal digital assistants (PDAs), tablet computers (Tablet PCs), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable devices, etc., as well as fixed terminals such as digital televisions, desktop computers, smart home devices, etc.
[0021] Figure 2 This is a flowchart illustrating a data processing method provided in an embodiment of the present disclosure, applied to a front-end (i.e., the front end), specifically including as follows: Figure 2 The following steps are shown: S201. In response to a modification request from an online table, obtain the product data to be modified from the online table and determine the location information of the product data to be modified in the online table.
[0022] Understandably, users input product data into an online form provided by the front end; for example, users can batch paste SKU data (product data). In one data modification scenario, users enter the characters / information to be modified in the corresponding columns of the online form. For example, entering "200075506" in the product code column of product data A means that "200075506" is a character to be modified, indicating that the user wants to change the product code. Understandably, the columns of product data to be modified in batch-pasted product data may contain duplicate data.
[0023] Understandably, in response to a modification request in the online table, the system retrieves the product data (hereinafter referred to as "product data") entered by the user in the online table, determines the position of the product data within the online table, and assumes each row represents a product's data. Therefore, the product data can be encoded based on its row position in the online table to generate a positional information, denoted as `rowKey`, which serves as the unique index for the product data. The specific encoding method is not limited; for example, the `rowKey` for product data A is "426761ad-490b". When the backend returns batch data, it can perform matching based on the `rowKey` to render partial / local product data within the online table. Other methods that can represent the unique index of each product data item in the online table are not limited and can be determined according to user needs.
[0024] S202. Extract the corresponding product inventory unit identifier and the character to be modified from the product data to be modified, and construct the modification data based on the corresponding product inventory unit identifier, the character to be modified, and the location information.
[0025] Understandably, based on the above S201, product data is preprocessed to improve backend processing efficiency. For example, when a user pastes multiple product data entries in batches, the data is assembled along the row dimension. Corresponding product inventory unit identifiers and characters to be modified are extracted from the product data. Modified data is then constructed based on these corresponding identifiers, characters, and location information. This determines the data to be modified for each row of product data. A correspondence exists between the product inventory unit identifiers and characters to be modified extracted from different rows of product data. Simultaneously, a correspondence also exists between the product inventory unit identifier, characters to be modified, and location information; for example, all three correspond to the same row. The modified data is then submitted to the backend / server / service terminal. Simultaneously, the submission location information is recorded for subsequent polling to retrieve the modified data (i.e., the target data returned by the backend).
[0026] Optionally, modification data can be constructed based on the corresponding product inventory unit identifier, the character to be modified, and location information. This can be achieved through the following steps: By connecting the corresponding product inventory unit identifier and the character to be modified sequentially using a concatenation character, the string to be modified is obtained; the operation type for the product data to be modified is determined, where the operation type includes query and delete; the modified data is constructed based on the string to be modified, location information, and operation type.
[0027] It is understandable that each row of data represents the product data of a commodity. The user pastes batch product data in an online form and assembles the data of each commodity according to the row dimension to generate modified data in the preset data format of each commodity data. Specifically, the stock keeping unit identifier and all the characters to be modified included therein are extracted from the commodity data. Each character to be modified represents a column of data. Among them, the stock keeping unit identifier is the identifier of the stock keeping unit, denoted as skuId, which is generally the data in the first column. At the same time, the skuId is separately extracted so that the subsequent backend can query the category data based on it. For example, the skuId is "20075506". Subsequently, the stock keeping unit identifier and all the characters to be modified are concatenated in sequence according to the dimension to obtain a string to be modified, denoted as preExcel. For example, two characters to be modified, "Didan" and "Test", are extracted from the commodity data in sequence. The stock keeping unit identifier and the two characters to be modified are connected by a connection character (such as &), and the obtained string to be modified is "200075506&Didan&Test". At the same time, the operation type for the commodity data is determined, denoted as isdelete. Among them, the operation types include query and delete. Query means that after querying the relevant data, the data is modified, and the specific data under this attribute of the commodity still remains, that is, a certain column of data is retained. Delete means that after querying the data, it is directly deleted, and this attribute and the data under this attribute are not retained, that is, a certain column of data is deleted. For example, the column of data "warehousing time" in the commodity data is deleted.
[0028] It is understandable that the stock keeping unit identifier (Stock Keeping Unit Identifier, skuId) is a unique code used to identify a specific commodity, which is a complete description of a commodity and contains all the key attributes of the commodity, such as brand, model, color, size and other information.
[0029] An example is that the modified data in the preset data format is: {rowKey: 426761ad - 490b, skuId: 20075506, preExcel: 200075506&Didan&Test, isdelete: 0}, where 0 in the operation type represents query and 1 represents delete.
[0030] Optionally, the stock keeping unit identifier and the characters to be modified with corresponding relationships are extracted from the commodity data, which can be specifically implemented through the following steps: Extract the product inventory unit identifier from the product data to be modified; verify whether the product data to be modified has corresponding historical product data in the pre-built product database based on the product inventory unit identifier; if corresponding historical product data exists, extract the character to be modified from the product data to be modified; or, if corresponding historical product data does not exist, end the processing flow for the product data to be modified.
[0031] Understandably, after extracting the product inventory unit identifier from the product data, a presence check is performed based on the product inventory unit identifier, or after obtaining the modified data, a presence check is performed again based on the product inventory unit identifier. This filters out product data not in the database, preventing modification of data not in the database. The check determines whether the product data is being created for the first time, i.e., whether the corresponding historical data exists in the product database. Historical data in the product database uses the product inventory unit identifier as an index. For product data not in the database, the status of the product data is directly set to "SKU does not exist," and the modification node ends without further processing. For data that successfully passes the check, data is assembled according to the row dimension.
[0032] Understandably, the modified data also includes the column position information of the character to be modified within the product data. This column position information includes the start and end columns of the character to be modified. In other words, modified data can be generated based on only a subset of column data. For example, if a row of product data includes 10 columns, after preliminary calculations, modified data for columns three through seven can be generated. This means the user primarily modifies columns three through seven. This method of generating modified data for only a subset of columns allows for partial rendering on the front end, further reducing the amount of rendering required.
[0033] S203. Send the modified data to the backend.
[0034] The backend is used to query the category data from the target category database based on the product inventory unit identifier in the modified data, and then modify the category data according to the character to be modified corresponding to the product inventory unit identifier to obtain the target data. The target data carries the location information corresponding to the product inventory unit identifier.
[0035] Understandably, based on the above S202, the front-end performs preliminary processing of the pasted product data, and then the back-end integrates the data based on the data processed by the front-end. Through the interaction between the front-end and the back-end, the number of rendering operations on the front-end is reduced, further reducing the rendering overhead and improving pasting performance. The specific implementation method of the back-end generating target data based on the modified data is described in the following embodiment and will not be repeated here.
[0036] Optionally, after transmitting the modified data to the backend, the method may also include: Before receiving the target data returned by the backend, the location information is stored in the data processing list, which is used to record unprocessed product data. Based on the location information in the data processing list, it is checked whether the backend has returned the target data. If the backend has returned the target data, the target data is rendered according to the location information, the online table is updated, and the location information in the data processing list is deleted. If the backend has not returned the target data, after waiting for a preset time period, it is checked again based on the location information in the data processing list to see if the backend has returned the target data.
[0037] Understandably, after submitting modified data to the backend but before receiving the target data returned from the backend—that is, for the product data being processed by the backend—location information is added to a data processing list for querying / requesting. This data processing list records unprocessed product data for the frontend to poll and retrieve, improving processing efficiency. Once the backend has processed the data and location information, it returns it to the frontend. The frontend then uses the returned location information to locate the specific product data in the current poll, renders the data, and updates the online table. Simultaneously, the processed location information is removed from the data processing list. In the next poll, the frontend continues to request location information for other product data not yet returned from the data processing list until all location information in the list is returned, completing the data retrieval process. The time interval for each poll is a preset period, which can be customized according to user needs.
[0038] Understandably, the current polling may retrieve multiple location information returned by the backend. In this case, the frontend can accurately locate multiple product data through multiple location information and render multiple product data. That is, multiple product data can be rendered at once. For a large amount of product data, rendering multiple product data in chunks or batches can further improve rendering efficiency.
[0039] S204. Receive the target data returned by the backend, and render the target data in the online table according to the location information in the target data.
[0040] Understandably, based on the above S203, after submitting the modified data to the backend, the target data returned by the backend is received, and the corresponding row data in the online table is rendered based on the position information in the target data to complete the modification of the product data. In other words, it is not necessary to render the entire table, but only to render the local data returned by the backend, which greatly improves the rendering speed.
[0041] Optionally, the target data can be rendered in an online table based on its location information, including: Once the target data is rendered in the online table, update and display the progress information, which includes the first quantity of all product data to be modified and the second quantity of product data to be modified that has been rendered.
[0042] Understandably, after rendering the target data in the online spreadsheet, the progress information is updated. This progress information refers to the processing progress of the large amount of product data that the user has batch-pasted into the online spreadsheet. The progress information includes a first quantity and a second quantity. The first quantity refers to the total number of product data items pasted in batches, and the second quantity refers to the total number of product data items that have been processed. Subsequently, the progress information is displayed in the online spreadsheet, which can be shown as a progress bar above it, allowing users to easily understand the data retrieval status. For example, it could be displayed in the form of 5 / 10, where 5 is the second quantity and 10 is the first quantity. Other methods for displaying the data retrieval progress are not limited.
[0043] For example, Figure 3 This disclosure provides a flowchart of a polling-based batch data retrieval process: user pastes data; all data is transmitted at once; backend batch verification processing; asynchronous task is started; frontend polls and checks; if the backend has not completed data processing, the frontend waits for an interval and then checks again; if the backend has completed data processing, the frontend obtains the complete dataset; frontend dynamically updates columns in a single step; frontend renders the view in real time. Figure 3 For detailed implementation instructions of each step shown, please refer to the above embodiments, which will not be repeated here.
[0044] For example, Figure 4 This is a schematic diagram of a data retrieval process provided in an embodiment of the present disclosure. It is applied to the front end and starts a loop; it determines whether the time interval meets the standard; if the time interval meets the standard, data is collected; after the data collection is completed, valid records are counted; progress information is updated; it determines whether a key node has been reached; if it is the first or last node, it forces a synchronous update and simultaneously calls back the interface rendering; if it is an intermediate node, it triggers a throttling update and simultaneously calls back the interface rendering; if the time interval does not meet the standard, the loop is maintained.
[0045] This disclosure provides a data processing method applicable to scenarios involving the editing of large-scale product data in online tables. The front-end employs a polling-based batch retrieval method, dynamically maintaining the request queue and adaptively adjusting the quantity of product data retrieved in each batch and the polling interval, significantly reducing interface timeout rates. Simultaneously, the back-end supports data sharding, allowing the front-end to receive and incrementally render table content in batches, avoiding full redraws. Furthermore, the front-end uses a visual progress bar to provide real-time feedback on loading progress, reducing perceived user waiting time and significantly improving the user experience. This achieves an efficient, controllable, and user-friendly online table operation experience under high concurrency and large data volumes.
[0046] Based on the above embodiments, Figure 5 This is a flowchart illustrating another data processing method provided in an embodiment of the present disclosure, applied to a backend (i.e., the backend), specifically including as follows: Figure 5 The following steps are shown: S501: Receive modified data sent by the front end.
[0047] The modified data is generated by the front end responding to the modification request of the online table by extracting the corresponding product inventory unit identifier and the character to be modified from the product data to be modified in the online table, and constructing it based on the corresponding product inventory unit identifier, the character to be modified, and the position information of the product data to be modified in the online table.
[0048] Understandably, this involves retrieving modified data transmitted from the front end. This modified data is at least a portion of the data that needs to be modified, pre-formatted by the front end, so that the back end can quickly combine it with the data pasted by the user. Examples include updating category names, adjusting attribute fields, and modifying rules.
[0049] S502. Category data obtained from the pre-built category database based on the commodity inventory unit identifier in the modified data.
[0050] Understandably, based on the above S501, the category data bound to the product inventory unit identifier is queried from the category database. The category data can be understood as the complete data of the stored / existing products.
[0051] S503. Modify the category data according to the character to be modified corresponding to the commodity inventory unit identifier to obtain the target data.
[0052] Understandably, based on the above S502, the category data is integrated according to the modified data, that is, at least one operation such as replacing / updating / overwriting the original category data is performed to obtain the target data that meets the expectations. The target data can be understood as at least part of the modified data of the product. The online table is then rendered based on the modified at least part of the data.
[0053] Optionally, the category data can be modified based on the character to be modified corresponding to the product inventory unit identifier to obtain the target data. This can be achieved through the following steps: Determine the table header corresponding to the category data based on the target category represented by the category data; assign values to the category data according to the table header for the first time to obtain the table data; based on the table data, assign values to the characters to be modified corresponding to the product inventory unit identifier according to the table header for the second time to obtain the target data.
[0054] It is understandable that different categories have different required attribute fields in business. Therefore, the header fields (i.e., column names) to be displayed in the online table can be dynamically determined according to the type of the target category, that is, a virtual table of the online table is established. Specifically, the target category bound to the current product is queried according to the stock keeping unit identifier. The category refers to the category / type of the product, for example, footwear, women's clothing, smart products, etc. Subsequently, the dynamic columns of the table are calculated according to the category, and the non-static columns are integrated to piece together a complete header. One implementation method is to match the required field structure of the category from a preset category template or metadata, so as to dynamically generate a suitable table header, avoiding information redundancy or missing caused by using a unified fixed header. For example, the header of smart products is "brand, model, memory, storage, color", etc.
[0055] It is understandable that after generating the complete header, the category data (i.e., the data pulled from the backend) is first assigned values in the order of the header to obtain the table data. That is, the backend also completes the data modification in the form of a virtual table, which is convenient for the subsequent front-end to directly render the product data after receiving the target data (i.e., the data pulled from the front-end), improving efficiency. The first assignment refers to displaying the category data in the form of a table, corresponding to the online table of the front-end, that is, the preliminary assignment. Subsequently, the modified data submitted by the front-end is parsed, focusing on parsing the product string, and the table data is secondarily assigned values in the order of the header to obtain the target data. The second assignment refers to modifying the actual characters at the corresponding positions (i.e., corresponding columns) in the table data according to the product string. One implementation method of the second assignment is shown in the following embodiments.
[0056] Optionally, the characters to be modified are connected by a connection character.
[0057] It is understandable that based on the above example, the characters to be modified are "200075506, Didan, test", and the stock keeping unit identifier is also regarded as a character to be modified, and the connection character is "&". Generally, the number of connection characters is one less than the number of characters to be modified. For example, in "200075506&Didan&test", the number of characters to be modified is 3, and the number of connection characters is 2. The number of characters to be modified and connection characters may both be multiple.
[0058] Optionally, based on the table data, the modified data is secondarily assigned values according to the header to obtain the target data. Specifically, it can be implemented through the following steps: Identify the connection character and determine whether there is a corresponding character to be modified for the connection character; if there is a character to be modified, assign values to the table data according to the header, and replace the target character at the corresponding position in the table data with the character to be modified; or, if there is no character to be modified, assign values to the table data according to the header and do not modify the target character.
[0059] It is understandable that the logic of the second assignment is as follows. Identify the connection characters and determine whether there are corresponding characters to be modified for the connection characters. For example, determine whether the characters connected by the connection characters are empty characters, or count the number of characters to be modified connected by the connection characters, and determine whether there are two adjacent characters to be modified for the connection characters. If there are corresponding characters to be modified, assign values in the order of the header, and use the characters to be modified to replace / overwrite the target characters at the corresponding positions (i.e., a certain column). If there are no corresponding characters to be modified, the target characters are not modified, that is, the empty characters are automatically skipped. As an example, parsing the modified data gives "200075506&Didan&Test". In this case, each connection character has 2 corresponding characters to be modified, so the target characters in the table data can be directly replaced in the order of the header. Another example, parsing the modified data gives "200075506&&Test". In this case, each connection character has 1 corresponding character to be modified, and "&&" represents an empty character, that is, the second column is not modified. The target characters in the first and third columns of the table data are directly replaced in the order of the header, and the empty character (i.e., the second column) is skipped.
[0060] It is understandable that the modified data submitted by the front end may also represent the modification of some columns. For example, for commodity data with 10 columns, the modified data represents the modification of the first column to the fifth column, or the modified data represents the modification of the third column to the seventh column. In this case, identify the column position information in the modified data, where the column position information is used to represent the start column and the end column of the modified data. As an example, the commodity string included in the modified data is "aa&bb&&&cc", and the column position information is "3, 7". Other representation forms of the column position information are not limited. This case indicates that the third, fourth, and seventh columns are modified this time, the fifth and sixth columns are empty characters and do not need to be modified, and other data except the third column to the seventh column do not need to be modified. The table data obtained from the first assignment can be directly modified in the order of the header. Subsequently, the front end can also only render the third column to the seventh column of this row of commodity data.
[0061] S504. Return the target data to the front end so that the front end can render the target data in the online table according to the position information in the target data.
[0062] Understandably, based on the above S503, after generating the target data in tabular form, the target data is returned to the front end. Upon receiving the target data, the front end does not redraw the entire online table. Instead, based on location information, it precisely locates the row or a portion of the cells within that row corresponding to the product data in the online table, and performs partial updates on the located area. This achieves efficient partial refresh even when the user pastes a large amount of product data, meaning that only one or a portion of the product data can be updated at a time.
[0063] For example, Figure 6 This disclosure provides a data concatenation process flowchart. After the front-end submits modified data to the back-end, it begins polling the data. The back-end processing flow is as follows: extract the modified data; verify the product inventory unit identifier; if the product inventory unit identifier exists and is effective, determine the product category based on the product inventory unit identifier; check the number of dynamic fields for the category; add table records based on location information; concatenate data according to the product string and dynamic fields; query data from multiple stores; compare the concatenated data with the queried data; if the concatenated data is not equal to the queried data, update according to the concatenated data; if the concatenated data is equal to the queried data, retain the original data; mark the processing as complete; wait for the front-end to poll and retrieve data again; if the product inventory unit identifier does not exist, record an error log. For detailed implementation instructions, please refer to the above embodiment, which will not be repeated here.
[0064] For example, Figure 7 This is a complete flowchart of data processing provided in an embodiment of the present disclosure. The front end generates location information and determines the product inventory unit identifier; the front end verifies whether the product inventory unit identifier exists; if the product inventory unit identifier exists, the front end assembles data according to the row dimension and submits it to the back end; the back end integrates the data and concatenates dynamic table headers; the back end pulls category data and fills it according to the table header order; the back end checks whether the product string has a value; if the product string has a value, the back end replaces the category data with modified data; if the product string has no value or the replacement is completed, the front end polls and pulls data; the front end renders the data and updates the pending request list; the front end determines whether the pending request list is empty; if the pending request list is empty, the process ends; if the pending request list is not empty, the back end continues to integrate data; if the product inventory unit identifier does not exist, its status is set to "product does not exist" and the process ends. For specific implementation details, please refer to the above embodiment, which will not be repeated here.
[0065] The data processing method provided in this disclosure addresses the front-end rendering performance bottleneck in large-scale data pasting scenarios by optimizing the original front-end-processed pasted data mode and adopting a back-end-led data fusion and preprocessing mechanism. Specifically, after a user pastes data into an online table, the front-end processes the pasted content, determines the modified data, and submits it to the back-end. The back-end intelligently splices and verifies the modified data with existing category metadata, generating a structurally complete and directly renderable table in the form of a virtual table. Subsequently, the back-end returns the data to the front-end on demand or in batches, requiring only lightweight incremental rendering. This significantly reduces front-end memory usage and rendering pressure, improving paste response speed and reducing page lag in batch data pasting scenarios, thus significantly enhancing stability and user experience under high load.
[0066] Figure 8 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of the present disclosure. The data processing apparatus provided in this embodiment can execute the processing flow provided in the data processing method embodiment, such as... Figure 8 As shown, the data processing device 800 includes: The acquisition unit 801 is used to respond to the modification request of the online table, acquire the product data to be modified in the online table, and determine the location information of the product data to be modified in the online table; The construction unit 802 is used to extract the corresponding product inventory unit identifier and the character to be modified from the product data to be modified, and to construct the modification data based on the corresponding product inventory unit identifier, the character to be modified and the location information. The sending unit 803 is used to send the modified data to the backend; wherein, the backend is used to query the category data from the target category database according to the product inventory unit identifier in the modified data, and modify the category data according to the character to be modified corresponding to the product inventory unit identifier to obtain the target data, and the target data carries the location information corresponding to the product inventory unit identifier; Rendering unit 804 is used to receive target data returned from the backend and render the target data in an online table based on the position information in the target data.
[0067] Optionally, building unit 802 is used for: By connecting the corresponding product inventory unit identifier and the character to be modified sequentially using a concatenation character, the string to be modified is obtained. Determine the type of operation to be performed on the product data to be modified, including query and delete. The modification data is constructed based on the string to be modified, the location information, and the operation type.
[0068] Optionally, the data processing device 800 is also used for: Before receiving the target data from the backend, the location information is stored in the data processing list, which is used to record unprocessed product data to be modified. Based on the position information in the data processing list, check whether the backend returns the target data; If the target data is rendered in an online table, remove the position information from the data processing list.
[0069] Optionally, the data processing device 800 is also used for: If the backend does not return the target data, wait for a preset time period and then check again, based on the position information in the data processing list, whether the backend has returned the target data.
[0070] Optionally, the data processing device 800 is also used for: Once the target data is rendered in the online table, update and display the progress information, which includes the first quantity of all product data to be modified and the second quantity of product data to be modified that has been rendered.
[0071] Optionally, building unit 802 is used for: Extract the product inventory unit identifier from the product data to be modified; Verify whether the product data to be modified exists in the pre-built product database based on the product inventory unit identifier; If corresponding historical product data exists, the character to be modified is extracted from the product data to be modified; otherwise, if corresponding historical product data does not exist, the processing flow for the product data to be modified ends.
[0072] Figure 8 The data processing apparatus of the illustrated embodiment can be used to execute the technical solutions of the above method embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.
[0073] Figure 9 This is a schematic diagram of another data processing apparatus provided in an embodiment of the present disclosure. The data processing apparatus provided in this embodiment of the present disclosure can execute the processing flow provided in the data processing method embodiment, such as... Figure 9 As shown, the data processing device 900 includes: The receiving unit 901 is used to receive the modified data sent by the front end. The modified data is obtained by the front end in response to the modification request of the online table, extracting the corresponding product inventory unit identifier and the character to be modified from the product data to be modified in the online table, and constructing it according to the corresponding product inventory unit identifier, the character to be modified and the position information of the product data to be modified in the online table. The query unit 902 is used to query category data obtained from a pre-built category database based on the product inventory unit identifier in the modified data; Modification unit 903 is used to modify category data according to the character to be modified corresponding to the commodity inventory unit identifier, so as to obtain target data; Return unit 904 is used to return the target data to the front end so that the front end can render the target data in the online table based on the location information in the target data.
[0074] Optionally, the modified unit 903 is used for: Determine the table header corresponding to the category data based on the target category represented by the category data; The category data is first assigned values according to the table header to obtain the table data; Based on the table data, the characters to be modified corresponding to the product inventory unit identifier are assigned a second time according to the table header to obtain the target data.
[0075] The characters to be modified are connected using concatenation characters.
[0076] Optionally, the modified unit 903 is used for: Identify the connection character and determine if the connection character corresponds to the character to be modified; If a character to be modified exists, the table data is assigned a value according to the table header, and the target character at the corresponding position in the table data is replaced with the character to be modified; or, if no character to be modified exists, the table data is assigned a value according to the table header without modifying the target character.
[0077] Figure 9 The data processing apparatus of the illustrated embodiment can be used to execute the technical solutions of the above method embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.
[0078] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. See below for details. Figure 10 The diagram illustrates a structural schematic suitable for implementing the electronic device 1000 in the embodiments of this disclosure. The electronic device 1000 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable electronic devices, etc., as well as fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 10 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0079] like Figure 10 As shown, the electronic device 1000 may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes to implement the data processing methods as described in the embodiments of this disclosure, based on a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. The RAM 1003 also stores various programs and data required for the operation of the electronic device 1000. The processing device 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0080] Typically, the following devices can be connected to the I / O interface 1005: input devices 1006 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1007 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1008 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows electronic device 1000 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 10 An electronic device 1000 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0081] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts, thereby implementing the data processing methods described above. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1009, or installed from storage device 1008, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined above in the methods of embodiments of this disclosure.
[0082] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0083] In some implementations, the front-end and server can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0084] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0085] Optionally, when one or more of the above-described procedures are executed by the electronic device, the electronic device may also perform other steps described in the above embodiments.
[0086] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0087] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0088] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0089] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0090] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0091] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or gateway that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or gateway. Without further limitations, an element defined by the phrase "comprising a data processing" does not exclude the presence of other identical elements in the process, method, article, or gateway that includes said element.
[0092] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data processing method, characterized in that, Applied to front-end, including: In response to a modification request in an online table, the system retrieves the product data to be modified from the online table and determines the location information of the product data to be modified within the online table. Extract the corresponding product inventory unit identifier and the character to be modified from the product data to be modified, and construct the modification data based on the corresponding product inventory unit identifier, the character to be modified, and the location information; The modified data is sent to the backend; wherein, the backend is used to query the category data from the target category database according to the product inventory unit identifier in the modified data, and modify the category data according to the character to be modified corresponding to the product inventory unit identifier to obtain the target data, wherein the target data carries the location information corresponding to the product inventory unit identifier; The system receives the target data returned by the backend and renders the target data in the online table based on the location information in the target data.
2. The method according to claim 1, characterized in that, The process of constructing modification data based on the corresponding product inventory unit identifier, the character to be modified, and location information includes: By connecting the corresponding product inventory unit identifier and the character to be modified sequentially using a concatenation character, the string to be modified is obtained. Determine the operation type for the product data to be modified, wherein the operation type includes query and delete; The modification data is constructed based on the string to be modified, the location information, and the operation type.
3. The method according to claim 1, characterized in that, After sending the modified data to the backend, the method further includes: Before receiving the target data from the backend, the location information is stored in a data processing list, wherein the data processing list is used to record unprocessed product data to be modified; Based on the location information in the data processing list, check whether the backend returns the target data; Once the target data is rendered in the online table, the location information in the data processing list is deleted.
4. The method according to claim 3, characterized in that, The method further includes: If the backend does not return the target data, then after a preset time period, the backend will be checked again based on the location information in the data processing list to see if the target data has been returned.
5. The method according to claim 1, characterized in that, After rendering the target data in the online table based on the location information in the target data, the method further includes: Once the target data is rendered in the online table, the progress information is updated and displayed. The progress information includes a first quantity of all product data to be modified and a second quantity of product data to be modified that has been rendered.
6. The method according to claim 2, characterized in that, The step of extracting the corresponding product inventory unit identifier and the character to be modified from the product data to be modified includes: Extract the product inventory unit identifier from the product data to be modified; Verify whether the product data to be modified exists in the pre-built product database based on the product inventory unit identifier; If corresponding historical product data exists, the character to be modified is extracted from the product data to be modified; or, if corresponding historical product data does not exist, the processing flow for the product data to be modified ends.
7. A data processing method, characterized in that, Applied to the backend, including: The front end receives modified data sent by the front end, wherein the modified data is obtained by the front end in response to the modification request of the online table, extracting the corresponding product inventory unit identifier and the character to be modified from the product data to be modified in the online table, and constructing it based on the corresponding product inventory unit identifier, the character to be modified and the position information of the product data to be modified in the online table; Category data is obtained by querying a pre-built category database based on the product inventory unit identifier in the modified data; Modify the category data according to the character to be modified corresponding to the commodity inventory unit identifier to obtain the target data; The target data is returned to the front end, so that the front end can render the target data in the online table based on the location information in the target data.
8. The method according to claim 7, characterized in that, The step of modifying the category data according to the character to be modified corresponding to the commodity inventory unit identifier to obtain the target data includes: Determine the table header corresponding to the category data based on the target category represented by the category data; The category data is assigned values according to the table header to obtain table data; Based on the table data, the character to be modified corresponding to the commodity inventory unit identifier is assigned a second value according to the table header to obtain the target data.
9. The method according to claim 8, characterized in that, The characters to be modified are connected using concatenation characters. Based on the table data, the characters to be modified corresponding to the product inventory unit identifier are assigned a second value according to the table header to obtain the target data, including: Identify the connecting character and determine whether there is a corresponding character to be modified; If a character to be modified exists, the table data is assigned a value according to the table header, and the target character at the corresponding position in the table data is replaced with the character to be modified; or, if no character to be modified exists, the table data is assigned a value according to the table header without modifying the target character.
10. A data processing apparatus, characterized in that, Applied to front-end, including: The acquisition unit is configured to, in response to a modification request in an online table, acquire the product data to be modified in the online table and determine the location information of the product data to be modified in the online table; The construction unit is used to extract the corresponding product inventory unit identifier and the character to be modified from the product data to be modified, and to construct the modification data based on the corresponding product inventory unit identifier, the character to be modified and the location information. A sending unit is used to send the modified data to the backend; wherein, the backend is used to query the category data from the target category database according to the product inventory unit identifier in the modified data, and modify the category data according to the character to be modified corresponding to the product inventory unit identifier to obtain the target data, wherein the target data carries the location information corresponding to the product inventory unit identifier; The rendering unit is used to receive the target data returned by the backend and render the target data in the online table according to the position information in the target data.
11. A data processing apparatus, characterized in that, Applied to the backend, including: The receiving unit is used to receive the modified data sent by the front end, wherein the modified data is obtained by the front end in response to the modification request of the online table, extracting the corresponding product inventory unit identifier and the character to be modified from the product data to be modified in the online table, and constructing it based on the corresponding product inventory unit identifier, the character to be modified and the position information of the product data to be modified in the online table; The query unit is used to query category data obtained from a pre-built category database based on the product inventory unit identifier in the modified data; The modification unit is used to modify the category data according to the character to be modified corresponding to the commodity inventory unit identifier to obtain the target data; The return unit is used to return the target data to the front end, so that the front end can render the target data in the online table according to the location information in the target data.
12. An electronic device, characterized in that, include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the data processing method as described in any one of claims 1 to 9.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the data processing method as described in any one of claims 1 to 9.