WO2020211233A1 - 批量数据编辑方法、装置、计算机设备及存储介质 - Google Patents

批量数据编辑方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2020211233A1
WO2020211233A1 PCT/CN2019/101926 CN2019101926W WO2020211233A1 WO 2020211233 A1 WO2020211233 A1 WO 2020211233A1 CN 2019101926 W CN2019101926 W CN 2019101926W WO 2020211233 A1 WO2020211233 A1 WO 2020211233A1
Authority
WO
WIPO (PCT)
Prior art keywords
passed
data
content
parameter
data format
Prior art date
Application number
PCT/CN2019/101926
Other languages
English (en)
French (fr)
Inventor
宋扬名
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020211233A1 publication Critical patent/WO2020211233A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files

Definitions

  • This application relates to the field of data processing, in particular to a batch data editing method, device, computer equipment and storage medium.
  • a batch data editing method including:
  • the batch data is composed of multiple attributes A set, and each of the attributes corresponds to one or more attribute values, and the first segmentation rule refers to inserting segmentation symbols between different attributes in the batch data according to a preset data format;
  • the parameter to be passed in is overwritten on the first cache content to obtain the second cache content.
  • a batch data editing device including:
  • the inserting module is used to insert the preset segmentation symbol into the batch data in the batch transaction according to the first segmentation rule, and record the batch data containing the segmentation symbol as a parameter to be passed in, and the batch data refers to A set consisting of multiple attributes, and each of the attributes corresponds to one or more attribute values, and the first segmentation rule refers to inserting segmentation between different attributes in the batch data according to a preset data format symbol;
  • the confirmation module is configured to receive a copy instruction and confirm whether the attribute value corresponding to each attribute of the batch data in the parameter to be passed in is non-empty data, and all the attribute values are non-empty data. When the data is empty, store the parameters to be transferred in the copy buffer space;
  • a verification module configured to verify whether the data format of the parameter to be passed in the copy buffer space is consistent with the preset data format through the division symbol
  • the first judgment module is configured to judge the first buffer that already exists in the copy buffer space when the data format of the parameter to be passed in in the copy buffer space matches the preset data format Whether the content is the same as the parameter to be passed in;
  • the first prompt module is configured to prompt whether the first cache content needs to be overwritten with the parameters to be passed in if the first cache content is not the same as the parameters to be passed in;
  • the first covering module is configured to, when it is necessary to cover the first cache content with the parameters to be passed in, overwrite the parameters to be passed in on the first cache content to obtain the second cache content.
  • a computer device includes a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions:
  • the batch data is composed of multiple attributes A set, and each of the attributes corresponds to one or more attribute values, and the first segmentation rule refers to inserting segmentation symbols between different attributes in the batch data according to a preset data format;
  • the parameter to be passed in is overwritten on the first cache content to obtain the second cache content.
  • One or more non-volatile readable storage media storing computer readable instructions.
  • the computer readable instructions execute the following steps:
  • the batch data is composed of multiple attributes A set, and each of the attributes corresponds to one or more attribute values, and the first segmentation rule refers to inserting segmentation symbols between different attributes in the batch data according to a preset data format;
  • the parameter to be passed in is overwritten on the first cache content to obtain the second cache content.
  • FIG. 1 is a schematic diagram of an application environment of a batch data editing method in an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a batch data editing method in an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a batch data editing method in an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a batch data editing method in an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a batch data editing method in an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a batch data editing method in an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of a batch data editing method in an embodiment of the present application.
  • FIG. 8 is a schematic diagram of the structure of a batch data editing device in an embodiment of the present application.
  • Fig. 9 is a schematic diagram of a computer device in an embodiment of the present application.
  • the batch data editing method provided by this application can be applied in the application environment as shown in Figure 1, where the client communicates with the server through the network.
  • the client can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the server can be implemented as an independent server or a server cluster composed of multiple servers.
  • a method for editing batch data is provided. Taking the method applied to the server in FIG. 1 as an example for description, the method includes the following steps:
  • the batch transaction (such as the batch financial transaction in the banking system) may involve a large amount of batch data; the batch data is a collection of multiple attributes (such as the number, price, and total price of the transaction process). Etc.), and the attribute includes one to multiple attribute values (such as the number, price, and total price in different quarters), and the batch data in the batch transaction refers to files in different formats (such as word, TXT, file data in excel, etc.).
  • the server may divide one or more preset dividing symbols (including but not limited to “space”, “/”, “
  • the data format is divided into batch data), and the batch data with a unified preset data format (the batch data including the division symbol) is used as the parameter to be passed in.
  • S20 Receive a copy instruction, and confirm whether the attribute value corresponding to each attribute of the batch data in the parameter to be passed in is non-empty data, when all the attribute values are the non-empty data , Store the parameters to be transferred in the copy buffer space.
  • the copy instruction refers to the action of the server to copy the parameter to be passed in;
  • the non-empty data refers to the fact that each attribute of the batch data in the parameter to be passed in has the attribute Value (that is, a piece of data has an ID, but there is other information related to the ID, such as a value, etc.).
  • the server when monitoring that the server currently has an action to copy the parameters to be passed in, the server first does not directly copy the parameters to be passed in to the copy buffer space, but needs to confirm the parameters in the parameters to be passed in.
  • the attribute value corresponding to each attribute of the batch data is non-empty data (for example, each of the quantity, price, and total price attributes mentioned in the above example corresponds to non-empty data in different quarters, At this time, the attribute values corresponding to the attributes of the batch data are all non-empty data), and if they are all non-empty data, the parameters to be transferred are copied and stored in the copy buffer space.
  • the server may prompt the attribute value corresponding to each attribute in the parameter to be passed in. Otherwise, it may indicate that the attribute values corresponding to one or more of the attributes of the batch data in the parameters to be passed in have empty data.
  • the corresponding attribute value in the batch data may cause inaccurate calculation of the batch data due to the existence of empty data (because an attribute value corresponds to empty data, the specific attribute value may be omitted If the value is entered, if this is the case, the data after the calculation must be incorrect if the batch of empty data is used at this time. At this time, the server can prompt the relevant technicians to find the parameters that need to be passed in.
  • the attribute value corresponding to each attribute of the batch data contains the reason for the empty data, and the corresponding solution is given.
  • each of the batch data may appear The attribute is segmented incorrectly, resulting in a situation where the data format of the parameter to be passed after segmentation does not match the preset data format.
  • the correct segmentation format that is, the preset data format is "aaaa
  • the wrong segmentation format the data format after the batch data is split is "aaaab
  • the server needs to verify whether the currently divided data format of the parameters to be passed in the copy buffer space is correct.
  • the verifying whether the data format of the parameter to be passed in the copy buffer space is consistent with the preset data format through the division symbol includes:
  • S301 Acquire the type and arrangement order of the segmentation symbols set in a preset data format and the number of the attributes of the interval between two adjacent segmentation symbols.
  • the preset data format includes the type of segmentation symbol used to segment the batch of data this time (one or more segmentation symbols can be used in the same batch of data), and the arrangement order of each of the segmentation symbols (such as If there are more than two division symbols that need to be inserted in the batch data, if the two division symbols are 1 and 2, the arrangement order of the division symbols can be 112112 or 121212, etc.) and the corresponding The number of attribute values between two adjacent division symbols (the number of attribute values between two adjacent division symbols can be set according to requirements, for example, the number can be 1 or 2).
  • the data format of the parameter to be passed in is consistent with the type and arrangement order of the division symbols set in the preset data format
  • the parameter to be passed in is consistent with the preset data format
  • the number of the attributes of the interval between two adjacent dividing symbols in is the same, it can be explained that the parameters to be passed in the cache space content are divided according to the preset data grid;
  • the data format of the parameter to be passed in is inconsistent with the type and arrangement order of the division symbols set in the preset data format, or the parameter to be passed in is adjacent to the preset data format
  • the number of the attributes of the interval between the two division symbols is not the same, it may indicate that the parameters to be passed in the cache space content are not divided according to the preset data grid.
  • the data format of the parameter to be passed in is consistent with the type and arrangement order of the division symbols set in the preset data format, and the parameter to be passed in is consistent with the preset data
  • the number of the attributes of the interval between two adjacent division symbols in the format is the same, confirm that the data format of the parameter to be passed in the cache space content and the preset data format Match.
  • the data format of the parameter to be passed in is inconsistent with the type or arrangement order of the segmentation symbols set in the preset data format, or the parameter to be passed in is inconsistent with the preset data
  • the number of the attributes of the interval between two adjacent division symbols in the format is not the same, confirm that the data format of the parameter to be passed in the cache space content and the preset data The format does not match.
  • step S30 it is also possible to determine whether each attribute of the parameter to be passed in the copy cache space content has the problem of recurring attributes, if the copy cache space content If each attribute of the parameter to be passed in has the problem of recurring attributes, it is prompted that each attribute of the parameter to be passed in in the copy cache space content has a problem of recurring attributes (such as manual possibility Enter the attributes in the batch data repeatedly) and end the batch transaction (because each attribute in the batch data of each batch transaction is unique, when repeated attributes appear, it will affect the result of the batch transaction, so (It needs to be turned off), if each attribute of the parameter to be passed in the cache space content does not have the problem of attribute recurrence, proceed to the next step to determine the first existing copy of the cache space Whether the cache content is the same as the parameter to be passed in.
  • a problem of recurring attributes such as manual possibility Enter the attributes in the batch data repeatedly
  • end the batch transaction because each attribute in the batch data of each batch transaction is unique, when repeated attributes appear, it will affect the result
  • the server may determine whether the first cache content that already exists in the copy cache space is partially or completely the same as the parameters to be passed in.
  • the server may prompt that the data format of the parameter to be transferred in the copy buffer space is incorrect and end the batch transaction (because the data format of the parameter to be transferred does not match the preset data format At the time, the different attributes may be divided together, which affects the result of the batch transaction).
  • prompting whether it is necessary to cover the first cached content with the parameters to be passed in refers to prompting whether to connect the parameters to be passed in that are not repeated with the first cached content.
  • the server can overwrite the parameters to be passed in (because the first cached content is different from the The parameters to be passed in are not the same, and the first cache content represents the parameters to be passed in to the copy cache space before.
  • overwriting the parameters to be passed in to the first cache content means The server may connect the parameters to be passed in to the first cached content) on the first cached content to update the second cached content (including the parameters to be passed in after the connection and all the The content of the first cache).
  • the method further includes:
  • the first cache content is not the same as the parameter to be passed in; when the judgment result is that the parameter to be passed in is partially or fully matched with the first cache content, it indicates that the parameter to be passed in is The content of the first cache is partially or completely the same.
  • the server can overwrite the parameters to be passed in (because the first cached content exists and the Part or all of the same content of the parameters to be passed in, at this time, the server may overlap the content of the parameters to be passed in that are part or all of the same content as the first cached content and then connect them, that is, overwrite the subsequent Only one copy of the same content in the first cache content and the parameters to be passed in can be retained) on the first cache content, thereby updating the second cache content (the parameters to be passed in The first cache content has the same intersection content).
  • the server when there is no need to repeatedly submit the parameters to be passed in that are the same as the content of the first cache, the server prompts that there is no need to repeatedly submit the parameters to be passed in and ends the batch transaction, that is, Since each batch transaction must submit relevant data (that is, the parameters to be passed in) during the transaction process, if the parameters to be passed in are not allowed to be submitted, the batch transaction will not be able to continue, and you need to change It's closed.
  • the method further includes:
  • S90 Determine whether the data size of the second cache content is greater than the size of the copy cache space.
  • the size of the copy cache space is limited, when the judgment result is that the data size of the second cache content is greater than the size of the copy cache space, it indicates that the size of the second cache content The data size is greater than the limited size; when the judgment result is that the data size of the second cache content is less than or equal to the size of the copy cache space, it indicates that the data size of the second cache content is less than or equal to the limited size.
  • S100 If the data size of the second cache content is greater than the size of the copy cache space, use a second segmentation rule to split the second cache content, and divide the data into multiple batches of data. After the second cache content is submitted, the second cache content is displayed on the page, and the second segmentation rule refers to dividing the second cache content into multiple batches of data of equal data size.
  • the second cache content divided into multiple batches of data may be submitted to the server that is processing the batch transaction, and the server sends the second cache content to the page where the batch transaction is performed on the client. On display.
  • the server can directly display the second cache content on the page on the client without dividing it into batches of data.
  • the divided into multiple batches Submitting the second cache content of the data includes:
  • S1001 Acquire the quantity of batch data after the second cache content is divided.
  • S1002 Determine whether the number of batches of data is greater than a preset number of concurrent batches threshold.
  • the preset threshold for the number of concurrent batches refers to the number of batches of data that the server allows to submit simultaneously.
  • the server determines whether the number of batch data is greater than the preset concurrency The batch number threshold.
  • the judgment result is that the number of the batch data is greater than the preset concurrent batch number threshold, it means that the number of the batch data has exceeded the limited number (which may cause the server to crash) , That is, the server cannot submit the second cache content divided into multiple batches of data at the same time; when the judgment result is that the number of batches is less than or equal to the preset number of concurrent batches threshold, it is explained
  • the quantity of the batch data does not exceed the limited quantity, that is, the server can submit the second cache content divided into multiple batches at the same time.
  • S1003 If the quantity of the batch data is greater than the preset threshold of the number of concurrent batches, submit the batch of data equal to the threshold of the number of concurrent batches, and continue to determine the remaining uncommitted Whether the number of batch data is greater than the threshold of the number of concurrent batches, until the number of remaining unsubmitted batch data is less than or equal to the threshold of the number of concurrent batches.
  • the server can submit all the divided batch data at the same time .
  • the method further includes:
  • the data error includes data loss and abnormal increase of data.
  • the data loss refers to the damage caused to individuals or the collective after the computer suffers virus damage, human-induced file loss, or physical damage to the storage device. Loss of valuable information data; the abnormal increase of the data may be due to the import of irrelevant data (the value of the irrelevant attribute is attached to the attribute) or the attribute value corresponding to the attribute is duplicated. Due to the occurrence of the above-mentioned data error, a data error will occur in each of the attributes in the parameters to be passed in in the second cache content. At this time, it is necessary to check whether each attribute in the parameter to be passed in in the second cache content has a data error.
  • the batch transaction associated with the second cache content may be submitted to the server and then the batch transaction can be ended.
  • the relevant technical personnel may also be prompted whether the second Cache content.
  • the checking whether each of the attributes in the parameters to be passed in in the second cache content has suffered data loss includes:
  • step S120 the problem of data loss and increase in data size mentioned in step S120 may occur (irrelevant attribute values are attached to attributes or attribute values corresponding to attributes are repeated).
  • the data size of the parameter to be passed in of the second cache content may cause the data error due to the situation mentioned in step S120 above.
  • the server detects whether the data size of the parameters to be passed in in the second cache content is equal to the data size of the parameters to be passed in to determine whether the data size of the parameters to be passed in in the second cache content Whether a data error has occurred in each of the attributes.
  • the data size of the second cache content is equal to the data size of the parameter to be passed in, it means that one or more of the parameters to be passed in of the second cache content
  • the attribute does not have the data error, which may also indicate that each attribute in the to-be-passed parameter of the second cache content is correct data.
  • the foregoing provides a method for editing batch data, inserting a preset segmentation symbol into batch data in a batch transaction according to a first segmentation rule, and recording the batch data containing the segmentation symbol as to be transmitted Input parameters
  • the batch data refers to a set consisting of multiple attributes, and each of the attributes corresponds to one or more attribute values
  • the first segmentation rule means that the batch data is stored in the batch data according to a preset data format.
  • Insert a division symbol between the different attributes in the data receive a copy instruction to confirm whether the attribute value corresponding to each attribute of the batch data in the parameter to be passed in is non-empty data, in all the When the attribute value is the non-empty data, the parameter to be passed in is stored in the copy buffer space; the division symbol is used to verify whether the data format of the parameter to be passed in in the copy buffer space is consistent with the The preset data format matches; when the data format of the parameter to be passed in the copy buffer space matches the preset data format, it is determined that the first buffer content already exists in the copy buffer space Whether it is the same as the parameter to be passed in; if the first cache content is not the same as the parameter to be passed in, it is prompted whether it is necessary to overwrite the first cache content with the parameter to be passed in; When the parameters to be passed in cover the first cached content, the parameters to be passed in are overwritten on the first cached content to obtain the second cached content.
  • This application uses the preset segmentation symbol to edit the batch data in the batch transaction and form the parameters to be transferred, so that the data format of the batch data can be compatible, not limited to the imported file type; and after the batch data is imported, pass
  • the first segmentation rule splits the batch data to generate parameters to be passed in, and after determining the data content of the parameters to be passed in that are non-empty data in the copy buffer space, they are overwritten to the first buffer content in the copy buffer space
  • the editing rules for batch data are relatively flexible and simple.
  • a batch data editing device is provided, and the batch data editing device corresponds to the batch data editing method in the foregoing embodiment one-to-one.
  • the batch data editing device includes an insertion module 11, a confirmation module 12, a verification module 13, a first judgment module 14, a first prompt module 15 and a first covering module 16.
  • the detailed description of each functional module is as follows:
  • the inserting module 11 is configured to insert the preset segmentation symbol into the batch data in the batch transaction according to the first segmentation rule, and record the batch data containing the segmentation symbol as a parameter to be passed in, and the batch data refers to A set consisting of multiple attributes, and each attribute corresponds to one or more attribute values, and the first segmentation rule refers to inserting between different attributes in the batch data according to a preset data format separator;
  • the confirmation module 12 is configured to receive a copy instruction to confirm whether the attribute value corresponding to each attribute of the batch data in the parameter to be passed in is non-empty data, and all the attribute values are the When the data is not empty, store the parameters to be transferred in the copy buffer space;
  • the verification module 13 is configured to verify whether the data format of the parameter to be passed in the copy buffer space is consistent with the preset data format through the division symbol;
  • the first judging module 14 is configured to judge the first existing in the copy buffer space when the data format of the parameter to be passed in in the copy buffer space matches the preset data format. Whether the cache content is the same as the parameter to be passed in;
  • the first prompt module 15 is configured to prompt whether the first cache content needs to be overwritten with the parameters to be passed in if the first cache content is not the same as the parameters to be passed in;
  • the first covering module 16 is configured to, when it is necessary to cover the first cached content with the to-be-incoming parameter, overwrite the to-be-introduced parameter on the first cached content to obtain the second cached content.
  • the verification module includes:
  • the first obtaining submodule is configured to obtain the type and arrangement order of the segmentation symbols set in the preset data format and the number of the attributes of the interval between two adjacent segmentation symbols;
  • the first detection sub-module is used to detect whether the data format of the parameters to be passed in the cache space content is consistent with the type and arrangement order of the division symbols set in the preset data format, and at the same time Detecting whether the parameter to be passed in is the same as the number of the attributes of the interval between two adjacent division symbols in the preset data format;
  • the first confirmation sub-module is used for the data format of the parameters to be passed in and the type and arrangement order of the segmentation symbols set in the preset data format are consistent, and the parameters to be passed in When the number of the attributes of the interval between two adjacent division symbols in the preset data format is the same, it is confirmed that the data format of the parameter to be passed in the cache space content is The preset data format matches;
  • the second confirmation sub-module is used for the data format of the parameters to be passed in is inconsistent with the type or arrangement order of the segmentation symbols set in the preset data format, or the parameters to be passed in When the number of attributes of the interval between two adjacent division symbols in the preset data format is not the same, confirm that the data format of the parameter to be passed in the cache space content is consistent with the The stated preset data format does not match.
  • the batch data editing device further includes:
  • the second prompting module is configured to prompt whether to repeatedly submit the parameters to be passed in that are partially or completely the same as the first cached content if the first cached content is partially or completely the same as the parameters to be passed in ;
  • the second covering module is used for when the parameters to be passed in that are the same as those in the first cached content need to be repeatedly submitted, then the parameters to be passed in are overwritten on the first cached content to obtain the second Cache content.
  • the batch data editing device further includes:
  • the second judgment module is used to judge whether the data size of the second cache content is greater than the size of the copy cache space
  • the segmentation module is configured to: if the data size of the second cache content is greater than the size of the copy cache space, use a second segmentation rule to segment the second cache content and divide it into multiple batches of data After the second cached content is submitted, the second cached content is displayed on a page, and the second division rule refers to dividing the second cached content into multiple batches of data of equal data size;
  • the display module is configured to directly display the second cache content on the page if the data size of the second cache content is less than or equal to the size of the copy cache space.
  • the segmentation module includes:
  • the second obtaining submodule is used to obtain the quantity of batch data after the second cache content is divided;
  • the judging sub-module is used for judging whether the quantity of the batch data is greater than the preset number of concurrent batches threshold;
  • the first submission sub-module is configured to, if the quantity of the batch data is greater than the preset number of concurrent batches threshold, submit the batch of data equal to the number of concurrent batches threshold, and continue to judge Whether the number of remaining uncommitted batches of data is greater than the threshold of the number of concurrent batches, until the number of remaining uncommitted batches of data is less than or equal to the threshold of the number of concurrent batches;
  • the second submission submodule is configured to submit all the batch data if the quantity of the batch data is less than or equal to the preset number of concurrent batches threshold.
  • the batch data editing device further includes:
  • the first submission module is configured to submit the batch transaction associated with the second cache content when the data error does not occur in each of the attributes of the parameters to be passed in in the second cache content After ending the batch transaction;
  • the second submission module is configured to submit the batch transaction associated with the second cache content when the data error does not occur in each of the attributes of the parameters to be passed in in the second cache content After that, the batch transaction is ended.
  • the verification module includes:
  • the third acquisition sub-module is configured to acquire the data size of the parameter to be passed in after the segmentation symbol is inserted into the batch data, and at the same time to obtain the data size of the parameter to be passed in covering the content of the second cache;
  • the second detection sub-module is configured to detect whether the data size of the parameter to be passed in in the second cache content is equal to the data size of the parameter to be passed in;
  • the first prompting submodule is configured to prompt one or more of the parameters to be passed in of the second cache content when the data size of the second cache content is less than the data size of the parameters to be passed in Data loss occurs in each of the attributes;
  • the second prompting sub-module is configured to prompt that the data error does not occur in each attribute of the second cache content when the data size of the second cache content is equal to the data size of the parameter to be passed in;
  • the third prompting submodule is configured to prompt one or more of the parameters to be passed in the second cache content when the data size of the second cache content is greater than the data size of the parameters to be passed in An abnormal increase in data occurred for each of the attributes.
  • each module in the above-mentioned batch data editing device can be implemented in whole or in part by software, hardware and a combination thereof.
  • the foregoing modules may be embedded in the form of hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 9.
  • the computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the database of the computer equipment is used to store the data involved in the batch data editing method.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer-readable instructions are executed by the processor to realize a batch data editing method.
  • a computer device including a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions:
  • the batch data is composed of multiple attributes A set, and each of the attributes corresponds to one or more attribute values, and the first segmentation rule refers to inserting segmentation symbols between different attributes in the batch data according to a preset data format;
  • the parameter to be passed in is overwritten on the first cache content to obtain the second cache content.
  • one or more non-volatile readable storage media storing computer readable instructions are provided, the non-volatile readable storage medium storing computer readable instructions, and the computer readable instructions When executed by one or more processors, one or more processors are caused to implement the following steps:
  • the batch data is composed of multiple attributes A set, and each of the attributes corresponds to one or more attribute values, and the first segmentation rule refers to inserting segmentation symbols between different attributes in the batch data according to a preset data format;
  • the parameter to be passed in is overwritten on the first cache content to obtain the second cache content.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • ROM read only memory
  • PROM programmable ROM
  • EPROM electrically programmable ROM
  • EEPROM electrically erasable programmable ROM
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
  • Module completion means dividing the internal structure of the device into different functional units or modules to complete all or part of the functions described above.

Abstract

一种批量数据编辑方法、装置、计算机设备及存储介质。所述方法包括:将预设的分割符号按照第一分割规则插入批量数据,并将包含分割符号的批量数据记录为待传入参数(S10);接收复制指令,确认待传入参数中的批量数据的各属性对应的属性值是否为非空数据,在所有属性值均为非空数据时,将待传入参数存储至复制缓存空间(S20);通过分割符号验证待传入参数的数据格式是否与预设数据格式相符(S30);当相符时,则判断第一缓存内容是否与待传入参数相同(S40);若并不相同,则提示是否需要用待传入参数覆盖第一缓存内容(S50);当需要时,则将待传入参数覆盖第一缓存内容上,得到第二缓存内容(S60)。所述方法在对批量数据进行编辑的过程中相对灵活简单。

Description

批量数据编辑方法、装置、计算机设备及存储介质
本申请以2019年4月19日提交的申请号为201910320207.X,名称为“批量数据编辑方法、装置、计算机设备及存储介质”的中国发明专利申请为基础,并要求其优先权。
技术领域
本申请涉及数据处理领域,尤其涉及一种批量数据编辑方法、装置、计算机设备及存储介质。
背景技术
目前在系统实现批量交易的过程中(比如银行系统的批量金融交易),相关工作人员需将规定格式的文本文件或者excel文件(文件中包含批量数据)导入批量交易的系统中,发明人意识到,如此可能会导致工作人员的工作相对繁琐,并且对导入的文件有较多的格式限制;同时,发明人还发现有的批量交易的系统编辑设置了太多文件编辑规则,且大多数规则比较死板,容易导致系统编辑文件太过复杂。因此,寻找一种能够更加智能快捷导入批量数据和对批量数据的编辑更灵活简单的技术方案成为本领域技术人员亟需解决的问题。
发明内容
基于此,有必要针对上述技术问题,提供一种批量数据编辑方法、装置、计算机设备及存储介质,用于兼容批量数据的各种不同的数据格式,且对批量数据编辑相对灵活简单。
一种批量数据编辑方法,包括:
将预设的分割符号按照第一分割规则插入批量交易中的批量数据,并将包含所述分割符号的所述批量数据记录为待传入参数,所述批量数据是指由多个属性组成的集合,且每一个所述属性对应于一个或多个属性值,所述第一分割规则是指按照预设数据格式在所述批量数据中的不同所述属性之间插入分割符号;
接收复制指令,确认所述待传入参数中的所述批量数据的各所述属性对应的所述属性值是否为非空数据,在所有所述属性值均为所述非空数据时,将所述待传入参数存储至复制缓存空间;
通过所述分割符号验证所述复制缓存空间中的所述待传入参数的数据格式是否与所述预设数据格式相符;
当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式相符时,则判断所述复制缓存空间中已存在的第一缓存内容是否与所述待传入参数相同;
若所述第一缓存内容与所述待传入参数并不相同,则提示是否需要用所述待传入参数覆盖所述第一缓存内容;
当需要用所述待传入参数覆盖所述第一缓存内容时,则将所述待传入参数覆盖所述第一缓存内容上,得到第二缓存内容。
一种批量数据编辑装置,包括:
插入模块,用于将预设的分割符号按照第一分割规则插入批量交易中的批量数据,并将包含所述分割符号的所述批量数据记录为待传入参数,所述批量数据是指由多个属性组成的集合,且每一个所述属性对应于一个或多个属性值,所述第一分割规则是指按照预设数据格式在所述批量数据中的不同所述属性之间插入分割符号;
确认模块,用于接收复制指令,确认所述待传入参数中的所述批量数据的各所述属性对应的所述属性值是否为非空数据,在所有所述属性值均为所述非空数据时,将所述待传入参数存储至复制缓存空间;
验证模块,用于通过所述分割符号验证所述复制缓存空间中的所述待传入参数的数据格式是否与 所述预设数据格式相符;
第一判断模块,用于当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式相符时,则判断所述复制缓存空间中已存在的第一缓存内容是否与所述待传入参数相同;
第一提示模块,用于若所述第一缓存内容与所述待传入参数并不相同,则提示是否需要用所述待传入参数覆盖所述第一缓存内容;
第一覆盖模块,用于当需要用所述待传入参数覆盖所述第一缓存内容时,则将所述待传入参数覆盖所述第一缓存内容上,得到第二缓存内容。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
将预设的分割符号按照第一分割规则插入批量交易中的批量数据,并将包含所述分割符号的所述批量数据记录为待传入参数,所述批量数据是指由多个属性组成的集合,且每一个所述属性对应于一个或多个属性值,所述第一分割规则是指按照预设数据格式在所述批量数据中的不同所述属性之间插入分割符号;
接收复制指令,确认所述待传入参数中的所述批量数据的各所述属性对应的所述属性值是否为非空数据,在所有所述属性值均为所述非空数据时,将所述待传入参数存储至复制缓存空间;
通过所述分割符号验证所述复制缓存空间中的所述待传入参数的数据格式是否与所述预设数据格式相符;
当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式相符时,则判断所述复制缓存空间中已存在的第一缓存内容是否与所述待传入参数相同;
若所述第一缓存内容与所述待传入参数并不相同,则提示是否需要用所述待传入参数覆盖所述第一缓存内容;
当需要用所述待传入参数覆盖所述第一缓存内容时,则将所述待传入参数覆盖所述第一缓存内容上,得到第二缓存内容。
一个或多个存储有计算机可读指令的非易失性可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
将预设的分割符号按照第一分割规则插入批量交易中的批量数据,并将包含所述分割符号的所述批量数据记录为待传入参数,所述批量数据是指由多个属性组成的集合,且每一个所述属性对应于一个或多个属性值,所述第一分割规则是指按照预设数据格式在所述批量数据中的不同所述属性之间插入分割符号;
接收复制指令,确认所述待传入参数中的所述批量数据的各所述属性对应的所述属性值是否为非空数据,在所有所述属性值均为所述非空数据时,将所述待传入参数存储至复制缓存空间;
通过所述分割符号验证所述复制缓存空间中的所述待传入参数的数据格式是否与所述预设数据格式相符;
当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式相符时,则判断所述复制缓存空间中已存在的第一缓存内容是否与所述待传入参数相同;
若所述第一缓存内容与所述待传入参数并不相同,则提示是否需要用所述待传入参数覆盖所述第一缓存内容;
当需要用所述待传入参数覆盖所述第一缓存内容时,则将所述待传入参数覆盖所述第一缓存内容上,得到第二缓存内容。
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员 来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例中批量数据编辑方法的一应用环境示意图;
图2是本申请一实施例中批量数据编辑方法的一流程示意图;
图3是本申请一实施例中批量数据编辑方法的一流程示意图;
图4是本申请一实施例中批量数据编辑方法的一流程示意图;
图5是本申请一实施例中批量数据编辑方法的一流程示意图;
图6是本申请一实施例中批量数据编辑方法的一流程示意图;
图7是本申请一实施例中批量数据编辑方法的一流程示意图;
图8是本申请一实施例中批量数据编辑装置的结构示意图;
图9是本申请一实施例中计算机设备的一示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请提供的批量数据编辑方法,可应用在如图1的应用环境中,其中,客户端通过网络与服务器进行通信。其中,客户端可以但不限于各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备。服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一实施例中,如图2所示,提供一种批量数据编辑方法,以该方法应用在图1中的服务器为例进行说明,包括如下步骤:
S10,将预设的分割符号按照第一分割规则插入批量交易中的批量数据,并将包含所述分割符号的所述批量数据记录为待传入参数,所述批量数据是指由多个属性组成的集合,且每一个所述属性对应于一个或多个属性值,所述第一分割规则是指按照预设数据格式在所述批量数据中的不同所述属性之间插入分割符号。
在此步骤中,所述批量交易(比如银行系统的批量金融交易)可能涉及到大量的批量数据;所述批量数据是由多个属性组成的集合(比如交易过程出现的数量、价钱和总价等),而所述属性包括一个到多个属性值(比如不同季度的数量、价钱和总价的数值),且所述批量交易中的批量数据是指不同格式的文件(比如word、TXT、excel等)中的文件数据。具体地,服务器可以按照所述第一分割规则将一种或多种预设的分割符号(包括但不限于“空格”、“/”、“|”和”:”等其中的一种或多种)插入所述批量交易中的所述批量数据的属性之间;在插入时,根据所述第一分割规则选择应用哪种分割符号,同时,一个分割符号的插入位置为所述批量数据的两个不同属性之间,但两个相邻的分割符号之间间隔多少个属性,可以根据需求进行设定,比如,两个相邻的分割符号之间可能间隔有两个属性,且每一个属性均对应至少一个属性值;在将分割符号插入批量数据之后,服务器可以将所述批量数据分割成具有统一的预设数据格式(即批量数据中的不同属性被按照第一分割规则中的预设数据格式进行分割)的批量数据,并将所述具有统一的预设数据格式的批量数据(包含所述分割符号的所述批量数据)作为所述待传入参数。
S20,接收复制指令,确认所述待传入参数中的所述批量数据的各所述属性对应的所述属性值是否为非空数据,在所有所述属性值均为所述非空数据时,将所述待传入参数存储至复制缓存空间。
可以理解的是,所述复制指令是指服务器复制所述待传入参数的动作;所述非空数据是指所述待传入参数中的所述批量数据的各所述属性存在所述属性值(即一个数据有着一个ID,但是存在与该ID其他相关的信息,如数值等)。具体地,在监听到服务器当前存在复制所述待传入参数的动作时,服务器首先不是直接将所述待传入参数复制至复制缓存空间,而是需要先确认所述待传入参数中的所述批量数据的各所述属性对应的所述属性值是否为非空数据时(比如上述例子提到的数量、价钱和总价属性的每一项都分别对应着不同季度的非空数据,此时,所述批量数据的各所述属性对应的所述属性值均为非空数据),若均为非空数据,才将所述待传入参数复制存储至所述复制缓存空间。
具体地,当所述待传入参数中的所述批量数据的各所述属性对应的所述属性值均为所述非空数据时,则可以说明所述待传入参数中的所述批量数据的各所述属性全部存在所述属性值。此时,服务器可以提示所述待传入参数中的各所述属性对应的所述属性值。否则,则可以说明所述需传入的参数中的所述批量数据的一个或多个所述属性对应的所述属性值存在空数据。此时,该批量数据中对应的所述属性值由于存在空数据而可能会导致对该批量数据的计算不准确(因为一个属性值对应的是空数据,可能是遗漏了对该属性值的具体数值的录入,若为该种情况,此时利用该批空数据进行运算,其计算之后的数据必然有误),此时服务器可以提示相关技术人员查找所述需传入的参数中的所述批量数据的各所述属性对应的所述属性值存在空数据的原因并给出对应的解决措施。
S30,通过所述分割符号验证所述复制缓存空间中的所述待传入参数的数据格式是否与所述预设数据格式相符。
可以理解的是,在将所述分割符号是按照所述预设数据格式插入所述批量交易中的所述批量数据的各所述属性之间时,可能会出现所述批量数据的各所述属性被分割错误从而造成分割之后的所述待传入参数的数据格式与预设数据格式不符的情况。比如,正确的分割格式(即预设数据格式为“aaaa|bbbbb|ddddd;dddd|eeee|tttt|eeee;”),而错误的分割格式(批量数据被分割后的数据格式为“aaaab|bbbbd|ddddd|;ddd|eee|ett|tte|eee;”)。此时,服务器需要去验证所述复制缓存空间中的所述待传入参数的当前被分割之后的数据格式是否正确。当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式不符时,则可以说明所述复制缓存空间内容中的所述待传入参数的各所述属性被分割错误;当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式相符时,则可以说明所述复制缓存空间内容中的所述待传入参数的各所述属性被分割正确。
进一步地,如图3所示,所述通过所述分割符号验证所述复制缓存空间中的所述待传入参数的数据格式是否与所述预设数据格式相符,包括:
S301,获取预设数据格式中设定的所述分割符号的类型和排布顺序及相邻的两个分割符号之间间隔的所述属性的数量。
其中,所述预设数据格式中包含本次对该批量数据进行分割的分割符号的类型(同一个批量数据中可以使用一个或多个分割符号)、各所述分割符号的排布顺序(比如,如果有在所述批量数据中需要插入两个以上的分割符号时,若两个分割符号分别为1和2,此时各所述分割符号的排布顺序可以为112112或者121212等)和相邻的两个所述分割符号之间间隔的所述属性值的数量(相邻的两个所述分割符号之间间隔的所述属性值的数量可以根据需求设定,比如,该数量可以为1个或2个)。
S302,检测所述缓存空间内容中的待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型和排布顺序是否一致,同时检测所述待传入参数与所述预设数据格式中相邻的两个所述分割符号之间的间隔的所述属性的数量是否相同。
也即,当所述待传入参数的数据格式与所述预设数据格式中设定的所述分割符号的类型和排布顺序一致,且所述待传入参数与所述预设数据格式中相邻的两个分割符号之间的间隔的所述属性的数量相同时,则可以说明所述缓存空间内容中的所述待传入参数是按照所述预设数据格来进行分割;当所述待传入参数的数据格式与所述预设数据格式中设定的所述分割符号的类型和排布顺序不一致,或所述待传入参数与所述预设数据格式中相邻的两个分割符号之间的间隔的所述属性的数量不相同时,则可以说明所述缓存空间内容中的所述待传入参数未按照所述预设数据格来进行分割。
S303,在所述待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型和排布顺序一致,且所述待传入参数与所述预设数据格式中相邻的两个所述分割符号之间的间隔的所述属性的数量相同时,确认所述缓存空间内容中的所述待传入参数的所述数据格式与所述预设数据格式相符。
也即,当所述待传入参数的数据格式与所述预设数据格式中设定的所述分割符号的类型和排布顺序一致,且所述待传入参数与所述预设数据格式中相邻的两个分割符号之间的间隔的所述属性的数量相同时,则可以说明所述缓存空间内容中的所述待传入参数是按照所述预设数据格来进行分割。
S304,在所述待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型或排布顺序不一致,或所述待传入参数与所述预设数据格式中相邻的两个所述分割符号之间的间隔的所述属 性的数量不相同时,确认所述缓存空间内容中的所述待传入参数的所述数据格式与所述预设数据格式不相符。
也即,当所述待传入参数的数据格式与所述预设数据格式中设定的所述分割符号的类型或排布顺序不一致,或所述待传入参数与所述预设数据格式中相邻的两个分割符号之间的间隔的所述属性的数量不相同时,或上述的两种以上情况发生,都可以说明所述缓存空间内容中的所述待传入参数未按照所述预设数据格来进行分割。
需要说明的是,所述步骤S30之后,还可以去判断所述复制缓存空间内容中的所述待传入参数的各所述属性是否存在属性重复出现的问题,若所述复制缓存空间内容中的所述待传入参数的各所述属性存在属性重复出现的问题,则提示所述复制缓存空间内容中的所述待传入参数的各所述属性存在属性重复出现的问题(比如人工可能对所述批量数据中的属性重复录入)并结束所述批量交易(由于每一项批量交易的批量数据中的每个属性都是唯一的,当出现重复的属性会影响批量交易的结果,因此需要将其关闭),若所述缓存空间内容中的所述待传入参数的各所述属性未存在属性重复出现的问题,则进行下一步步骤判断所述复制缓存空间中已存在的第一缓存内容是否与所述待传入参数相同。
S40,当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式相符时,则判断所述复制缓存空间中已存在的第一缓存内容是否与所述待传入参数相同。
可以理解的是,当所述复制缓存空间的所述待传入参数的数据格式与所述预设数据格式相符时,则可以说明所述复制缓存空间中的所述待传入参数被分割正确。此时,服务器可以进行判断所述复制缓存空间中的已存在所述第一缓存内容是否与所述待传入参数部分或全部相同。在另一实施例上,当所述复制缓存空间的所述待传入参数的数据格式与所述预设数据格式不符时,则可以说明所述复制缓存空间中的所述待传入参数被分割错误,此时,服务器可以提示所述复制缓存空间的所述待传入参数的数据格式错误并结束所述批量交易(由于所述待传入参数的数据格式与所述预设数据格式不符时,各个不同的所述属性可能会被分割在一起,影响批量交易的结果)。
S50,若所述第一缓存内容与所述待传入参数并不相同,则提示是否需要用所述待传入参数覆盖所述第一缓存内容。
可以理解的是,当所述第一缓存内容与所述待传入参数并不相同时,则说明所述待传入参数并未与所述第一缓存内容发生重复。此时,提示是否需要用所述待传入参数覆盖所述第一缓存内容,是指提示是否将并不重复的所述待传入参数和所述第一缓存内容进行衔接。
S60,当需要用所述待传入参数覆盖所述第一缓存内容时,则将所述待传入参数覆盖所述第一缓存内容上,得到第二缓存内容。
可以理解的是,当需要覆盖提交与所述第一缓存内容不同的所述待传入参数时,则服务器都可以将所述待传入参数进行覆盖(由于所述第一缓存内容与所述待传入参数并不相同,且所述第一缓存内容代表此前传入所述复制缓存空间的待传入参数,此时,将所述待传入参数覆盖所述第一缓存内容上是指服务器可以将所述待传入参数衔接到所述第一缓存内容上)在所述第一缓存内容上从而更新得到所述第二的缓存内容(包含衔接之后的所述待传入参数和所述第一缓存内容)。
在另一实施中,当无需用所述待传入参数覆盖所述第一缓存内容(无需覆盖也即代表不允许将所述待传入参数以覆盖的方式将所述待传入参数存储至所述复制缓存空间中,但是,由于每一项批量交易在交易过程中均必须需要保存相关数据,因此在不允许存储所述待传入参数时,该批量交易将无法继续进行,需要将其关闭)时,则服务器提示无需覆盖提交所述待传入参数后,结束所述批量交易。
在另一实施中,如图4所示,所述步骤S40之后,还包括:
S70,若所述第一缓存内容与所述待传入参数部分或全部相同,则提示是否需要重复提交与所述第一缓存内容部分或全部相同的所述待传入参数。
可以理解的是,当所述复制缓存空间中的第一缓存内容中存在部分或全部的所述待传入参数时,则说明所述待传入参数与所述第一缓存内容部分或全部相同,此时,可以通过下述方法去判断所述第一缓存内容与所述待传入参数部分或全部相同:
判断所述待传入参数与所述第一缓存内容是否部分或全部匹配成功,在此步骤中,当判断结果为 所述待传入参数与所述第一缓存内容完全不匹配时,则说明所述第一缓存内容并不与所述待传入参数相同;当判断结果为所述待传入参数与所述第一缓存内容部分或全部匹配成功时,则说明所述待传入参数与所述第一缓存内容发生部分或全部相同。
S80,当需要重复提交与所述第一缓存内容相同的所述待传入参数时,则将所述待传入参数覆盖所述第一缓存内容上,得到所述第二缓存内容。
可以理解的是,当需要重复提交与所述第一缓存内容相同的所述待传入参数时,则服务器都可以将所述待传入参数覆盖(由于所述第一缓存内容存在与所述待传入参数部分或全部相同的内容,此时,服务器可以将所述待传入参数中与所述第一缓存内容部分或全部相同的内容重叠之后相衔接,也即,覆盖之后的所述第一缓存内容与所述待传入参数中相同的内容仅保留其中一份即可)在所述第一缓存内容上,从而更新得到所述第二的缓存内容(所述待传入参数与所述第一缓存内容存在相同的交集内容)。在另一实施中,当无需要重复提交与所述第一缓存内容相同的所述待传入参数时,则服务器提示无需重复提交所述待传入参数后结束所述批量交易,也即,由于每一项批量交易在交易过程中均必须需要提交相关数据(也即所述待传入参数),因此在不允许提交所述待传入参数时,该批量交易将无法继续进行,需要将其关闭。
进一步地,如图5所示,所述步骤S60或S80之后,还包括:
S90,判断第二缓存内容的数据大小是否大于复制缓存空间的大小。
可以理解的是,由于所述复制缓存空间的大小是有限制的,当判断结果为所述第二缓存内容的数据大小大于所述复制缓存空间的大小时,则说明所述第二缓存内容的数据大小大于限制的大小;当判断结果为所述第二缓存内容的数据大小小于或等于所述复制缓存空间的大小时,则说明所述第二缓存内容的数据大小小于或等于限制的大小。
S100,若所述第二缓存内容的数据大小大于所述复制缓存空间的大小,则使用第二分割规则对所述第二缓存内容进行分割,并将被分割成多个批次数据的所述第二缓存内容进行提交后,在页面展示所述第二缓存内容,所述第二分割规则是指将所述第二缓存内容划分为相等数据大小的多个批次数据。
可以理解的是,当所述第二缓存内容的数据大小大于所述复制缓存空间的大小时,说明所述第二缓存空间的数据大小大于限制的大小(即超过所述复制缓存空间的大小)。此时,可以将被分割成多个批次数据的所述第二缓存内容提交给正在处理所述批量交易的服务器,服务器将所述第二缓存内容在客户端上进行所述批量交易的页面上进行展示。
S110,若所述第二缓存内容的数据大小小于或等于所述复制缓存空间的大小,则在所述页面直接展示所述第二缓存内容。
可以理解的是,当所述第二缓存内容的数据大小小于或等于所述复制缓存空间的大小时,则说明所述第二缓存内容的数据大小小于或等于限制的大小(即不会超过所述复制缓存空间的大小)。此时,服务器可以客户端上的页面直接展示所述第二缓存内容,而无需将其分割为批次数据。
进一步地,如图6所示,为了判断被分割成多个批次数据的所述第二缓存内容是能否一次性提交完成,所述步骤S100中,所述将被分割成多个批次数据的所述第二缓存内容进行提交,包括:
S1001,获取所述第二缓存内容被分割之后的批次数据的数量。
可以理解的是,上述步骤S90中,由于所述复制缓存空间的大小是有限制的,因此服务器使用所述第二分割规则对所述第二缓存内容进行分割,得到被分割成多个批次数据的所述第二缓存内容,此时,服务器可以记录被分割成多个批次数据的所述第二缓存内容的批次数据的数量。
S1002,判断所述批次数据的数量是否大于预设的并发批次数阈值。
其中,所述预设的并发批次数阈值是指服务器允许同时提交的批次数据的数量。
可以理解的是,由于处理被分割成多个批次数据的所述第二缓存内容的接口也是有并发批次数据的数量限制,因此服务器判断所述批次数据的数量是否大于预设的并发批次数阈值,当判断结果为所述批次数据的数量大于所述预设的并发批次数阈值时,则说明所述批次数据的数量已超过限制的数量(可能会造成服务器崩溃的现象),即服务器不能同时提交被分割成多个批次数据的所述第二缓存内容;当判断结果为所述批次数据的数量小于或等于所述预设的并发批次数阈值时,则说明所述批次数据的数量 未超过限制的数量,即服务器可以同时提交被分割成多个批次数据的所述第二缓存内容。
S1003,若所述批次数据的数量大于所述预设的并发批次数阈值,则将数量与所述并发批次数阈值相等的所述批次数据进行提交,并继续判断剩余未提交的所述批次数据的数量是否大于所述并发批次数阈值,直至剩余未提交的所述批次数据的数量小于或等于所述并发批次数阈值。
可以理解的是,当所述批次数据的数大于所述预设的并发批次数阈值时,则说明所述批次数据的数已超过限制的数量(可能会造成服务器崩溃的现象),即服务器不能同时提交被分割成多个批次的所述第二缓存内容。
S1004,若所述批次数据的数量小于或等于所述预设的并发批次数阈值,则将所有所述批次数据进行提交。
当所述批次数据的数量小于或等于所述预设的并发批次数阈值时,则说明所述批次数据的数量未超过限制的数量,即服务器可以同时提交被分割成的所有批次数据。
进一步地,如图7所示,所述步骤S60或S80之后,还包括:
S120,校验所述第二缓存内容中的所述待传入参数中的各所述属性是否发生数据错误。
可以理解的是,所述数据错误包括了数据损失和数据异常增加,所述数据损失是指在计算机遭受病毒损害、人为因素的文件丢失或者存储设备的物理损坏以后,造成的对个人、集体有价值的信息数据的丢失;所述数据异常增加可能是由于无关数据的导入(无关属性值附属在属性上)或者所述属性对应的所述属性值发生重复的原因。由于发生上述数据错误,会造成所述第二缓存内容中的所述待传入参数中的各所述属性发生数据错误。此时,需要检验所述第二缓存内容中的所述待传入参数中的各所述属性是否发生了数据错误。
S130,当所述第二缓存内容中的所述待传入参数的各所述属性未发生所述数据错误时,则提交与所述第二缓存内容关联的所述批量交易后结束所述批量交易。
可以理解的是,当所述第二缓存内容中的所述待传入参数中的各所述属性未发生所述数据错误时,说明所述第二缓存内容中的所述待传入参数的各所述属性为数据正确。此时,可以提交与所述第二缓存内容关联的所述批量交易给服务器后结束所述批量交易。
S140,当所述第二缓存内容中的所述待传入参数的各所述属性未发生所述数据错误时,则提交与所述第二缓存内容关联的所述批量交易后结束所述批量交易。
可以理解的是,当所述第二缓存内容中的所述待传入参数的一个或多个所述属性发生所述数据错误时,说明所述第二缓存内容中的所述待传入参数的一个或多个所述属性为所述错误数据。
需要说明的是,为了保证所述批量交易无留下缓存痕迹,保障所述第二缓存内容中的数据安全,所述步骤S140之后,还可以提示所述相关技术人员是否需要清理所述第二缓存内容。
进一步地,所述步骤S120中,所述校验所述第二缓存内容中的所述待传入参数中的各所述属性是否发生了数据损失,包括:
获取所述分割符号插入所述批量数据之后的待传入参数的数据大小,同时获取覆盖所述第二缓存内容中的待传入参数的数据大小。
可以理解的是,所述分割符号插入所述批量数据之后,其的数据大小是固定的,且服务器也未开始处理已被所述分割符号插入的所述批量数据(如流程中未发生数据损失和数据异常增加问题),从而不会影响所述分割符号插入所述批量数据之后的所述待传入参数的数据大小;而覆盖所述第二缓存内容中的所述待传入参数的数据大小在流程中可能发生了步骤S120提到的数据损失情况和数据大小增加的问题(无关属性值附属在属性上或者属性对应的属性值发生重复)。
检测所述第二缓存内容中的所述待传入参数的数据大小是否等于所述待传入参数的数据大小。
可以理解的是,所述第二缓存内容的所述待传入参数的数据大小可能会由于上述步骤S120提到的情况从而造成所述数据错误。此时,服务器检测所述第二缓存内容中的所述待传入参数的数据大小是否等于所述待传入参数的数据大小从而确定所述第二缓存内容的所述待传入参数中的各所述属性是否发生了数据错误。
当所述第二缓存内容的数据大小小于所述待传入参数的数据大小时,则提示所述第二缓存内容的 所述待传入参数中的一个或多个所述属性发生数据损失。
可以理解的是,当所述第二缓存内容的数据大小小于所述待传入参数的数据大小时,则说明所述第二缓存内容的所述待传入参数中的一个或者多个所述属性发生了数据损失从而造成了所述数据错误。
当所述第二缓存内容的数据大小等于所述待传入参数的数据大小时,则提示所述第二缓存内容各所述属性并未发生所述数据错误。
可以理解的是,当所述第二缓存内容的数据大小等于所述待传入参数的数据大小时,则说明所述第二缓存内容的所述待传入参数中的一个或者多个所述属性未发生所述数据错误,也可以说明所述第二缓存内容的所述待传入参数中的各所述属性均为正确数据。
当所述第二缓存内容的数据大小大于所述待传入参数的数据大小时,则提示所述第二缓存内容的所述待传入参数中的一个或多个所述属性发生数据异常增加。
可以理解的是,当所述第二缓存内容的数据大小大于所述待传入参数的数据大小时,则说明所述第二缓存内容的所述待传入参数中的一个或者多个所述属性发生了数据异常增加从而造成了所述数据错误。
综上所述,上述提供了一种批量数据编辑方法,将预设的分割符号按照第一分割规则插入批量交易中的批量数据,并将包含所述分割符号的所述批量数据记录为待传入参数,所述批量数据是指由多个属性组成的集合,且每一个所述属性对应于一个或多个属性值,所述第一分割规则是指按照预设数据格式在所述批量数据中的不同所述属性之间插入分割符号;接收复制指令,确认所述待传入参数中的所述批量数据的各所述属性对应的所述属性值是否为非空数据,在所有所述属性值均为所述非空数据时,将所述待传入参数存储至复制缓存空间;通过所述分割符号验证所述复制缓存空间中的所述待传入参数的数据格式是否与所述预设数据格式相符;当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式相符时,则判断所述复制缓存空间中已存在的第一缓存内容是否与所述待传入参数相同;若所述第一缓存内容与所述待传入参数并不相同,则提示是否需要用所述待传入参数覆盖所述第一缓存内容;当需要用所述待传入参数覆盖所述第一缓存内容时,则将所述待传入参数覆盖所述第一缓存内容上,得到第二缓存内容。本申请通过预设的分割符号去编辑批量交易中的批量数据后形成待传入参数,从而可以对批量数据的数据格式进行兼容,不局限于导入的文件类型;且在批量数据导入后,通过第一分割规则对批量数据进行分割生成待传入参数,并在复制缓存空间中对属于非空数据的待传入参数进行数据内容判定之后将其覆盖至该复制缓存空间中的第一缓存内容中,如此,对批量数据的编辑规则相对比较灵活和简单。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
在一实施例中,提供一种批量数据编辑装置,该批量数据编辑装置与上述实施例中批量数据编辑方法一一对应。如图8所示,该批量数据编辑装置包括插入模块11、确认模块12、验证模块13、第一判断模块14、第一提示模块15和第一覆盖模块16。各功能模块详细说明如下:
插入模块11,用于将预设的分割符号按照第一分割规则插入批量交易中的批量数据,并将包含所述分割符号的所述批量数据记录为待传入参数,所述批量数据是指由多个属性组成的集合,且每一个所述属性对应于一个或多个属性值,所述第一分割规则是指按照预设数据格式在所述批量数据中的不同所述属性之间插入分割符号;
确认模块12,用于接收复制指令,确认所述待传入参数中的所述批量数据的各所述属性对应的所述属性值是否为非空数据,在所有所述属性值均为所述非空数据时,将所述待传入参数存储至复制缓存空间;
验证模块13,用于通过所述分割符号验证所述复制缓存空间中的所述待传入参数的数据格式是否与所述预设数据格式相符;
第一判断模块14,用于当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式相符时,则判断所述复制缓存空间中已存在的第一缓存内容是否与所述待传入参数相同;
第一提示模块15,用于若所述第一缓存内容与所述待传入参数并不相同,则提示是否需要用所述待传入参数覆盖所述第一缓存内容;
第一覆盖模块16,用于当需要用所述待传入参数覆盖所述第一缓存内容时,则将所述待传入参数覆盖所述第一缓存内容上,得到第二缓存内容。
进一步地,所述验证模块包括:
第一获取子模块,用于获取预设数据格式中设定的所述分割符号的类型和排布顺序及相邻的两个分割符号之间间隔的所述属性的数量;
第一检测子模块,用于检测所述缓存空间内容中的待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型和排布顺序是否一致,同时检测所述待传入参数与所述预设数据格式中相邻的两个所述分割符号之间的间隔的所述属性的数量是否相同;
第一确认子模块,用于在所述待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型和排布顺序一致,且所述待传入参数与所述预设数据格式中相邻的两个所述分割符号之间的间隔的所述属性的数量相同时,确认所述缓存空间内容中的所述待传入参数的所述数据格式与所述预设数据格式相符;
第二确认子模块,用于在所述待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型或排布顺序不一致,或所述待传入参数与所述预设数据格式中相邻的两个分割符号之间的间隔的所述属性的数量不相同时,确认所述缓存空间内容中的所述待传入参数的所述数据格式与所述预设数据格式不相符。
进一步地,所述批量数据编辑装置还包括:
第二提示模块,用于若所述第一缓存内容与所述待传入参数部分或全部相同,则提示是否需要重复提交与所述第一缓存内容部分或全部相同的所述待传入参数;
第二覆盖模块,用于当需要重复提交与所述第一缓存内容相同的所述待传入参数时,则将所述待传入参数覆盖所述第一缓存内容上,得到所述第二缓存内容。
进一步地,所述批量数据编辑装置还包括:
第二判断模块,用于判断第二缓存内容的数据大小是否大于复制缓存空间的大小;
分割模块,用于若所述第二缓存内容的数据大小大于所述复制缓存空间的大小,则使用第二分割规则对所述第二缓存内容进行分割,并将被分割成多个批次数据的所述第二缓存内容进行提交后,在页面展示所述第二缓存内容,所述第二分割规则是指将所述第二缓存内容划分为相等数据大小的多个批次数据;
展示模块,用于若所述第二缓存内容的数据大小小于或等于所述复制缓存空间的大小,则在所述页面直接展示所述第二缓存内容。
进一步地,所述分割模块包括:
第二获取子模块,用于获取所述第二缓存内容被分割之后的批次数据的数量;
判断子模块,用于判断所述批次数据的数量是否大于预设的并发批次数阈值;
第一提交子模块,用于若所述批次数据的数量大于所述预设的并发批次数阈值,则将数量与所述并发批次数阈值相等的所述批次数据进行提交,并继续判断剩余未提交的所述批次数据的数量是否大于所述并发批次数阈值,直至剩余未提交的所述批次数据的数量小于或等于所述并发批次数阈值;
第二提交子模块,用于若所述批次数据的数量小于或等于所述预设的并发批次数阈值,则将所有所述批次数据进行提交。
进一步地,所述批量数据编辑装置还包括:
校验模块,用于校验所述第二缓存内容中的所述待传入参数中的各所述属性是否发生数据错误;
第一提交模块,用于当所述第二缓存内容中的所述待传入参数的各所述属性未发生所述数据错误时,则提交与所述第二缓存内容关联的所述批量交易后结束所述批量交易;
第二提交模块,用于当所述第二缓存内容中的所述待传入参数的各所述属性未发生所述数据错误时,则提交与所述第二缓存内容关联的所述批量交易后结束所述批量交易。
进一步地,所述校验模块包括:
第三获取子模块,用于获取所述分割符号插入所述批量数据之后的待传入参数的数据大小,同时获取覆盖第二缓存内容中的所述待传入参数的数据大小;
第二检测子模块,用于检测所述第二缓存内容中的所述待传入参数的数据大小是否等于所述待传入参数的数据大小;
第一提示子模块,用于当所述第二缓存内容的数据大小小于所述待传入参数的数据大小时,则提示所述第二缓存内容的所述待传入参数中的一个或多个所述属性发生数据损失;
第二提示子模块,用于当所述第二缓存内容的数据大小等于所述待传入参数的数据大小时,则提示所述第二缓存内容各所述属性并未发生所述数据错误;
第三提示子模块,用于当所述第二缓存内容的数据大小大于所述待传入参数的数据大小时,则提示所述第二缓存内容的所述待传入参数中的一个或多个所述属性发生数据异常增加。
关于批量数据编辑装置的具体限定可以参见上文中对于批量数据编辑方法的限定,在此不再赘述。上述批量数据编辑装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图9所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储批量数据编辑方法中涉及到的数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种批量数据编辑方法。
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现如下步骤:
将预设的分割符号按照第一分割规则插入批量交易中的批量数据,并将包含所述分割符号的所述批量数据记录为待传入参数,所述批量数据是指由多个属性组成的集合,且每一个所述属性对应于一个或多个属性值,所述第一分割规则是指按照预设数据格式在所述批量数据中的不同所述属性之间插入分割符号;
接收复制指令,确认所述待传入参数中的所述批量数据的各所述属性对应的所述属性值是否为非空数据,在所有所述属性值均为所述非空数据时,将所述待传入参数存储至复制缓存空间;
通过所述分割符号验证所述复制缓存空间中的所述待传入参数的数据格式是否与所述预设数据格式相符;
当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式相符时,则判断所述复制缓存空间中已存在的第一缓存内容是否与所述待传入参数相同;
若所述第一缓存内容与所述待传入参数并不相同,则提示是否需要用所述待传入参数覆盖所述第一缓存内容;
当需要用所述待传入参数覆盖所述第一缓存内容时,则将所述待传入参数覆盖所述第一缓存内容上,得到第二缓存内容。
在一个实施例中,提供了一个或多个存储有计算机可读指令的非易失性可读存储介质,该非易失性可读存储介质上存储有计算机可读指令,该计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现以下步骤:
将预设的分割符号按照第一分割规则插入批量交易中的批量数据,并将包含所述分割符号的所述批量数据记录为待传入参数,所述批量数据是指由多个属性组成的集合,且每一个所述属性对应于一个或多个属性值,所述第一分割规则是指按照预设数据格式在所述批量数据中的不同所述属性之间插入分 割符号;
接收复制指令,确认所述待传入参数中的所述批量数据的各所述属性对应的所述属性值是否为非空数据,在所有所述属性值均为所述非空数据时,将所述待传入参数存储至复制缓存空间;
通过所述分割符号验证所述复制缓存空间中的所述待传入参数的数据格式是否与所述预设数据格式相符;
当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式相符时,则判断所述复制缓存空间中已存在的第一缓存内容是否与所述待传入参数相同;
若所述第一缓存内容与所述待传入参数并不相同,则提示是否需要用所述待传入参数覆盖所述第一缓存内容;
当需要用所述待传入参数覆盖所述第一缓存内容时,则将所述待传入参数覆盖所述第一缓存内容上,得到第二缓存内容。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种批量数据编辑方法,其特征在于,包括:
    将预设的分割符号按照第一分割规则插入批量交易中的批量数据,并将包含所述分割符号的所述批量数据记录为待传入参数,所述批量数据是指由多个属性组成的集合,且每一个所述属性对应于一个或多个属性值,所述第一分割规则是指按照预设数据格式在所述批量数据中的不同所述属性之间插入分割符号;
    接收复制指令,确认所述待传入参数中的所述批量数据的各所述属性对应的所述属性值是否为非空数据,在所有所述属性值均为所述非空数据时,将所述待传入参数存储至复制缓存空间;
    通过所述分割符号验证所述复制缓存空间中的所述待传入参数的数据格式是否与所述预设数据格式相符;
    当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式相符时,则判断所述复制缓存空间中已存在的第一缓存内容是否与所述待传入参数相同;
    若所述第一缓存内容与所述待传入参数并不相同,则提示是否需要用所述待传入参数覆盖所述第一缓存内容;
    当需要用所述待传入参数覆盖所述第一缓存内容时,则将所述待传入参数覆盖所述第一缓存内容上,得到第二缓存内容。
  2. 根据权利要求1所述的批量数据编辑方法,其特征在于,所述通过所述分割符号验证所述复制缓存空间中的所述待传入参数的数据格式是否与所述预设数据格式相符,包括:
    获取预设数据格式中设定的所述分割符号的类型和排布顺序及相邻的两个分割符号之间间隔的所述属性的数量;
    检测所述缓存空间内容中的待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型和排布顺序是否一致,同时检测所述待传入参数与所述预设数据格式中相邻的两个所述分割符号之间的间隔的所述属性的数量是否相同;
    在所述待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型和排布顺序一致,且所述待传入参数与所述预设数据格式中相邻的两个所述分割符号之间的间隔的所述属性的数量相同时,确认所述缓存空间内容中的所述待传入参数的所述数据格式与所述预设数据格式相符;
    在所述待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型或排布顺序不一致,或所述待传入参数与所述预设数据格式中相邻的两个所述分割符号之间的间隔的所述属性的数量不相同时,确认所述缓存空间内容中的所述待传入参数的所述数据格式与所述预设数据格式不相符。
  3. 根据权利要求1所述的批量数据编辑方法,其特征在于,所述当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式相符时,则判断所述复制缓存空间中已存在的第一缓存内容是否与所述待传入参数相同之后,还包括:
    若所述第一缓存内容与所述待传入参数部分或全部相同,则提示是否需要重复提交与所述第一缓存内容部分或全部相同的所述待传入参数;
    当需要重复提交与所述第一缓存内容相同的所述待传入参数时,则将所述待传入参数覆盖所述第一缓存内容上,得到所述第二缓存内容。
  4. 根据权利要求3所述的批量数据编辑方法,其特征在于,所述得到所述第二缓存内容之后,还包括:
    判断第二缓存内容的数据大小是否大于复制缓存空间的大小;
    若所述第二缓存内容的数据大小大于所述复制缓存空间的大小,则使用第二分割规则对所述第二缓存内容进行分割,并将被分割成多个批次数据的所述第二缓存内容进行提交后,在页面展示所述第二缓存内容,所述第二分割规则是指将所述第二缓存内容划分为相等数据大小的多个批次数据;
    若所述第二缓存内容的数据大小小于或等于所述复制缓存空间的大小,则在所述页面直接展示所 述第二缓存内容。
  5. 根据权利要求4所述的批量数据编辑方法,其特征在于,所述将被分割成多个批次数据的所述第二缓存内容进行提交,包括:
    获取所述第二缓存内容被分割之后的批次数据的数量;
    判断所述批次数据的数量是否大于预设的并发批次数阈值;
    若所述批次数据的数量大于所述预设的并发批次数阈值,则将数量与所述并发批次数阈值相等的所述批次数据进行提交,并继续判断剩余未提交的所述批次数据的数量是否大于所述并发批次数阈值,直至剩余未提交的所述批次数据的数量小于或等于所述并发批次数阈值;
    若所述批次数据的数量小于或等于所述预设的并发批次数阈值,则将所有所述批次数据进行提交。
  6. 根据权利要求3所述的批量数据编辑方法,其特征在于,所述得到所述第二缓存内容之后,还包括:
    校验所述第二缓存内容中的所述待传入参数中的各所述属性是否发生数据错误;
    当所述第二缓存内容中的所述待传入参数的各所述属性未发生所述数据错误时,则提交与所述第二缓存内容关联的所述批量交易后结束所述批量交易;
    当所述第二缓存内容中的所述待传入参数的一个或者多个所述属性发生所述数据错误时,获取与发生所述数据错误的所述属性对应的所述批量交易中的所述批量数据中的所述属性,并将与发生所述数据错误的所述属性对应的所述批量交易中的所述批量数据中的所述属性替换所述第二缓存内容中发生所述数据错误的所述属性,并提交与所述第二缓存内容关联的所述批量交易后结束所述批量交易。
  7. 根据权利要求6所述的批量数据编辑方法,其特征在于,所述校验所述第二缓存内容中的所述待传入参数中的各所述属性是否发生了数据错误,包括:
    获取所述分割符号插入所述批量数据之后的待传入参数的数据大小,同时获取覆盖第二缓存内容中的所述待传入参数的数据大小;
    检测所述第二缓存内容中的所述待传入参数的数据大小是否等于所述待传入参数的数据大小;
    当所述第二缓存内容的数据大小小于所述待传入参数的数据大小时,则提示所述第二缓存内容的所述待传入参数中的一个或多个所述属性发生数据损失;
    当所述第二缓存内容的数据大小等于所述待传入参数的数据大小时,则提示所述第二缓存内容各所述属性并未发生所述数据错误;
    当所述第二缓存内容的数据大小大于所述待传入参数的数据大小时,则提示所述第二缓存内容的所述待传入参数中的一个或多个所述属性发生数据异常增加。
  8. 一种批量数据编辑装置,其特征在于,包括:
    插入模块,用于将预设的分割符号按照第一分割规则插入批量交易中的批量数据,并将包含所述分割符号的所述批量数据记录为待传入参数,所述批量数据是指由多个属性组成的集合,且每一个所述属性对应于一个或多个属性值,所述第一分割规则是指按照预设数据格式在所述批量数据中的不同所述属性之间插入分割符号;
    确认模块,用于接收复制指令,确认所述待传入参数中的所述批量数据的各所述属性对应的所述属性值是否为非空数据,在所有所述属性值均为所述非空数据时,将所述待传入参数存储至复制缓存空间;
    验证模块,用于通过所述分割符号验证所述复制缓存空间中的所述待传入参数的数据格式是否与所述预设数据格式相符;
    第一判断模块,用于当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式相符时,则判断所述复制缓存空间中已存在的第一缓存内容是否与所述待传入参数相同;
    第一提示模块,用于若所述第一缓存内容与所述待传入参数并不相同,则提示是否需要用所述待传入参数覆盖所述第一缓存内容;
    第一覆盖模块,用于当需要用所述待传入参数覆盖所述第一缓存内容时,则将所述待传入参数覆 盖所述第一缓存内容上,得到第二缓存内容。
  9. 如权利要求8所述的批量数据编辑装置,其特征在于,所述验证模块包括:
    第一获取子模块,用于获取预设数据格式中设定的所述分割符号的类型和排布顺序及相邻的两个分割符号之间间隔的所述属性的数量;
    第一检测子模块,用于检测所述缓存空间内容中的待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型和排布顺序是否一致,同时检测所述待传入参数与所述预设数据格式中相邻的两个所述分割符号之间的间隔的所述属性的数量是否相同;
    第一确认子模块,用于在所述待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型和排布顺序一致,且所述待传入参数与所述预设数据格式中相邻的两个所述分割符号之间的间隔的所述属性的数量相同时,确认所述缓存空间内容中的所述待传入参数的所述数据格式与所述预设数据格式相符;
    第二确认子模块,用于在所述待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型或排布顺序不一致,或所述待传入参数与所述预设数据格式中相邻的两个分割符号之间的间隔的所述属性的数量不相同时,确认所述缓存空间内容中的所述待传入参数的所述数据格式与所述预设数据格式不相符。
  10. 如权利要求8所述的批量数据编辑装置,其特征在于,所述批量数据编辑装置还包括:
    第二提示模块,用于若所述第一缓存内容与所述待传入参数部分或全部相同,则提示是否需要重复提交与所述第一缓存内容部分或全部相同的所述待传入参数;
    第二覆盖模块,用于当需要重复提交与所述第一缓存内容相同的所述待传入参数时,则将所述待传入参数覆盖所述第一缓存内容上,得到所述第二缓存内容。
  11. 如权利要求10所述的批量数据编辑装置,其特征在于,所述批量数据编辑装置还包括:
    第二判断模块,用于判断第二缓存内容的数据大小是否大于复制缓存空间的大小;
    分割模块,用于若所述第二缓存内容的数据大小大于所述复制缓存空间的大小,则使用第二分割规则对所述第二缓存内容进行分割,并将被分割成多个批次数据的所述第二缓存内容进行提交后,在页面展示所述第二缓存内容,所述第二分割规则是指将所述第二缓存内容划分为相等数据大小的多个批次数据;
    展示模块,用于若所述第二缓存内容的数据大小小于或等于所述复制缓存空间的大小,则在所述页面直接展示所述第二缓存内容。
  12. 如权利要求11所述的批量数据编辑装置,其特征在于,所述分割模块包括:
    第二获取子模块,用于获取所述第二缓存内容被分割之后的批次数据的数量;
    判断子模块,用于判断所述批次数据的数量是否大于预设的并发批次数阈值;
    第一提交子模块,用于若所述批次数据的数量大于所述预设的并发批次数阈值,则将数量与所述并发批次数阈值相等的所述批次数据进行提交,并继续判断剩余未提交的所述批次数据的数量是否大于所述并发批次数阈值,直至剩余未提交的所述批次数据的数量小于或等于所述并发批次数阈值;
    第二提交子模块,用于若所述批次数据的数量小于或等于所述预设的并发批次数阈值,则将所有所述批次数据进行提交。
  13. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    将预设的分割符号按照第一分割规则插入批量交易中的批量数据,并将包含所述分割符号的所述批量数据记录为待传入参数,所述批量数据是指由多个属性组成的集合,且每一个所述属性对应于一个或多个属性值,所述第一分割规则是指按照预设数据格式在所述批量数据中的不同所述属性之间插入分割符号;
    接收复制指令,确认所述待传入参数中的所述批量数据的各所述属性对应的所述属性值是否为非空数据,在所有所述属性值均为所述非空数据时,将所述待传入参数存储至复制缓存空间;
    通过所述分割符号验证所述复制缓存空间中的所述待传入参数的数据格式是否与所述预设数据 格式相符;
    当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式相符时,则判断所述复制缓存空间中已存在的第一缓存内容是否与所述待传入参数相同;
    若所述第一缓存内容与所述待传入参数并不相同,则提示是否需要用所述待传入参数覆盖所述第一缓存内容;
    当需要用所述待传入参数覆盖所述第一缓存内容时,则将所述待传入参数覆盖所述第一缓存内容上,得到第二缓存内容。
  14. 如权利要求13所述的计算机设备,其特征在于,所述通过所述分割符号验证所述复制缓存空间中的所述待传入参数的数据格式是否与所述预设数据格式相符,包括:
    获取预设数据格式中设定的所述分割符号的类型和排布顺序及相邻的两个分割符号之间间隔的所述属性的数量;
    检测所述缓存空间内容中的待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型和排布顺序是否一致,同时检测所述待传入参数与所述预设数据格式中相邻的两个所述分割符号之间的间隔的所述属性的数量是否相同;
    在所述待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型和排布顺序一致,且所述待传入参数与所述预设数据格式中相邻的两个所述分割符号之间的间隔的所述属性的数量相同时,确认所述缓存空间内容中的所述待传入参数的所述数据格式与所述预设数据格式相符;
    在所述待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型或排布顺序不一致,或所述待传入参数与所述预设数据格式中相邻的两个所述分割符号之间的间隔的所述属性的数量不相同时,确认所述缓存空间内容中的所述待传入参数的所述数据格式与所述预设数据格式不相符。
  15. 如权利要求13所述的计算机设备,其特征在于,所述当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式相符时,则判断所述复制缓存空间中已存在的第一缓存内容是否与所述待传入参数相同之后,所述处理器执行所述计算机可读指令时还实现如下步骤:
    若所述第一缓存内容与所述待传入参数部分或全部相同,则提示是否需要重复提交与所述第一缓存内容部分或全部相同的所述待传入参数;
    当需要重复提交与所述第一缓存内容相同的所述待传入参数时,则将所述待传入参数覆盖所述第一缓存内容上,得到所述第二缓存内容。
    若所述第一缓存内容与所述待传入参数部分或全部相同,则提示是否需要重复提交与所述第一缓存内容部分或全部相同的所述待传入参数;
    当需要重复提交与所述第一缓存内容相同的所述待传入参数时,则将所述待传入参数覆盖所述第一缓存内容上,得到所述第二缓存内容。
  16. 如权利要求15所述的计算机设备,其特征在于,所述得到所述第二缓存内容之后,所述处理器执行所述计算机可读指令时还实现如下步骤:
    判断第二缓存内容的数据大小是否大于复制缓存空间的大小;
    若所述第二缓存内容的数据大小大于所述复制缓存空间的大小,则使用第二分割规则对所述第二缓存内容进行分割,并将被分割成多个批次数据的所述第二缓存内容进行提交后,在页面展示所述第二缓存内容,所述第二分割规则是指将所述第二缓存内容划分为相等数据大小的多个批次数据;
    若所述第二缓存内容的数据大小小于或等于所述复制缓存空间的大小,则在所述页面直接展示所述第二缓存内容。
  17. 一个或多个存储有计算机可读指令的非易失性可读存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
    将预设的分割符号按照第一分割规则插入批量交易中的批量数据,并将包含所述分割符号的所述批量数据记录为待传入参数,所述批量数据是指由多个属性组成的集合,且每一个所述属性对应于一个或多个属性值,所述第一分割规则是指按照预设数据格式在所述批量数据中的不同所述属性之间插入分 割符号;
    接收复制指令,确认所述待传入参数中的所述批量数据的各所述属性对应的所述属性值是否为非空数据,在所有所述属性值均为所述非空数据时,将所述待传入参数存储至复制缓存空间;
    通过所述分割符号验证所述复制缓存空间中的所述待传入参数的数据格式是否与所述预设数据格式相符;
    当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式相符时,则判断所述复制缓存空间中已存在的第一缓存内容是否与所述待传入参数相同;
    若所述第一缓存内容与所述待传入参数并不相同,则提示是否需要用所述待传入参数覆盖所述第一缓存内容;
    当需要用所述待传入参数覆盖所述第一缓存内容时,则将所述待传入参数覆盖所述第一缓存内容上,得到第二缓存内容。
  18. 如权利要求17所述的非易失性可读存储介质,其特征在于,所述通过所述分割符号验证所述复制缓存空间中的所述待传入参数的数据格式是否与所述预设数据格式相符,包括:
    获取预设数据格式中设定的所述分割符号的类型和排布顺序及相邻的两个分割符号之间间隔的所述属性的数量;
    检测所述缓存空间内容中的待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型和排布顺序是否一致,同时检测所述待传入参数与所述预设数据格式中相邻的两个所述分割符号之间的间隔的所述属性的数量是否相同;
    在所述待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型和排布顺序一致,且所述待传入参数与所述预设数据格式中相邻的两个所述分割符号之间的间隔的所述属性的数量相同时,确认所述缓存空间内容中的所述待传入参数的所述数据格式与所述预设数据格式相符;
    在所述待传入参数的所述数据格式与所述预设数据格式中设定的所述分割符号的类型或排布顺序不一致,或所述待传入参数与所述预设数据格式中相邻的两个所述分割符号之间的间隔的所述属性的数量不相同时,确认所述缓存空间内容中的所述待传入参数的所述数据格式与所述预设数据格式不相符。
  19. 如权利要求17所述的非易失性可读存储介质,其特征在于,所述当所述复制缓存空间中的所述待传入参数的所述数据格式与所述预设数据格式相符时,则判断所述复制缓存空间中已存在的第一缓存内容是否与所述待传入参数相同之后,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    若所述第一缓存内容与所述待传入参数部分或全部相同,则提示是否需要重复提交与所述第一缓存内容部分或全部相同的所述待传入参数;
    当需要重复提交与所述第一缓存内容相同的所述待传入参数时,则将所述待传入参数覆盖所述第一缓存内容上,得到所述第二缓存内容。
    若所述第一缓存内容与所述待传入参数部分或全部相同,则提示是否需要重复提交与所述第一缓存内容部分或全部相同的所述待传入参数;
    当需要重复提交与所述第一缓存内容相同的所述待传入参数时,则将所述待传入参数覆盖所述第一缓存内容上,得到所述第二缓存内容。
  20. 如权利要求19所述的非易失性可读存储介质,其特征在于,所述得到所述第二缓存内容之后,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    判断第二缓存内容的数据大小是否大于复制缓存空间的大小;
    若所述第二缓存内容的数据大小大于所述复制缓存空间的大小,则使用第二分割规则对所述第二缓存内容进行分割,并将被分割成多个批次数据的所述第二缓存内容进行提交后,在页面展示所述第二缓存内容,所述第二分割规则是指将所述第二缓存内容划分为相等数据大小的多个批次数据;
    若所述第二缓存内容的数据大小小于或等于所述复制缓存空间的大小,则在所述页面直接展示所述第二缓存内容。
PCT/CN2019/101926 2019-04-19 2019-08-22 批量数据编辑方法、装置、计算机设备及存储介质 WO2020211233A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910320207.XA CN110147354B (zh) 2019-04-19 2019-04-19 批量数据编辑方法、装置、计算机设备及存储介质
CN201910320207.X 2019-04-19

Publications (1)

Publication Number Publication Date
WO2020211233A1 true WO2020211233A1 (zh) 2020-10-22

Family

ID=67589754

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/101926 WO2020211233A1 (zh) 2019-04-19 2019-08-22 批量数据编辑方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN110147354B (zh)
WO (1) WO2020211233A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110147354B (zh) * 2019-04-19 2023-06-02 平安科技(深圳)有限公司 批量数据编辑方法、装置、计算机设备及存储介质
CN112422682A (zh) * 2020-11-18 2021-02-26 青岛海尔科技有限公司 数据发送方法及装置、存储介质、电子装置
CN115102936B (zh) * 2022-06-22 2023-11-21 苏州达家迎信息技术有限公司 批量信息上传方法、装置、存储介质及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080034348A1 (en) * 2006-04-18 2008-02-07 Computer Associates Think, Inc. Method and System for Bulk-Loading Data Into A Data Storage Model
CN101515291A (zh) * 2009-03-26 2009-08-26 北京泰合佳通信息技术有限公司 一种将数据批量导入数据库的方法及系统
CN106407442A (zh) * 2016-09-28 2017-02-15 中国银行股份有限公司 一种海量文本数据处理方法及装置
CN108920478A (zh) * 2018-04-16 2018-11-30 宁波三星医疗电气股份有限公司 基于小系统的批量数据分段采集方法
CN110147354A (zh) * 2019-04-19 2019-08-20 平安科技(深圳)有限公司 批量数据编辑方法、装置、计算机设备及存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
IE910580A1 (en) * 1991-02-20 1992-08-26 Shobunsha Publications Inc Improved map production method
CN103177064B (zh) * 2012-12-05 2016-10-05 师建中 一种自动取录电子文档中指定内容的方法
JP6357243B2 (ja) * 2013-11-11 2018-07-11 アマゾン・テクノロジーズ・インコーポレーテッド データストリーム取り込み及び永続性ポリシ
CN103853844A (zh) * 2014-03-24 2014-06-11 南开大学 基于Hadoop的关系表非冗余键集合识别方法
CN104331446B (zh) * 2014-10-28 2017-07-18 北京临近空间飞行器系统工程研究所 一种基于内存映射的海量数据预处理方法
CN108959598B (zh) * 2017-07-15 2022-08-12 沈阳建筑大学 基于gis的cad数据导入到swmm的方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080034348A1 (en) * 2006-04-18 2008-02-07 Computer Associates Think, Inc. Method and System for Bulk-Loading Data Into A Data Storage Model
CN101515291A (zh) * 2009-03-26 2009-08-26 北京泰合佳通信息技术有限公司 一种将数据批量导入数据库的方法及系统
CN106407442A (zh) * 2016-09-28 2017-02-15 中国银行股份有限公司 一种海量文本数据处理方法及装置
CN108920478A (zh) * 2018-04-16 2018-11-30 宁波三星医疗电气股份有限公司 基于小系统的批量数据分段采集方法
CN110147354A (zh) * 2019-04-19 2019-08-20 平安科技(深圳)有限公司 批量数据编辑方法、装置、计算机设备及存储介质

Also Published As

Publication number Publication date
CN110147354A (zh) 2019-08-20
CN110147354B (zh) 2023-06-02

Similar Documents

Publication Publication Date Title
CN110209650B (zh) 数据规整迁移方法、装置、计算机设备和存储介质
CN100517313C (zh) 用于验证迁移文件的元数据的方法和系统
WO2020211233A1 (zh) 批量数据编辑方法、装置、计算机设备及存储介质
WO2020087713A1 (zh) 视频质检方法、装置、计算机设备及存储介质
WO2019052234A1 (zh) 产品算法自动化测试方法及应用服务器
CN110659256A (zh) 多机房同步方法、计算设备及计算机存储介质
CN112035472A (zh) 数据处理方法、装置、计算机设备和存储介质
WO2012101531A1 (en) Data integrity protection in storage volumes
CN111444208B (zh) 一种数据更新方法及相关设备
CN111367982B (zh) 导入tririga基础数据的方法、装置、计算机设备及存储介质
CN111522881A (zh) 业务数据处理方法、装置、服务器及存储介质
KR101563494B1 (ko) 파일 변경에 따른 실시간 소스코드 보안 약점 탐지 장치 및 방법
WO2023206926A1 (zh) 一种恢复用户配置数据的方法、装置及介质
CN107092671B (zh) 一种元信息管理的方法及设备
CN112363929B (zh) 系统上线方法、装置、计算机设备及存储介质
US10146644B2 (en) Integrity of transactional memory of card computing devices in case of card tear events
WO2019062087A1 (zh) 考勤数据测试方法、终端、设备以及计算机可读存储介质
CN114637672A (zh) 自动化数据测试方法、装置、计算机设备及存储介质
WO2021027328A1 (zh) 漏洞处理跟踪方法、装置、计算机系统及可读存储介质
CN112579571A (zh) 监控数据配置、数据监控方法、装置、设备及存储介质
CN114443039A (zh) 输入参数校验方法、装置、电子设备及存储介质
WO2019144555A1 (zh) 容灾数据的在线同步装置、方法及计算机可读存储介质
US11748354B2 (en) Data shape confidence
CN113792326B (zh) 一种文件内容限制复制的方法及装置
CN117331956A (zh) 任务处理方法、装置、计算机设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19925007

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19925007

Country of ref document: EP

Kind code of ref document: A1