A data processing method, apparatus, device, and readable storage medium

By providing batch new and batch filling interfaces on the server, the client sends entries creation requests at one time, and the server creates and fills the metadata of multiple rows of entries at one time, solving the network delay and data loss caused by asynchronous request loop sending in the existing technology, realizing fast and stable entries data processing and improving user experience.

CN113849467BActive Publication Date: 2025-06-27KINGDEE SOFTWARE(CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111131415.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-26
Publication Date
2025-06-27
Estimated Expiration
2041-09-26

AI Technical Summary

Technical Problem

When processing multi-line invoice entry data, the network delay in the prior art due to the circular transmission of asynchronous requests may increase, which may lead to the loss of entry data. The back-end device and client need to interact frequently, consume network resources, and bring bad experience to users.

Method used

By providing batch addition and batch filling interfaces on the server, the client sends entries creation requests at one time, and the server creates and fills the metadata of multiple rows of entries at one time based on these interfaces, and returns them to the client for processing, thereby avoiding circular interaction.

Benefits of technology

It realizes the rapid acquisition of complete entries data, reduces the probability of network delay and entries loss, saves network resources, improves user experience, and simplifies debugging and tracking after data loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113849467B_ABST
    Figure CN113849467B_ABST
Patent Text Reader

Abstract

The present application discloses a data processing method, apparatus, device and readable storage medium. The method disclosed in the present application is applied to a server, and includes: receiving an entry creation request for creating multiple lines of entries at one time for a target document sent by a client; creating metadata of multiple lines of entries at one time based on a backend batch addition interface and the entry creation request to obtain a metadata set; and returning the metadata set to the client so that the client processes the metadata set to obtain multiple lines of entries. In this solution, the server and the client only need to interact once to quickly obtain complete entry data, without increasing network latency, can reduce the probability of entry loss, can save network resources, and the client only needs to refresh and flash once, which can improve the user experience. Correspondingly, a data processing apparatus, device and readable storage medium provided by the present application also have the above technical effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and particularly relates to a data processing method, apparatus, device and readable storage medium. Background Art

[0002] Currently, invoice data can be processed using computer devices to obtain standardized journal entry data. When the number of imported invoices is plural or an invoice has multiple details, the client needs to separately request the back-end device to create and populate journal entries for each line of the journal entry, and different requests are sent asynchronously. Therefore, the back-end device and the client need to interact in a loop until all journal entries are created.

[0003] In this process, the loop sending of multiple asynchronous requests will increase network latency, and the back-end device may not be able to process some requests normally due to network quality, so the client will lose journal entry data. After the journal entry data is lost, it is difficult to troubleshoot problems through debugging and tracking. The loop interaction between the back-end device and the client will also consume more network resources. Every time the front-end gets a line of journal entry, the page will refresh and flash once, and the frequent flashing brings a bad experience to the user.

[0004] Therefore, how to quickly obtain complete journal entry data is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0005] In view of this, the purpose of this application is to provide a data processing method, apparatus, device and readable storage medium to quickly obtain complete journal entry data. The specific solutions are as follows:

[0006] In a first aspect, this application provides a data processing method applied to a server, including:

[0007] Receiving a journal entry creation request for creating multiple lines of journal entries at one time for a target document sent by a client;

[0008] Based on a back-end batch addition interface and the journal entry creation request, creating metadata for multiple lines of journal entries at one time to obtain a metadata set;

[0009] Returning the metadata set to the client so that the client processes the metadata set to obtain multiple lines of journal entries.

[0010] Preferably, the creating metadata for multiple lines of journal entries at one time based on the back-end batch addition interface and the journal entry creation request to obtain a metadata set includes:

[0011] Invoking a back-end batch addition interface to parse the journal entry creation request and creating multiple lines of empty journal entries at one time;

[0012] Send the multiple blank entries to the client so that the client sends an entry filling request to the server;

[0013] After receiving the entry filling request, call the backend batch filling interface to fill the multiple blank entries to obtain the meta-dataset.

[0014] Preferably, the one-time creation of multiple blank entries includes:

[0015] Determine the entry order and create multiple blank entries arranged in the entry order at one time.

[0016] Preferably, the client processes the meta-dataset to obtain multiple entries, including:

[0017] The client calls the front-end batch filling interface to fill the metadata of multiple entries in the meta-dataset with the document header of the target document respectively, and calls the batch update function to process all the filled metadata to obtain multiple entries.

[0018] Preferably, the generation process of the entry creation request includes:

[0019] Receive the invoice serial number sent by the client and obtain the invoice corresponding to the invoice serial number;

