Data processing method and device, storage medium and electronic terminal
Patent Information
- Application Number
- CN202011629724.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-31
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-12-31
AI Technical Summary
但这样的方式均存在一定的缺陷,例如,使用消息队列时,无法进行批量处理,数据量多,更新频繁时只能一条一条处理
[0038] In the data processing method provided by an embodiment of the present disclosure, after receiving the data to be processed uploaded by the data production end, the first type of data is saved to the database according to the data type identifier, and the second type of data is saved to the task table. ; Then extract the task table from the database and perform data analysis to save the data primary key to the redis database queue according to the data analysis result, and save the corresponding data to the redis database key-value pair; after receiving the service start instruction , can obtain the target data primary key from the redis database queue, pull corresponding data in batches based on the target data primary key, and execute the pulled data. By utilizing the redis database to save the primary keys of key data, a variety of business requirements can be met. In addition, by obtaining the target data primary key from the redis database queue according to the service startup instructions, different terminals can obtain data according to their own processing capabilities, which can effectively alleviate the data processing pressure on the client and enable tens of thousands of files to be loaded into the memory in seconds. In addition, this solution has low development costs and low system access costs, and does not require excessive modifications to the original business.
Smart Images

Figure CN112699156B
Abstract
Description
Background Art
[0002] With the rapid development of Internet technology, more and more high-traffic and high-concurrency application scenarios have emerged. For example, during merchant promotions and shopping festivals, there are a large number of merchants and users, and the amount of data is huge. The amount of data generated during the transaction process may be several times that of normal times. When facing high-traffic and high-concurrency application scenarios, it is generally adopted to configure more computer rooms and multi-cluster application deployment to load the required data into the system memory as much as possible, and directly perform memory calculations when the traffic peak comes.
[0003] The prior art generally uses message queues, RPC pull or Zookeeper (distributed service) methods for data pulling. However, these methods all have certain defects. For example, when using message queues, batch processing is not possible, and when the amount of data is large and the updates are frequent, it can only be processed one by one. The processing speed is slow, which can easily cause data backlogs. Zookeeper is not very suitable for large files and objects. When data changes frequently and there are multiple clients, the data pressure will increase dramatically. The RPC pull method can easily pull redundant data, making it difficult to distinguish differences.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide a data processing method, a data processing device, a storage medium and an electronic terminal, thereby overcoming one or more problems caused by limitations and defects of related technologies at least to a certain extent.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0007] According to a first aspect of the present disclosure, there is provided a data processing method, comprising: receiving data to be processed uploaded by a data production end; wherein the data to be processed includes a data type identifier;
[0008] Based on the data type identifier, the first type of data is saved to the database, and the second type of data is saved to the task table;
[0009] Extract the task table from the database and perform data analysis, so as to save the data primary key into the redis database queue according to the data analysis result, and save the corresponding data into the redis database key-value pair;
[0010] In response to the service start instruction, the target data primary key is obtained from the redis database queue, the corresponding data is pulled in batches based on the target data primary key, and the pulled data is executed.
[0011] In an exemplary embodiment of the present disclosure, the method further includes:
[0012] The data production end parses the target data to classify the target data, and configures a data type identifier for the target data classification result to generate the data to be processed.
[0013] In an exemplary embodiment of the present disclosure, before saving the first type of data to the database based on the data type identifier, the method further includes:
[0014] The first type of data is configured with transaction identification information so as to write all the first type of data configured with the same transaction identification information into the data.
[0015] In an exemplary embodiment of the present disclosure, when the first type of data is saved to the database based on the data type identifier, and the second type of data is saved to the task table, the method further includes:
[0016] configuring a data call monitoring task for the first type of data and the second type of data to monitor whether there is a remote data call task;
[0017] When the remote data calling task is identified, the remote data calling task is blocked and calling prompt information is generated.
[0018] In an exemplary embodiment of the present disclosure, extracting the task table from the database and performing data analysis includes:
[0019] In response to the preconfigured scheduled tasks, the task table is extracted and parsed at the target time node.
[0020] In an exemplary embodiment of the present disclosure, before saving the data primary key in the redis database queue, the method further includes:
[0021] Reading the total amount of the first type of data, and determining a data management interval corresponding to the total amount of data;
[0022] Based on the data management interval, a corresponding data management strategy is called to configure a queue for the data master key, and each of the data master keys is saved in a corresponding data queue.
[0023] In an exemplary embodiment of the present disclosure, in response to a service startup instruction, obtaining a target data primary key from the redis database queue, batch-pulling corresponding data based on the target data primary key, and executing the pulled data, includes:
[0024] Acquire available resource information in response to a service start instruction, and configure a data pulling strategy based on the available resource information;
[0025] Execute the data pulling strategy to obtain the target data primary key from the redis database queue;
[0026] Extract corresponding data from the key-value pair according to the target data primary key, and load it into the cache;
[0027] The data is extracted from the memory and processed, and the data location information is updated according to the data processing result.
[0028] According to a second aspect of the present disclosure, there is provided a data processing device, comprising:
[0029] The module for receiving data to be processed is used to receive the data to be processed uploaded by the data production end; wherein the data to be processed includes a data type identifier;
[0030] A to-be-processed data storage module, used for saving the first type of data to a database based on the data type identifier, and saving the second type of data to a task table;
[0031] A data analysis module is used to extract the task table from the database and perform data analysis, so as to save the data primary key into the redis database queue according to the data analysis result, and save the corresponding data into the redis database key-value pair;
[0032] The data processing module is used to respond to the service startup instruction, obtain the target data primary key from the redis database queue, batch pull the corresponding data based on the target data primary key, and execute the pulled data.
[0033] According to a third aspect of the present disclosure, there is provided a storage medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned data processing method is implemented.
[0034] According to a fourth aspect of the present disclosure, there is provided an electronic terminal, comprising:
[0035] Processor; and
[0036] A memory, configured to store executable instructions of the processor;
[0037] Wherein, the processor is configured to perform the above-mentioned data processing method by executing the executable instructions.
[0038] In a data processing method provided by an embodiment of the present disclosure, after receiving the data to be processed uploaded by the data production end, the first type of data is saved to the database according to the data type identifier, and the second type of data is saved to the task table; then the task table is extracted from the database and data parsing is performed, so that the data primary key is saved to the redis database queue according to the data parsing result, and the corresponding data is saved to the redis database key-value pair; after receiving the service startup instruction, the target data primary key can be obtained from the redis database queue, so as to batch pull the corresponding data based on the target data primary key, and execute the pulled data. By using the redis database to save the primary key of key data, various business requirements can be met. In addition, by obtaining the target data primary key from the redis database queue according to the service startup instruction, different terminals can obtain data according to their own processing capabilities, which can effectively alleviate the data processing pressure of the client, and realize the loading of tens of thousands of files into the memory in seconds. In addition, the development cost of this solution is low, the system access cost is low, and there is no need to modify the original business too much.
[0039] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0041] Figure 1 A flowchart schematically illustrates a data processing method in an exemplary embodiment of the present disclosure;
[0042] Figure 2 A schematic diagram of a method flow for configuring a data management strategy based on data volume in an exemplary embodiment of the present disclosure is shown;
[0043] Figure 3 A schematic diagram of a method for pulling data from a redis database in an exemplary embodiment of the present disclosure is shown;
[0044] Figure 4 A schematic diagram showing the composition of a data processing device in an exemplary embodiment of the present disclosure is shown;
[0045] Figure 5 A schematic diagram schematically shows the composition of an electronic device in an exemplary embodiment of the present disclosure;
[0046] Figure 6 The diagram schematically shows a program product in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0047] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0048] In the related art, when dealing with application scenarios with high data traffic and high task concurrency, the method of increasing the number of computer rooms and deploying multi-cluster applications is generally adopted to load the required data into the system memory as much as possible, and directly perform memory calculations when the traffic peak comes, without the need for remote RPC calls (Remote Procedure Calls), thereby improving the system response speed and reducing the pressure on dependent interfaces. However, in different application scenarios and business systems, the data that needs to be loaded into the memory is not the same. Some require some character information, and some may need to load the entire large object text. Within the available memory range, the more data that can be loaded, the faster the response speed when dealing with high concurrency. However, loading multiple machines at the same time ensures that data will not be lost and there will be no differences. At the same time, it is required that the loading of multiple machines is almost synchronized, which has strict requirements on the application architecture and is also an extremely important part in the current Internet architecture. In the prior art, generally speaking, the method of using message queues, Zookeeper or RPC calls can pull data into the system memory. However, each existing technical solution has certain shortcomings. For example, when using message queues, such as RabbitMQ and RocketMQ, batch processing is not possible. When the amount of data is large and the updates are frequent, it can only be processed one by one. The processing speed is slow, which can easily cause data backlogs. Zookeeper is suitable for some configuration files and data that do not change very frequently; it is not very suitable for some large files and objects; and when the data changes frequently and there are multiple clients, the data pressure will be very high. When using the RPC pull solution of each client, first of all, the client does not know which data needs to be pulled. If the full pull method is used, it is easy to pull redundant data, and it is difficult to distinguish the differences.
[0049] In view of the above problems, this example implementation first provides a data processing method that can pull data and save it to system memory within seconds in a multi-cluster, multi-client scenario. Figure 1 As shown in , the above data processing method may include the following steps:
[0050] Step S11, receiving the data to be processed uploaded by the data production end; wherein the data to be processed includes a data type identifier;
[0051] Step S12, saving the first type of data to a database based on the data type identifier, and saving the second type of data to a task table;
[0052] Step S13, extracting the task table from the database and performing data analysis, so as to save the data primary key into the redis database queue according to the data analysis result, and save the corresponding data into the redis database key-value pair;
[0053] Step S14, in response to the service start instruction, obtaining the target data primary key from the redis database queue, pulling corresponding data in batches based on the target data primary key, and executing the pulled data.
[0054] The data processing method provided in this example implementation, on the one hand, can meet various business requirements by using the redis database to save the primary key of key data. On the other hand, by obtaining the target data primary key from the redis database queue according to the service startup instruction, different clients can obtain data according to their own processing capabilities, which can effectively alleviate the data processing pressure of the client. In addition, the development cost of this solution is low, the system access cost is low, and there is no need to modify the original business too much.
[0055] Below, each step of the data processing method in this example implementation will be described in more detail with reference to the accompanying drawings and embodiments.
[0056] In step S11, the data to be processed uploaded by the data production end is received; wherein the data to be processed includes a data type identifier.
[0057] In this example implementation, the above data processing method can be applied between the data generation end and the data processing end; for example, the above data generation end can be a merchant, a user or other business terminal; the data processing end can be a backend business server. For example, the above data to be processed can be product maintenance information uploaded by different merchants, for example, it can be data such as the price, origin, name, code, description, etc. of the product.
[0058] The data produced by the data production end needs to be stored in the memory of the business server; specifically, it can be saved in the database of the business server. For the business server, a front-end data processing end can be configured. The data processing end can implement related functions through a data processing server; or, it can also be a front-end business component of the business server to implement related functions. This application does not specifically limit the specific implementation form of the data processing end. For the data to be processed uploaded by the data production end, the type of data can be marked in advance, so that specific types of data can be saved in the memory.
[0059] In this example implementation, specifically, for the data production end, the above method may also include: the data production end parses the target data to classify the target data, and configures a data type identifier for the target data classification result to generate the data to be processed.
[0060] For example, the target data mentioned above can be the commodity data to be modified by the user for the specified commodity; after obtaining the data input by the user, the data production end can classify the data according to the preset rules and add identification information. Generally speaking, the data can be marked as core data and complete business data to be used by the data processing end. Correspondingly, the first type of data identification and the second type of data identification can be added.
[0061] In step S12, the first type of data is saved to the database based on the data type identifier, and the second type of data is saved to the task table.
[0062] In this example implementation, the first type of data may be business core data, and the second type of data may be complete data, or other data other than business core data to be used by the data processing end. Specifically, after receiving the data to be processed, the server end may write the business core data into the database, and save other data to be used into the task table of the database. In this way, data processing and business data can be isolated from each other without dependence or influence on each other.
[0063] In this example implementation, the above method may further include: before writing the data into the database, configuring transaction identification information for the first type of data, so as to write all the first type of data configured with the same transaction identification information into the data.
[0064] Specifically, by configuring a transaction identifier for the core business data, when multiple data are written to the database, it can be ensured that all the data corresponding to the same transaction are successfully written or all fail to be written.
[0065] In this example implementation, the above method may also include: configuring a data call monitoring task for the first type of data and the second type of data to monitor whether there is a remote data call task; when the remote data call task is identified, blocking the remote data call task and generating a call prompt message.
[0066] Specifically, by monitoring the data within the transaction and ignoring or rejecting the remote data call instruction when it is detected, the remote data call is blocked to ensure that the data within the transaction will not be called remotely from outside, thus reducing the data processing pressure and improving data security.
[0067] In step S13, the task table is extracted from the database and data is parsed, so that the data primary key is saved in the redis database queue according to the data parsing result, and the corresponding data is saved in the redis database key-value pair.
[0068] In this example implementation, for the data processing end, a scheduled task for extracting data and / or parsing data can be pre-configured, and a task queue can be configured for different scheduled tasks. According to the scheduled task, the scheduled task is executed at a predetermined time node, the task table is extracted from the database, and the current state of the data is determined and the data is parsed. The data primary key in the data parsing result is saved in the redis database queue, and the corresponding data is saved in the key-value pair of the redis database.
[0069] In addition, in other exemplary real-time methods, the data queues may also be divided according to the amount of data. Figure 2 As shown, the above method may include the following steps:
[0070] Step S21, reading the total amount of the first type of data, and determining a data management interval corresponding to the total amount of data;
[0071] Step S22: Based on the data management interval, the corresponding data management strategy is called to configure a queue for the data primary key, and each data primary key is saved in a corresponding data queue.
[0072] Specifically, if the amount of data in the database is large, you can configure queues by day or hour, for example, one queue per day and one queue per hour; or, configure queues by data type, and different data types can use the same queue. Specifically, you can configure the corresponding queue creation rules in advance based on the amount of data as the above-mentioned data management strategy. For example, in a scenario with a large amount of data, if the amount of data generated every day is large, you can consider distinguishing queues by day or hour, or by data type. Each category of data is saved in a separate redis queue, which has the advantage that the data in the queue will not be too long. Different processing can be done according to different businesses.
[0073] In step S14, in response to the service start instruction, the target data primary key is obtained from the redis database queue, so as to pull the corresponding data in batches based on the target data primary key, and execute the pulled data.
[0074] In this example implementation, specifically, refer to Figure 3 As shown, the above step S14 may include:
[0075] Step S141, obtaining available resource information in response to the service start instruction, and configuring a data pulling strategy based on the available resource information;
[0076] Step S142, executing the data pulling strategy to obtain the target data primary key from the redis database queue;
[0077] Step S143, extracting corresponding data from the key-value pair according to the target data primary key, and loading it into the cache;
[0078] Step S144, extracting data from the memory and processing the data, and updating the data location information according to the data processing result.
[0079] Specifically, the above-mentioned service startup instruction can be an instruction from a scheduled task, or a control instruction from a user. For a business server, if it is a scheduled task, all data primary keys can be read from the redis queue at a scheduled time, and loaded into the cache in sequence. Alternatively, the number and / or type of currently pulled data primary keys can be calculated based on the current memory usage and available computing power of the business server. In addition, the data pulling strategy can be pre-configured, and the corresponding data pulling method can be configured according to the current status of the business server, or the number of queues and the number of data primary keys.
[0080] Specifically, get the data primary key from the redis queue. When getting it, you can use the index subscript method to get a specific number of data each time. After getting the data primary key, get the data details from redis according to each primary key and load it into the memory. When a certain data fails to be processed, it can be put into the memory queue and stored. For example, when the service starts, read all data primary keys from the redis queue and load them in sequence. If the data processing is successful, the current latest position is recorded. If the processing fails, it is placed in the retry queue. When the service is started, start the internal timer task, regularly pull the latest data from the redis queue, and process the data to be retried. Pull different amounts of data from the redis queue each time, which is batch pull processing. It can reduce calls to redis and improve efficiency.
[0081] The data processing method provided by the present disclosure implements a redis-based list to save the primary key of key data, solving the problem of saving data in memory. Different pull strategies can be configured according to different business systems; it is suitable for any business requirements, has a low technical threshold, and has low development costs and low system access costs. File data is stored in redis, which is simple to store and can support millions of TPS (Transactions Per Second) readings. By setting up a maintenance retry queue, data that failed to be processed can be retried to ensure that data is not lost.
[0082] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0083] For further reference, Figure 4 As shown, in the embodiment of this example, a data processing device 40 is also provided, comprising: a to-be-processed data receiving module 401, a to-be-processed data storage module 402, a data parsing module 403 and a data processing module 404. Among them:
[0084] The to-be-processed data receiving module 401 may be used to receive the to-be-processed data uploaded by the data production end; wherein the to-be-processed data includes a data type identifier.
[0085] The to-be-processed data storage module 402 may be configured to save the first type of data to a database based on the data type identifier, and save the second type of data to a task table.
[0086] The data analysis module 403 can be used to extract the task table from the database and perform data analysis, so as to save the data primary key into the redis database queue according to the data analysis result, and save the corresponding data into the redis database key-value pair.
[0087] The data processing module 404 can be used to respond to a service startup instruction, obtain a target data primary key from the redis database queue, batch pull corresponding data based on the target data primary key, and execute the pulled data.
[0088] In this example implementation, the apparatus may further include: a data classification module.
[0089] The data classification module can be used by the data production end to parse the target data to classify the target data, and configure a data type identifier for the target data classification result to generate the data to be processed.
[0090] In this example implementation, the apparatus may further include: a transaction identification configuration module.
[0091] The transaction identification configuration module can be used to configure transaction identification information for the first type of data before saving the first type of data to the database based on the data type identification, so as to write all the first type of data configured with the same transaction identification information into the data.
[0092] In this example implementation, the device further includes: a data monitoring module.
[0093] The data monitoring module can be used to configure data call monitoring tasks for the first type of data and the second type of data to monitor whether there is a remote data call task; when the remote data call task is identified, the remote data call task is blocked and a call prompt message is generated.
[0094] In this example implementation, the data parsing module 403 may be used to extract and parse the task table at a target time node in response to a preconfigured scheduled task.
[0095] In this example implementation, the device may further include: a data management policy selection module.
[0096] The data management strategy selection module can be used to read the total amount of the first type of data and determine the data management interval corresponding to the total amount of data; based on the data management interval, call the corresponding data management strategy to configure a queue for the data primary key, and save each data primary key to the corresponding data queue.
[0097] In this example implementation, the data processing module can be used to obtain available resource information in response to a service startup instruction, and configure a data pulling strategy based on the available resource information; execute the data pulling strategy to obtain the target data primary key from the redis database queue; extract the corresponding data from the key-value pair according to the target data primary key, and load it into the cache; extract data from the memory and process the data, and update the data location information according to the data processing results.
[0098] The specific details of each module in the above-mentioned knowledge data processing device 40 have been described in detail in the corresponding data processing method, so they will not be repeated here.
[0099] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0100] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0101] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".
[0102] Refer to the following Figure 5 The electronic device 600 according to this embodiment of the present invention is described. Figure 5 The electronic device 500 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0103] like Figure 5 As shown, the electronic device 500 is in the form of a general computing device. The components of the electronic device 500 may include but are not limited to: at least one processing unit 510, at least one storage unit 520, and a bus 530 connecting different system components (including the storage unit 520 and the processing unit 510).
[0104] The storage unit stores program codes, which can be executed by the processing unit 510, so that the processing unit 510 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 510 can perform the following steps: Figure 1 The data processing method shown in .
[0105] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 5201 and / or a cache storage unit 5202 , and may further include a read-only storage unit (ROM) 5203 .
[0106] The storage unit 520 may also include a program / utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0107] Bus 530 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0108] The electronic device 500 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 500, and / or communicate with any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 550. Furthermore, the electronic device 500 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 560. As shown, the network adapter 560 communicates with other modules of the electronic device 500 via a bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0109] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0110] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0111] refer to Figure 6 As shown, a program product 600 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0112] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0113] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0114] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0115] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0116] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0117] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0118] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A data processing method, characterized in that: include: Receiving the data to be processed uploaded by the data production end; wherein the data to be processed includes a data type identifier; Based on the data type identifier, the first type of data is saved to a database, and the second type of data is saved to a task table, wherein a data call monitoring task is configured for the first type of data and the second type of data to monitor whether there is a remote data call task; when the remote data call task is identified, the remote data call task is blocked and a call prompt message is generated; Extract the task table from the database and perform data analysis, so as to save the data primary key into the redis database queue according to the data analysis result, and save the corresponding data into the redis database key-value pair; In response to a service startup instruction, a target data primary key is obtained from the redis database queue, and corresponding data is pulled in batches based on the target data primary key, and the pulled data is executed, including: obtaining available resource information in response to the service startup instruction, and configuring a data pulling strategy based on the available resource information; executing the data pulling strategy to obtain the target data primary key from the redis database queue in the form of an index subscript; extracting corresponding data from a key-value pair according to the target data primary key, and loading it into a cache; extracting data from a memory and processing the data, and updating data location information according to the data processing result; wherein, when a certain data fails to be processed, the data that failed to be processed is placed in a memory queue and stored; Before saving the data primary key to the redis database queue, the method further includes: Reading the total amount of the first type of data, and determining a data management interval corresponding to the total amount of data; Based on the data management interval, a corresponding data management strategy is called to configure a queue for the data master key, and each of the data master keys is saved in a corresponding data queue.
2. The method according to claim 1, characterized in that The method further comprises: The data production end parses the target data to classify the target data, and configures a data type identifier for the target data classification result to generate the data to be processed.
3. The method according to claim 1, characterized in that Before saving the first type of data to the database based on the data type identifier, the method further includes: The first type of data is configured with transaction identification information so as to write all the first type of data configured with the same transaction identification information into the data.
4. The method according to claim 1, characterized in that: The step of extracting the task table from the database and performing data analysis includes: In response to the preconfigured scheduled tasks, the task table is extracted and parsed at the target time node.
5. A data processing device, characterized in that: include: The module for receiving data to be processed is used to receive the data to be processed uploaded by the data production end; wherein the data to be processed includes a data type identifier; A to-be-processed data storage module, used for saving the first type of data to a database based on the data type identifier, and saving the second type of data to a task table; A data monitoring module, configured to configure data call monitoring tasks for the first type of data and the second type of data, so as to monitor whether there is a remote data call task; when the remote data call task is identified, the remote data call task is blocked and call prompt information is generated; A data analysis module is used to extract the task table from the database and perform data analysis, so as to save the data primary key into the redis database queue according to the data analysis result, and save the corresponding data into the redis database key-value pair; The data processing module is used to obtain the target data primary key from the redis database queue in response to the service startup instruction, so as to batch pull the corresponding data based on the target data primary key, and execute the pulled data, including: obtaining available resource information in response to the service startup instruction, and configuring a data pulling strategy based on the available resource information; executing the data pulling strategy to obtain the target data primary key from the redis database queue in the form of an index subscript; extracting corresponding data from the key-value pair according to the target data primary key, and loading it into the cache; extracting data from the memory and processing the data, and updating the data location information according to the data processing result; wherein, when a certain data processing fails, the data that fails to be processed is placed in the memory queue and stored; The device also includes: a data management strategy selection module, which is used to read the total amount of data of the first type and determine the data management interval corresponding to the total amount of data; based on the data management interval, the corresponding data management strategy is called to configure a queue for the data primary key, and each of the data primary keys is saved in the corresponding data queue.
6. A storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the data processing method according to any one of claims 1 to 4 is implemented.
7. An electronic terminal, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the data processing method according to any one of claims 1 to 4 by executing the executable instructions.