[0020] Obtain multiple entry fields from the invoice and generate a data packet including multiple entries based on the multiple entry fields;

[0021] Send the data packet to the client so that the client generates the entry creation request based on the data packet and the front-end batch addition interface.

[0022] Preferably, the obtaining multiple entry fields from the invoice and generating a data packet including multiple entries based on the multiple entry fields includes:

[0023] Call a preset model to obtain multiple entry fields from the invoice and generate a data packet including multiple entries based on the multiple entry fields.

[0024] Preferably, the generating a data packet including multiple entries based on the multiple entry fields includes:

[0025] Serialize the multiple entry fields into a JSON string and generate a data packet including the JSON string.

[0026] In a second aspect, the present application provides a data processing device, which is applied to a server and includes:

[0027] A receiving module, configured to receive an entry creation request for one-time creation of multiple entries for a target document sent by a client;

[0028] A creation module, configured to create metadata of multiple lines of accounting entries at one time based on a back-end batch addition interface and the accounting entry creation request, so as to obtain a metadata set;

[0029] A return module, configured to return the metadata set to the client, so that the client processes the metadata set to obtain multiple lines of accounting entries.

[0030] In a third aspect, the present application provides an electronic device, including:

[0031] A memory, configured to store a computer program;

[0032] A processor, configured to execute the computer program to implement the data processing method disclosed above.

[0033] In a fourth aspect, the present application provides a readable storage medium, configured to store a computer program, wherein the computer program, when executed by a processor, implements the data processing method disclosed above.

[0034] As can be seen from the above solutions, the present application provides a data processing method, which is applied to a server and includes: receiving an accounting entry creation request sent by a client for creating multiple lines of accounting entries at one time for a target document; creating metadata of multiple lines of accounting entries at one time based on a back-end batch addition interface and the accounting entry creation request to obtain a metadata set; returning the metadata set to the client, so that the client processes the metadata set to obtain multiple lines of accounting entries.

[0035] It can be seen that the client in the present application can send an accounting entry creation request for creating multiple lines of accounting entries at one time for a target document. After receiving the request, the server can create metadata of multiple lines of accounting entries at one time based on the back-end batch addition interface to obtain a metadata set; return the metadata set to the client, so that the client processes the metadata set to obtain multiple lines of accounting entries. In this solution, the server and the client do not need to interact in a loop, only need to interact once, can quickly obtain complete accounting entry data, will not increase network latency, can reduce the probability of accounting entry loss, can save network resources, and the client only needs to refresh and flash once, which can improve the user experience. Because there is only one request and the corresponding return action, it is easy to debug and troubleshoot problems after the accounting entry data is lost.

[0036] Correspondingly, a data processing device, device and readable storage medium provided by the present application also have the above technical effects. Description of the Drawings

[0037] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on the provided drawings.

[0038] Figure 1 It is a flowchart of a data processing method disclosed in the present application;

[0039] Figure 2 It is another flowchart of a data processing method disclosed in the present application;

[0040] Figure 3 It is a schematic diagram of a data processing device disclosed in the present application;

[0041] Figure 4 It is a schematic diagram of an electronic device disclosed in the present application. Detailed implementation manners

[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0043] Currently, when the imported invoices are plural or the invoice has multiple details, the client needs to request the back-end device to create and fill in entries for each line item respectively, and different requests are sent asynchronously. Therefore, the back-end device and the client need to interact cyclically until all entries are created. In this process, the cyclic sending of multiple asynchronous requests will increase network latency, and the back-end device may not be able to process some requests normally due to network quality. Therefore, the client will lose entry data. After the entry data is lost, it is difficult to troubleshoot problems through debugging and tracking. The cyclic interaction between the back-end device and the client will also consume more network resources. Every time the front-end gets a line item, the page will refresh and flash once, and the frequent flashing brings a bad experience to the user. For this reason, the present application provides a data processing solution, which can quickly obtain complete entry data, will not increase network latency, can reduce the probability of entry loss, can save network resources, and the client only needs to refresh and flash once, which can improve the user experience. Because there is only one request and the corresponding return action, it is easy to debug and track and troubleshoot problems after the entry data is lost.

[0044] An asynchronous request means that the requesting party does not need to wait for the result of the previous request. Instead, after sending the request, it continues to execute subsequent other operations. The requested party notifies the requesting party of the request result through the status or processes it through a callback function.

[0045] See Figure 1 As shown, an embodiment of the present application discloses a data processing method applied to a server, including:

[0046] S101. Receive an entry creation request sent by the client to create multiple entries at one time.

[0047] An enterprise management system can manage the business data of an enterprise through documents. A document can include a document header and a document body. The document header includes multiple fields to record the basic information of the document, such as document type, document number, date, etc. The document body can include multiple entries, and the entries are displayed and entered in tabular form. Each row of entries includes multiple fields to record the corresponding business data.

[0048] In this embodiment, the entry creation request is used to enable the server to create multiple entries at one time, thereby avoiding frequent back-and-forth interactions between the client and the server and saving network resources. The entry creation request includes: the number of entries and other relevant information.

[0049] S102. Based on the backend batch addition interface and the entry creation request, create the metadata of multiple entries at one time to obtain a metadata set.

[0050] To create multiple entries at one time, in this embodiment, a front-end batch filling interface, a front-end batch addition interface, and a batch update function are set on the client side, and a backend batch addition interface and a backend batch filling interface are set on the server side. In a specific implementation, the server creates the metadata of multiple entries at one time based on the backend batch addition interface and the entry creation request to obtain a metadata set, including: the server calls the backend batch addition interface to parse the entry creation request and creates multiple empty entries at one time; sends the multiple empty entries to the client so that the client sends an entry filling request to the server; after receiving the entry filling request, calls the backend batch filling interface to fill the multiple empty entries to obtain a metadata set. Among them, the metadata of an entry is used to describe the corresponding fields in a certain entry, so the metadata set is used to describe the corresponding fields in multiple entries.

[0051] Among them, creating multiple empty entries at one time includes: determining the entry order and creating multiple empty entries arranged in the entry order at one time. The entry order has been set in the entry creation request.

[0052] In a specific embodiment, the client processes the metadata set to obtain multiple lines of entries, including: the client calls the front-end batch filling interface to fill the metadata of multiple lines of entries in the metadata set with the document header of the target document respectively, and calls the batch update function to process all the filled metadata to obtain multiple lines of entries. Among them, all the entries in the same document share the document header of this document, indicating that these entries can be generated at one time and are also convenient for distinguishing the entries generated by different documents.

[0053] In this embodiment, the generation process of the entry creation request includes: receiving the invoice serial number sent by the client and obtaining the invoice corresponding to the invoice serial number; obtaining multiple entry fields from the invoice and generating a data packet including multiple lines of entries based on the multiple entry fields; sending the data packet to the client so that the client generates an entry creation request based on the data packet and the front-end batch addition interface. Among them, one document can correspond to multiple invoices.

[0054] Among them, obtaining multiple entry fields from the invoice and generating a data packet including multiple lines of entries based on the multiple entry fields includes: calling a preset model (such as the Business Object business model in the following text) to obtain multiple entry fields from the invoice and generating a data packet including multiple lines of entries based on the multiple entry fields.

[0055] Among them, generating a data packet including multiple lines of entries based on the multiple entry fields includes: serializing the multiple entry fields into a JSON string and generating a data packet including the JSON string.

[0056] S103. Return the metadata set to the client so that the client processes the metadata set to obtain multiple lines of entries.

[0057] In this embodiment, the client can send an entry creation request for creating multiple lines of entries for the target document at one time. After receiving the request, the server can create the metadata of multiple lines of entries at one time based on the back-end batch addition interface to obtain a metadata set; return the metadata set to the client so that the client processes the metadata set to obtain multiple lines of entries.

[0058] It can be seen that the server and the client in this embodiment do not need to interact in a loop, only need to interact once, can quickly obtain complete entry data, will not increase network latency, can reduce the probability of entry loss, can save network resources, and the client only needs to refresh and flash once, which can improve the user experience. Because there is only one request and the corresponding return action, it is easy to debug and troubleshoot problems after the entry data is lost.

[0059] See Figure 2 As shown, the embodiment of the present application discloses another data processing solution, which obtains entry data through a single asynchronous request at the front end and performs loop serial processing at the back end.

[0060] Specifically, add a back-end batch addition interface and a back-end batch filling interface to the back-end BOS framework, and add a front-end batch filling interface, a front-end batch addition interface, and a batch update function to the client. Among them, the client is developed based on ES5 or ES6.

[0061] The specific implementation steps are as follows:

[0062] The front-end sends the invoice serial number to the back-end. The back-end obtains the corresponding invoice based on the invoice serial number and uses the Business Object business model to perform business logic processing to determine the values of the document entry fields corresponding to the invoice and the corresponding JSON strings.

[0063] The back-end packs these JSON strings into data packets and sends them to the front-end.

[0064] The front-end receives and parses the data packet, and converts all the JSON strings in it into parameter objects required for creating entry requests based on the front-end batch addition interface. Then, the front-end sends all the parameter objects to the back-end in the form of an AJAX request. That is: instead of splitting the data packet into individual document body objects and making multiple requests to add and fill the entry line content respectively, it is converted into a request parameter packet including multiple entry lines, and all the entry line creations and content fills are completed through a single AJAX request. Finally, the front-end can render the page once based on the front-end batch filling interface and the batch update function.

[0065] After receiving all the parameter objects, the back-end completes the creation and filling of all entries at one time based on the back-end batch addition interface and the back-end batch filling interface, and returns the corresponding results.

[0066] Please refer to Figure 2 , the back-end performs loop serial processing, that is: the back-end first returns empty entries without filled specific data to the front-end based on the back-end batch addition interface. When the front-end requests to fill multiple entries, the back-end then fills the specific data into the empty entries based on the back-end batch filling interface and returns. After the front-end receives the filled entries, it can fill the document headers of the target documents for each entry based on the front-end batch filling interface and refresh and display the page by rendering it once based on the batch update function.

[0067] It can be seen that in this embodiment, the problem of untimely and incomplete front-end rendering caused by network latency is solved by the front-end single asynchronous request method, and the probability of data loss can be reduced. Moreover, the batch request method can reduce network resource consumption while improving performance to a certain extent. Especially when the entry data volume is large, compared with multiple loop requests, the response speed of a single request is significantly improved. The front-end only needs to refresh the page once, with a better user experience, and a single request and response are also easy to develop and easy to track problems.

[0068] The following introduces a data processing device provided by an embodiment of the present application. The data processing device described below and the data processing method described above can be referred to each other.

[0069] See Figure 3 As shown, an embodiment of the present application discloses a data processing device, which is applied to a server and includes:

[0070] A receiving module 301, configured to receive an entry creation request for creating multiple lines of entries at one time for a target document sent by a client;

[0071] A creating module 302, configured to create metadata of multiple lines of entries at one time based on a backend batch addition interface and the entry creation request to obtain a metadata set;

[0072] A returning module 303, configured to return the metadata set to the client so that the client processes the metadata set to obtain multiple lines of entries.

[0073] In a specific embodiment, the creating module includes:

[0074] A calling unit, configured to call a backend batch addition interface to parse the entry creation request and create multiple lines of empty entries at one time;

[0075] A sending unit, configured to send the multiple lines of empty entries to the client so that the client sends an entry filling request to the server;

[0076] A filling unit, configured to call a backend batch filling interface to fill the multiple lines of empty entries after receiving the entry filling request to obtain a metadata set.

[0077] In a specific embodiment, the calling unit is specifically configured to:

[0078] Determine the entry order and create multiple lines of empty entries arranged in the entry order at one time.

[0079] In a specific embodiment, the client calls a front-end batch filling interface to fill the document headers of the multiple lines of entries in the metadata set respectively, and calls a batch update function to process all the filled metadata to obtain multiple lines of entries.

[0080] In a specific embodiment, a generating module is configured to generate an entry creation request, and this module includes:

[0081] A receiving unit, configured to receive an invoice serial number sent by the client and obtain the invoice corresponding to the invoice serial number;

[0082] A field determining unit, configured to obtain multiple entry fields from the invoice and generate a data packet including multiple lines of entries based on the multiple entry fields;

[0083] A generating unit, configured to send a data packet to a client, so that the client generates an entry creation request based on the data packet and a front-end bulk addition interface.

[0084] In a specific embodiment, the field determination unit is specifically configured to:

[0085] Call a preset model to obtain a plurality of entry fields from an invoice, and generate a data packet including multiple lines of entries based on the plurality of entry fields.

[0086] In a specific embodiment, the field determination unit is specifically configured to:

[0087] Serialize the plurality of entry fields into a JSON string, and generate a data packet including the JSON string.

[0088] Wherein, for the more specific working processes of each module and unit in this embodiment, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details will not be elaborated herein.

[0089] It can be seen that this embodiment provides a data processing device, which can quickly obtain complete entry data, does not increase network latency, can reduce the probability of entry loss, can save network resources, and the client only needs to refresh and flash once, which can improve the user experience. Because there is only one request and the corresponding return action, it is easy to debug and troubleshoot problems after the entry data is lost.

[0090] Next, an electronic device provided by an embodiment of the present application will be introduced. The electronic device described below can be mutually referred to with the data processing method and device described above.

[0091] See Figure 4 As shown, an embodiment of the present application discloses an electronic device, including:

[0092] A memory 401, configured to store a computer program;

[0093] A processor 402, configured to execute the computer program to implement the method disclosed in any of the foregoing embodiments.

[0094] Next, a readable storage medium provided by an embodiment of the present application will be introduced. The readable storage medium described below can be mutually referred to with the data processing method, device and equipment described above.

[0095] A readable storage medium, configured to store a computer program, wherein the computer program, when executed by a processor, implements the data processing method disclosed in the foregoing embodiments. For the specific steps of the method, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details will not be elaborated herein.

[0096] The "first", "second", "third", "fourth", etc. (if any) involved in this application are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, or devices.

[0097] It should be noted that the descriptions involving "first", "second", etc. in this application are only for descriptive purposes and should not be construed as indicating or implying their relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. Additionally, the technical solutions between various embodiments can be combined with each other, but it must be based on the ability of those of ordinary skill in the art to implement. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0098] The various embodiments in this specification are described in a progressive manner, with each embodiment highlighting the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other.

[0099] The steps of the methods or algorithms described in connection with the embodiments disclosed herein can be implemented directly in hardware, software modules executed by a processor, or a combination of both. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of readable storage medium known in the art.

[0100] Specific examples are used herein to elaborate on the principles and implementation manners of this application. The descriptions of the above embodiments are only for helping to understand the method and its core idea of this application. At the same time, for those of ordinary skill in the art, based on the idea of this application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to this application.

Claims

1. A data processing method, characterized in that, Applied to the server side, including: Receiving an entry creation request sent by the client for creating multiple lines of entries at one time for a target document; Based on the backend batch addition interface and the entry creation request, creating metadata for multiple lines of entries at one time to obtain a metadata set; Returning the metadata set to the client so that the client processes the metadata set to obtain multiple lines of entries; Among them, the creating metadata for multiple lines of entries at one time based on the backend batch addition interface and the entry creation request to obtain a metadata set includes: Invoking the backend batch addition interface to parse the entry creation request and creating multiple empty entries at one time; Sending the multiple empty entries to the client so that the client sends an entry filling request to the server; After receiving the entry filling request, invoking the backend batch filling interface to fill the multiple empty entries to obtain the metadata set.

2. The data processing method according to claim 1, characterized in that The creating multiple empty entries at one time includes: Determining the entry order and creating multiple empty entries arranged in the entry order at one time.

3. The data processing method according to claim 1, wherein The client processing the metadata set to obtain multiple lines of entries includes: The client invokes the front-end batch filling interface to fill the document header of the target document for the metadata of multiple lines of entries in the metadata set respectively, and invokes the batch update function to process all the filled metadata to obtain multiple lines of entries.

4. The data processing method according to any one of claims 1 to 3, characterized in that, The generation process of the entry creation request includes: Receiving the invoice serial number sent by the client and obtaining the invoice corresponding to the invoice serial number; Obtaining multiple entry fields from the invoice and generating a data packet including multiple lines of entries based on the multiple entry fields; Sending the data packet to the client so that the client generates the entry creation request based on the data packet and the front-end batch addition interface.

5. The data processing method according to claim 4, wherein The obtaining multiple entry fields from the invoice and generating a data packet including multiple lines of entries based on the multiple entry fields includes: Invoking a preset model to obtain multiple entry fields from the invoice and generating a data packet including multiple lines of entries based on the multiple entry fields.

6. The data processing method according to claim 4, wherein The generating a data packet including multiple lines of entries based on the multiple entry fields includes: Serializing the multiple entry fields into a JSON string and generating a data packet including the JSON string.

7. A data processing device, characterized in that, Applied to the server side, including: A receiving module for receiving an entry creation request sent by the client for creating multiple lines of entries at one time for a target document; A creating module for creating metadata for multiple lines of entries at one time based on the backend batch addition interface and the entry creation request to obtain a metadata set; A returning module for returning the metadata set to the client so that the client processes the metadata set to obtain multiple lines of entries; Among them, the creating module includes: An invoking unit for invoking the backend batch addition interface to parse the entry creation request and creating multiple empty entries at one time; A sending unit for sending the multiple empty entries to the client so that the client sends an entry filling request to the server; A filling unit for, after receiving the entry filling request, invoking the backend batch filling interface to fill the multiple empty entries to obtain the metadata set.

8. An electronic device, characterized in that, Comprising: A memory for storing a computer program; A processor for executing the computer program to implement the data processing method according to any one of claims 1 to 6.

9. A readable storage medium, characterized in that, For saving a computer program, wherein when the computer program is executed by a processor, the data processing method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method and device for creating files in batches, equipment and storage medium

    CN111046001A

  • Method and system for issuing invoices in batches

    CN112749999A