WO2024067832A1 - Data processing method and apparatus, electronic device, and storage medium - Google Patents

Data processing method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2024067832A1
WO2024067832A1 PCT/CN2023/122758 CN2023122758W WO2024067832A1 WO 2024067832 A1 WO2024067832 A1 WO 2024067832A1 CN 2023122758 W CN2023122758 W CN 2023122758W WO 2024067832 A1 WO2024067832 A1 WO 2024067832A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
processed
peripheral system
notification information
version
Prior art date
Application number
PCT/CN2023/122758
Other languages
French (fr)
Chinese (zh)
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 WO2024067832A1 publication Critical patent/WO2024067832A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication

Definitions

  • the present application relates to the field of computer technology, and in particular to a data processing method, device, electronic device and storage medium.
  • the present application provides a data processing method, device, electronic device and storage medium that can ensure the consistency, integrity, correctness and persistence of data in multiple distributed information system applications, and make the data effective in each service in real time.
  • the present application provides a data processing method, which is applied to a middle-office system, wherein the middle-office system is communicatively connected to a peripheral system, and the method includes: sending data update notification information to the peripheral system, wherein the data update notification information is used to notify the peripheral system to receive the pending data in the pending data set from a preset object storage medium; if it is determined that the peripheral system has received all the pending data in the pending data set, sending the data validity notification information to the peripheral system, wherein the data validity notification information is used to notify the peripheral system to validate all the pending data that have been received; if it is determined that the peripheral system has validated all the pending data in the pending data set, updating the data processing task status corresponding to the pending data set to validated.
  • the method before sending the data update notification information to the peripheral system, the method also includes: configuring multiple data to be processed to obtain the data set to be processed; packaging the data set to be processed, and uploading the configured data set to be processed to the object storage medium.
  • the sending of the data update notification information to the peripheral system includes: sending the data update notification information to a data update message queue, so as to send the data update notification information to the peripheral system through the data update message queue.
  • the method also includes: receiving data received information from the callback status message queue, wherein, when the peripheral system completes the task of receiving one of the pending data in the pending data set, the callback status message queue receives the data received information from the peripheral system once; if all the data received information in the callback status message queue has been received, it is determined that the peripheral system has received all the pending data in the pending data set.
  • sending the data validity notification information to the peripheral system includes: if it is determined that the peripheral system has received all the data to be processed in the data set to be processed, sending the data validity notification information to the data validity message queue, so as to send the data validity notification information to the peripheral system through the data validity message queue.
  • the method also includes: receiving data validation information from the callback status message queue, wherein when the peripheral system completes the validation task of one of the pending data in the pending data set, the callback status message queue receives the data validation information from the peripheral system; if the data validation information in the callback status message queue is received, it is determined that the peripheral system has validated all the pending data in the pending data set.
  • the present application provides a data processing method, which is applied to a peripheral system, and the peripheral system is communicatively connected to the middle-office system.
  • the method includes: receiving data update notification information; receiving the to-be-processed data in the to-be-processed data set from a preset object storage medium according to the data update notification information; when the to-be-processed data is received, sending data received information to the middle-office system; receiving data validity notification information; according to the data validity notification information, validating all the to-be-processed data that have been received; if all the to-be-processed data in the to-be-processed data set have been valid, updating the data version management table in the preset database.
  • the data version management table includes a version identification mapping table
  • the data to be processed includes a business key
  • the data set to be processed includes a current data version identification.
  • the method After receiving the data to be processed in the data set to be processed from a preset object storage medium according to the data update notification information, the method also includes: synchronously saving the business key and the current data version identification to the version identification mapping table.
  • the data version management table also includes a valid version identification linked list and a business key mapping table. If all the data to be processed in the data set to be processed have become effective, the data version management table in the preset database is updated, including: adding the current data version identification corresponding to the effective data set to be processed to the valid version identification linked list; generating the business key mapping table based on the valid version identification linked list and the version identification mapping table.
  • the business key mapping table includes a basic data version identifier
  • the method further includes: querying from the valid version identifier linked list to obtain first target data within a first target historical time, where the first target historical time is N days before the last data update, where N is a natural number; matching from the version identifier mapping table to obtain a target business key associated with the first target data and the latest version identifier data of the target business key; and matching the target business key associated with the first target data to the latest version identifier data of the target business key; The latest version identification data of the business key is used as the new basic data version identification of the business key mapping table.
  • the method also includes: querying from the version identification mapping table to obtain second target data within a second target historical time, where the second target historical time is M days before the last data update, and M is a natural number; matching from the valid version identification linked list to obtain at least one target version identification data associated with the second target data; filtering at least one target version identification data that is in an effective state to obtain at least one filtered target version identification data; deleting all data in the version identification mapping table that is associated with at least one filtered target version identification data.
  • the method also includes: obtaining a historical data version switching instruction; deleting the specified version identification data in the valid version identification linked list according to the historical data version switching instruction, and obtaining the valid version identification linked list after deleting the specified version identification data; and regenerating the business key mapping table according to the valid version identification linked list after deleting the specified version identification data and the version identification mapping table.
  • the present application provides a data processing device, which is applied to a middle-office system, and the middle-office system is communicatively connected to a peripheral system.
  • the data processing device includes: an update information sending module, which is used to send data update notification information to the peripheral system, and the data update notification information is used to notify the peripheral system to receive the pending data in the pending data set from a preset object storage medium; an effectiveness information sending module, which is used to send the data effectiveness notification information to the peripheral system if it is determined that the peripheral system has received all the pending data in the pending data set, and the data effectiveness notification information is used to notify the peripheral system to validate all the pending data that have been received; a task status updating module, which is used to update the data processing task status corresponding to the pending data set to effective if it is determined that the peripheral system has validated all the pending data in the pending data set.
  • the present application provides a data processing device, which is applied to a peripheral system, and the peripheral system is communicatively connected to the middle-office system.
  • the data processing device includes: an update information receiving module, which is used to receive data update notification information; a data receiving module, which is used to receive the pending data in the pending data set from a preset object storage medium according to the data update notification information; a received information sending module, which is used to send data received information to the middle-office system when the pending data is received; an effective information receiving module, which is used to receive data effective notification information; a data effective module, which is used to effective all the pending data that have been received according to the data effective notification information; a data table updating module, which is used to update the data version management table in the preset database if all the pending data in the pending data set have been effective.
  • the present application provides an electronic device, comprising: one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the data processing method described in any of the above embodiments.
  • the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the data processing method described in any of the above embodiments.
  • the present application sends data update notification information to the peripheral system, and the data update notification information is used to notify the peripheral system to receive the pending data in the pending data set from the preset object storage medium; if it is determined that the peripheral system has received all the pending data in the pending data set, a data validity notification information is sent to the peripheral system, and the data validity notification information is used to notify the peripheral system to validate all the pending data received; if it is determined that the peripheral system has validated all the pending data in the pending data set Data, updates the data processing task status corresponding to the set of data to be processed to effective, that is, this application stores the data to be processed in an object storage medium that is available for external download, which is easy to expand and compatible, and convenient for processing large amounts of data.
  • the task is allowed to take effect only after the peripheral system has received all the data to be processed, ensuring the atomic effectiveness of large quantities of different types of data, and ensuring the correctness, persistence and integrity of the data; it implements data version management, retains historical data, effectively reduces the risks brought about by the configuration process, and ensures the persistence and integrity of the data of the middle-office system and the peripheral system.
  • FIG1 is a schematic diagram of an application scenario of a middle platform system provided in an embodiment of the present application.
  • FIG. 2 is a schematic diagram of an application scenario of a data processing system provided in an embodiment of the present application.
  • FIG3 is a flow chart of a data processing method provided in an embodiment of the present application.
  • FIG. 4 is a flow chart of a data processing method provided in another embodiment of the present application.
  • FIG5 is a flow chart of a data processing method provided in another embodiment of the present application.
  • FIG6 is a schematic diagram of the structure of a data processing device provided in another embodiment of the present application.
  • FIG. 7 is a schematic diagram of the structure of a data processing device provided in another embodiment of the present application.
  • FIG. 8 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • first and second are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
  • a feature defined as “first” or “second” may explicitly or implicitly include one or more of the features.
  • the meaning of “plurality” is two or more, unless otherwise clearly and specifically defined.
  • the middle platform system is located between the front-end system and the back-end system.
  • the front-end system can be multiple peripheral systems.
  • data flows from the back-end system into the middle platform system to complete the storage, calculation, and product packaging of massive data, forming the core data capabilities of the enterprise, and providing strong support for the customized innovation of multiple peripheral systems based on data and the continuous evolution of the business middle platform based on data feedback.
  • the data volume is large and the data types are diverse.
  • the consistency and integrity of the data in multiple distributed network applications must be guaranteed. Therefore, the existing data processing methods are not applicable to the data of the middle platform system at all.
  • the embodiments of the present application provide a data processing method, device, electronic device and storage medium, which are described in detail below.
  • the executor of the data processing method of the embodiment of the present application may be the data processing device provided in the embodiment of the present application, or different types of electronic devices such as a server device, a physical host or a user equipment (UE) that integrates the data processing device, wherein the data processing device may be implemented in hardware or software, and the UE may specifically be a terminal device such as a smart phone, a tablet computer, a laptop computer, a PDA, a desktop computer or a personal digital assistant (PDA).
  • a server device a physical host or a user equipment (UE) that integrates the data processing device
  • the data processing device may be implemented in hardware or software
  • the UE may specifically be a terminal device such as a smart phone, a tablet computer, a laptop computer, a PDA, a desktop computer or a personal digital assistant (PDA).
  • PDA personal digital assistant
  • the electronic device may work in a single operation mode or in a device cluster mode.
  • Figure 2 is a scene diagram of a data processing system provided by an embodiment of the present application.
  • the data processing system may include an electronic device 100 for completing the data processing method, and a data processing device is integrated in the electronic device 100.
  • the electronic device can be used to send data update notification information to the peripheral system, and the data update notification information is used to notify the peripheral system to receive the pending data in the pending data set from the preset object storage medium; if it is determined that the peripheral system has received all the pending data in the pending data set, send data validity notification information to the peripheral system, and the data validity notification information is used to notify the peripheral system to validate all the received pending data; if it is determined that the peripheral system has validated all the pending data in the pending data set, update the data processing task status corresponding to the pending data set to be validated.
  • the data processing system may further include a memory 200 for storing data, such as business data related to the business middle station and other data.
  • scenario diagram of the data processing system shown in Figure 2 is merely an example.
  • the data processing system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application.
  • Ordinary technicians in this field can know that with the evolution of data processing systems and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
  • the data processing method includes: sending data update notification information to the peripheral system, the data update notification information is used to notify the peripheral system to receive the pending data in the pending data set from the preset object storage medium; if it is determined that the peripheral system has received all the pending data in the pending data set, sending data validity notification information to the peripheral system, the data validity notification information is used to notify the peripheral system to validate all the received pending data; if it is determined that the peripheral system has validated all the pending data in the pending data set, it will be processed together with the pending data.
  • the data processing task status corresponding to the data collection is updated to effective.
  • This application stores the data to be processed in an object storage medium that is available for external download. It is easy to expand and compatible, and is convenient for processing large amounts of data. It allows the task to take effect only after it is determined that the peripheral system has received all the data to be processed, thereby ensuring the atomic effectiveness of large quantities of different types of data, and ensuring the correctness, persistence and integrity of the data; it implements data version management, retains historical data, effectively reduces the risks brought about by the configuration process, and ensures the persistence and integrity of the data of the middle-end system and the peripheral system.
  • Figures 3 and 4 are both flowcharts of the data processing method provided in an embodiment of the present application. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that here.
  • the data processing method is applied to the middle station system, which is communicatively connected with the peripheral system, as shown in Figure 3, and the method specifically includes steps S201 to S203.
  • S201 Send data update notification information to a peripheral system, where the data update notification information is used to notify the peripheral system to receive the to-be-processed data in the to-be-processed data set from a preset object storage medium.
  • the data to be processed is the data that needs to be configured and effective in the peripheral system; the data set to be processed is a collection of multiple data to be processed in the same batch.
  • the multiple data to be processed in the data set to be processed may be data of the same type or data of different types.
  • the data to be processed in the data set to be processed may include various business data.
  • the data to be processed may be business data applied to prices, or business data applied to products and timeliness, etc. This embodiment does not make any specific limitations on this.
  • the middle-office system In order to realize the storage and configuration of a large number of different types of data to be processed, and to facilitate the synchronization and real-time effectiveness of different types of data in multiple different peripheral systems at the same time, in this embodiment, the middle-office system generates a file for the configuration of the data set to be processed and uploads it to the object storage medium. When the middle-office system notifies multiple peripheral systems that there is a data update, the corresponding files are sent to the multiple peripheral systems through the object storage medium.
  • the method before sending data update notification information to the peripheral system, the method also includes: configuring multiple data to be processed to obtain a set of data to be processed; packaging the set of data to be processed, and uploading the configured set of data to be processed to the object storage medium.
  • the business key is a user-defined data feature of the data to be processed.
  • the same business key can also be configured for the same type of data to be processed.
  • the same business key is configured for overtime data and service time data. Therefore, one business key may contain multiple data to be processed.
  • the business key of the data to be processed can be configured according to specific needs, and this embodiment does not make any specific limitations on this.
  • a data set to be processed containing multiple data to be processed is obtained, and a current data version identifier corresponding to the data set to be processed is generated.
  • the current data version identifier is the version number (batch number) of the data set to be processed.
  • the data set to be processed corresponds to multiple version files.
  • the format of the version file can be a compressed package.
  • the data set to be processed is packaged, and the configured data set to be processed is uploaded to the object storage medium.
  • the data to be processed can be regarded as a business data table, and a business data table is regarded as a version file. That is, each time the peripheral system updates the business data, a version file corresponding to the business data table is generated. Multiple version files are merged and compressed, and a compressed package corresponds to a current data version identifier. Each piece of data to be processed is written in protostuff format. In this embodiment, other configuration methods can also be used, and this embodiment does not specifically limit this.
  • each sending task corresponds to a file.
  • the data to be processed is distributed to the peripheral system through the data distribution entity.
  • the object storage medium may be a database using object storage service technology (Object Storage Service, OSS), wherein OSS is a distributed object storage service that provides an object storage service in the form of a key-value pair.
  • OSS object storage service technology
  • a user may uniquely obtain the content of an object according to the name (Key) of the object.
  • the data to be processed may be stored in the form of an object in OSS, and a business key, a current data version identifier, and a data task status may be set for the data set to be processed.
  • the data task status is initially in an ineffective state, and the current data version identifier of the data to be processed is the name (Key) of the data set to be processed.
  • sending data update notification information to the peripheral system specifically includes: sending data update notification information to the data update message queue, so as to send the data update notification information to the peripheral system through the data update message queue.
  • the middle-office system acts as the producer of the data update message queue
  • the peripheral system acts as the consumer of the data update message queue.
  • the data update notification information is sent to the data update message queue through the middle-office system, and the peripheral system receives the data update notification information from the data update message queue, so as to realize the middle-office system sending data update notification information to the peripheral system.
  • Data update notification information can contain simple text strings or complex embedded objects.
  • the fields of data update notification information can be configured as follows:
  • Task type product configuration, whitelist configuration, price configuration, timeliness configuration, etc.
  • MD5 Message-Digest Algorithm
  • Contents of the data set to be processed descriptions related to the contents of the data to be processed;
  • the data structure of the data set to be processed can be configured as:
  • Class name the corresponding entity name
  • the total number of data rows in the data set to be processed the number of data rows to be processed that are transferred.
  • the data update notification information may also be configured with other fields, which are not specifically limited in this embodiment.
  • the data update message queue is a container for storing data update notification messages during the transmission process of data update notification information. Its main purpose is to provide routing and ensure the delivery of messages.
  • the data update message queue can use any one of Kafka, RabbitMQ or ActiveMQ, and this embodiment does not make specific limitations on this.
  • the peripheral system After the peripheral system completes the data receiving task of the data to be processed, it will send data reception information to the middle-office system to notify the middle-office system that the peripheral system has completed data reception.
  • the method also includes: receiving data received information from the callback status message queue, wherein, when the peripheral system completes the task of receiving one pending data in the pending data set, the callback status message queue receives data received information from the peripheral system once; if all the data received information in the callback status message queue has been received, it is determined that the peripheral system has received all the pending data in the pending data set.
  • the peripheral system acts as the producer of the callback status message queue, and the middle-stage system acts as the consumer of the callback status message queue.
  • the peripheral system After the peripheral system completes the data reception task of one of the pending data sets, it will send a data reception message to the callback status message queue.
  • the middle-stage system acts as the subscriber of the callback status message queue.
  • the peripheral system sends a data reception message to the callback status message queue, and the middle-stage system receives the data reception message sent by the callback status message queue to determine that the peripheral system has completed data reception.
  • the data reception message can contain simple text strings or complex embedded objects.
  • the fields of the data received information can be configured as follows:
  • Task type product configuration, whitelist configuration, price configuration, timeliness configuration, etc.
  • Data status to be processed data received, data effective, data processing exception, etc.
  • the data received information may also be configured with other fields, which is not specifically limited in this embodiment.
  • the callback status message queue may adopt any one of Kafka, RabbitMQ or ActiveMQ, and this embodiment does not make any specific limitation to this.
  • the middle-office system allows each peripheral system to validate the data to be processed only after it determines that the peripheral system has completed all data receiving tasks. That is, if it is determined that the peripheral system has received all the data to be processed in the data set to be processed, the data validation notification information is sent to the peripheral system.
  • sending data validity notification information to the peripheral system specifically includes:
  • data validity notification information is sent to the data validity message queue, so as to send the data validity notification information to the peripheral system through the data validity message queue.
  • the middle-office system acts as the producer of the data validity message queue
  • the peripheral system acts as the consumer of the data validity message queue.
  • the data validity notification information is sent to the data validity message queue through the middle-office system, and the peripheral system receives the data validity notification information from the data validity message queue, so as to realize that the middle-office system sends the data validity notification information to the peripheral system.
  • Data validation notification information can contain simple text strings or complex embedded objects.
  • the fields of data effectiveness notification information can be configured as follows:
  • Task type product configuration, whitelist configuration, price configuration, timeliness configuration, etc.
  • MD5 Message-Digest Algorithm
  • Contents of the data set to be processed descriptions related to the contents of the data to be processed;
  • the data structure of the data set to be processed can be configured as:
  • Class name the corresponding entity name
  • the total number of data rows in the data set to be processed the number of data rows to be processed that are transferred.
  • the data validity notification information may also be configured with other fields, which are not specifically limited in this embodiment.
  • the data validation message queue may adopt any one of Kafka, RabbitMQ or ActiveMQ, and this embodiment does not specifically limit this.
  • the peripheral system After the peripheral system completes the data validation task for the data to be processed, it will send data validation information to the middle-office system to notify the middle-office system that the peripheral system has completed the data validation.
  • the method also includes: receiving data validation information from the callback status message queue, wherein when the peripheral system completes the validation task of one pending data in the pending data set, the callback status message queue receives data validation information from the peripheral system once; if all the data validation information in the callback status message queue has been received, it is determined that the peripheral system has validated all the pending data in the pending data set.
  • the middle-office system is a subscriber to the callback status message queue.
  • the middle-office system will receive the data-validated message sent by the callback status message queue. If all the data-validated messages in the callback status message queue have been received, it is determined that the peripheral system has validated all the pending data in the pending data set.
  • the callback status message queue proposed in this step and the callback status message queue proposed in step S202 can be the same message queue, the difference between them is that the pending data status in the data received information and the data effective information is different.
  • the middle-office system decouples the messages in the callback status message queue and determines that the peripheral system has received the pending data.
  • the middle-office system decouples the messages in the callback status message queue and determines that the peripheral system has effective the pending data.
  • the callback status message queue may also be a different message queue, and this application does not make any specific limitation on this.
  • Figures 4 and 5 are both flowchart diagrams of the data processing method provided in an embodiment of the present application. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that here.
  • the data processing method is applied to a peripheral system, and the peripheral system is communicatively connected with the middle station system. As shown in Figure 5, the method specifically includes steps S301 to S306.
  • S302 Receive the to-be-processed data in the to-be-processed data set from a preset object storage medium according to the data update notification information.
  • S304 Receive data validation notification information.
  • steps S201 to S203 have disclosed the receiving and sending of data update notification information through the data update message queue, the receiving and sending of data validity notification information through the data validity message queue, and the receiving and sending of data received information and data valid information through the callback status message queue between the middle-office system and the peripheral system, steps S301 to S305 are actually the steps corresponding to steps S201 to S203, and therefore, they are not repeated in this embodiment.
  • the data version management table in the preset database can be updated when all the data to be processed in the data set to be processed have taken effect.
  • the data version management table includes a valid version identification chain table.
  • the peripheral system can also maintain two additional tables, that is, the data version management table can also include a version identification mapping table and a business key mapping table.
  • the basic data version identifier is the version identifier of the initial data initially configured by the peripheral system
  • the fields include the current data version identifier, data effective time, and data status;
  • the database is stored in the peripheral system end, wherein the database of the peripheral system end may be a database using object storage service technology, or may be other free and open source databases, which is not specifically limited in this embodiment.
  • the fields include the corresponding current data version identifier, business key type, business key, and data receiving time;
  • the database is stored in the peripheral system end, wherein the database of the peripheral system end may be a database using object storage service technology, or may be other free and open source databases, which is not specifically limited in this embodiment.
  • the fields include the business key, the current data version identifier corresponding to the business key, and the data effective time, etc.
  • the current data version of the data to be processed is identified as the first prefix of the remote cache key in the database, remote cache and local cache stored on the peripheral system side; wherein, the database on the peripheral system side may be a database using object storage service technology, or other free and open source databases, which is not specifically limited in this embodiment.
  • the local cache is the local cache of the peripheral system.
  • Remote cache can use remote dictionary server (Remote Dictionary Server, Redis). Redis has a high-performance Key-Value database storage mechanism, and supports data persistence, no data loss after restart, supports distributed deployment, supports data backup and other features. Remote cache can also use any remote cache component, which is not specifically limited in this embodiment.
  • Remote dictionary server Remote Dictionary Server, Redis. Redis has a high-performance Key-Value database storage mechanism, and supports data persistence, no data loss after restart, supports distributed deployment, supports data backup and other features.
  • Remote cache can also use any remote cache component, which is not specifically limited in this embodiment.
  • the table structure of the local cache and the remote cache can be set as follows:
  • p2cache_config (cache configuration table): stores the refresh rules of pending data, such as key field, value field, refresh frequency, and filter conditions;
  • p2cache_key stores the key value of the data set to be processed
  • p2cache_detail stores the value of the data set to be processed.
  • the peripheral system when the peripheral system needs to use the current business key data, it will first find its latest current data version identifier, and then obtain the latest configuration data through the current data version identifier and business key, so as to realize data version control and real-time data effectiveness, and then realize the correctness, persistence and integrity of the data, and make the data effective in real time in each service.
  • the method further includes: synchronously saving the business key and the current data version identifier to a version identifier mapping table.
  • the peripheral system After the peripheral system successfully receives the data to be processed, it parses the mapping relationship between the business key of the data to be processed and the current data version identifier, and saves the mapping relationship between the business key and the current data version identifier to the version identifier mapping table; at the same time, the local cache and remote cache of the peripheral system are refreshed, and the business key of the data set to be processed and the current data version identifier of the data to be processed are synchronously saved to the remote cache.
  • the data version management table in the preset database is updated, including: adding the current data version identifier corresponding to the effective data set to be processed to the valid version identifier linked list; generating a business key mapping according to the valid version identifier linked list and the version identifier mapping table; surface.
  • the current data version identifier corresponding to the valid set of data to be processed is added to the valid version identifier linked list. Specifically, after the peripheral system successfully validates the data to be processed, the current data version identifier of the data to be processed is added to the end of the valid version identifier linked list.
  • a business key mapping table is generated according to the valid version identifier chain list and the version identifier mapping table, specifically: the valid version identifier chain list is traversed in descending order to obtain the current data version identifier that is currently in effect; the version identifier mapping table is matched according to the current data version identifier; the version identifier mapping table is traversed to determine the business key; when the business key does not exist in the preset business key mapping table, the business key is written into the business key mapping table; when the business key does not exist in the preset business key mapping table, no operation is performed, and finally a business key mapping table is generated; at the same time, the local cache and remote cache of the peripheral system are refreshed, and the business key of the data set to be processed and the current data version identifier of the data to be processed are synchronously saved to the remote cache.
  • refreshing the local cache and the remote cache of the peripheral system specifically includes:
  • the local cache and the remote cache are both referred to as caches below;
  • Producer scheduled task The producer queries the cache p2cache_config configuration every 10 seconds, queries the corresponding business table according to the configuration, and inserts the pending data that needs to be refreshed into the p2cache_key table and p2cache_detail table; 2. Consumer scheduled task: The consumer queries the p2cahce_key table and p2cache_detail data every 10 seconds and refreshes it to the cache.
  • the business key mapping table is updated to the local cache in real time.
  • Update the business key mapping table to the local cache in real time including:
  • First full startup query the database to obtain the business key and the corresponding current data version identifier, and store the queried business key and the corresponding current data version identifier in the local cache business key mapping table;
  • Regular pruning may include: merging historical data version identifiers into basic data version identifiers; regularly cleaning up expired data version identifier caches.
  • the historical data version identifier is a new data version identifier recorded on the basic data version identifier each time the peripheral system updates business data, and the recorded new data version identifier includes the current data version identifier.
  • other data pruning methods may also be included, and this application does not specifically limit this.
  • the data processing method further includes: merging the historical data version identifier into the basic data version identifier.
  • the first target historical time is N days before the last data update, where N is a natural number and the value of N is set as required, such as the previous 7 days, which is not specifically limited in this embodiment;
  • the first target data includes all data in the valid version identifier chain list within the first target historical time.
  • the first target data may include the data version identifier within the first target historical time, the data effective time of the data version identifier, time and data status, etc.
  • the latest version identification data of the target business key is used as the new basic data version identification of the business key mapping table, and the business data table and cache are refreshed.
  • the method further includes: regularly clearing the expired data version identification cache.
  • the second target historical time is M days before the last data update, where M is a natural number and the value of M is set as required, such as the previous 7 days, which is not specifically limited in this embodiment;
  • the second target data includes all data in the version identification mapping table within the second target historical time.
  • the second target data may include data version identification, business key type, business key, and data receiving time within the second target historical time.
  • At least one target version identification data associated with the second target data is obtained by matching from the valid version identification linked list;
  • the execution interval of "merging historical data version identifiers into basic data version identifiers" and "regularly clearing expired data version identifier cache” can be set according to actual conditions, and this embodiment does not make specific limitations.
  • the data processing method further includes:
  • the historical data version switching instruction may be sent by a user to a device executing the data processing method, or may be automatically generated periodically by the device executing the data processing method, which is not specifically limited in this embodiment;
  • the specified version identification data in the valid version identification chain list is deleted to obtain the valid version identification chain list after deleting the specified version identification data;
  • the business key mapping table is regenerated according to the valid version identification chain list and the version identification mapping table after the specified version identification data is deleted.
  • the historical data version switching instruction includes a "rollback specified version identification data instruction” and a “rollback to specified version identification data instruction”, wherein, according to the historical data version switching instruction, the specified version identification data in the valid version identification linked list is deleted, and the valid version identification linked list after deleting the specified version identification data is obtained, specifically:
  • the historical data version switching instruction is a "roll back specified version identification data instruction”
  • the specified version identification data required to be deleted by the "roll back specified version identification data instruction" in the valid version identification chain table is deleted, and the valid version identification chain table after deleting the specified version identification data is obtained, and the valid version identification chain table after deleting the specified version identification data and the version identification mapping are used to convert the specified version identification data into a valid version identification chain table.
  • the historical data version switching instruction is the "roll back to the specified version identification data instruction”
  • all version identification data that are arranged after the specified version identification data and that the "roll back to the specified version identification data instruction" requires to be deleted in the valid version identification linked list will be deleted, and based on the valid version identification linked list and the version identification mapping table that have deleted all version identification data that are arranged after the specified version identification data, the business key mapping table will be regenerated and the cache will be refreshed.
  • the above method further realizes the control of data version and the real-time effectiveness of data, retains historical data, effectively reduces the risks brought about by the configuration process, and ensures the persistence and integrity of system data.
  • the data processing method further includes:
  • the business key value is obtained
  • the data version identifier is matched in the version identifier mapping table according to the business key. When there is no match result, the data version identifier is the basic data version identifier.
  • the cache is queried by the data version identifier and the business key.
  • a data processing device 400 is also provided in the embodiment of the present application, which is applied to the middle-office system, and the middle-office system is communicatively connected with the peripheral system.
  • the data processing device 400 includes an update information sending module 401, an effectiveness information sending module 402 and a task status update module 403.
  • the update information sending module 401 is used to send data update notification information to the peripheral system, and the data update notification information is used to notify the peripheral system to receive the to-be-processed data in the to-be-processed data set from a preset object storage medium.
  • the validity information sending module 402 is used to send data validity notification information to the peripheral system if it is determined that the peripheral system has received all the to-be-processed data in the to-be-processed data set.
  • the data validity notification information is used to notify the peripheral system to validate all the received to-be-processed data.
  • the task status updating module 403 is used to update the data processing task status corresponding to the to-be-processed data set to be effective if it is determined that the peripheral system has effective all the to-be-processed data in the to-be-processed data set.
  • This application stores the data to be processed in an object storage medium that is available for external download. It is easy to expand and compatible, and is convenient for processing large amounts of data. It allows the task to take effect only after it is determined that the peripheral system has received all the data to be processed, thereby ensuring the atomic effectiveness of large quantities of different types of data, and ensuring the correctness, persistence and integrity of the data; it implements data version management, retains historical data, effectively reduces the risks brought about by the configuration process, and ensures the persistence and integrity of the data of the middle-end system and the peripheral system.
  • the data processing device 400 also includes a data configuration module 404, which is specifically used to: configure multiple data to be processed to obtain a data set to be processed; package the data set to be processed, and upload the configured data set to be processed to the object storage medium.
  • a data configuration module 404 which is specifically used to: configure multiple data to be processed to obtain a data set to be processed; package the data set to be processed, and upload the configured data set to be processed to the object storage medium.
  • the update information sending module 401 is specifically used to: send data update notification information to the data update message queue, so as to send the data update notification information to the peripheral system through the data update message queue.
  • the data processing device 400 also includes a data reception determination module 405, which is specifically used to: receive data received information from the callback status message queue, wherein when the peripheral system completes the reception task of one of the to-be-processed data in the to-be-processed data set, the callback status message queue receives data received information from the peripheral system once; if all the data received information in the callback status message queue is received, it is determined that the peripheral system has received all the data in the to-be-processed data set. Data to be processed.
  • a data reception determination module 405 which is specifically used to: receive data received information from the callback status message queue, wherein when the peripheral system completes the reception task of one of the to-be-processed data in the to-be-processed data set, the callback status message queue receives data received information from the peripheral system once; if all the data received information in the callback status message queue is received, it is determined that the peripheral system has received all the data in the to-be-processed data set. Data
  • the effectiveness information sending module 402 is specifically used to: if it is determined that the peripheral system has received all the data to be processed in the data set to be processed, send data effectiveness notification information to the data effectiveness message queue, so as to send the data effectiveness notification information to the peripheral system through the data effectiveness message queue.
  • the data processing device 400 also includes a data effectiveness determination module 406, which is specifically used to: receive data effectiveness information from the callback status message queue, wherein when the peripheral system completes the effectiveness task of one of the pending data in the pending data set, the callback status message queue receives the data effectiveness information from the peripheral system; if the data effectiveness information in the callback status message queue has been received, it is determined that the peripheral system has effective all the pending data in the pending data set.
  • a data effectiveness determination module 406 is specifically used to: receive data effectiveness information from the callback status message queue, wherein when the peripheral system completes the effectiveness task of one of the pending data in the pending data set, the callback status message queue receives the data effectiveness information from the peripheral system; if the data effectiveness information in the callback status message queue has been received, it is determined that the peripheral system has effective all the pending data in the pending data set.
  • a data processing device 500 is also provided in the embodiment of the present application, which is applied to the peripheral system, and the peripheral system is communicatively connected with the middle system.
  • the data processing device 500 includes an update information receiving module 501, a data receiving module 502, a received information sending module 503, an effective information receiving module 504, a data effective module 505 and a data table update module 506.
  • the update information receiving module 501 is used to receive data update notification information.
  • the data receiving module 502 is used to receive the to-be-processed data in the to-be-processed data set from a preset object storage medium according to the data update notification information.
  • the receiving information sending module 503 is used to send data reception information to the middle station system when the data to be processed is received.
  • the validity information receiving module 504 is used to receive data validity notification information.
  • the data validation module 505 is used to validate all received data to be processed according to the data validation notification information.
  • the data table updating module 506 is used to update the data version management table in the preset database if all the data to be processed in the data set to be processed have become effective.
  • the data version management table includes a version identification mapping table
  • the data to be processed includes a business key
  • the data set to be processed includes a current data version identification
  • the data processing device 500 also includes a synchronous update module 507, which is specifically used to: synchronously save the business key and the current data version identification to the version identification mapping table.
  • the data version management table also includes a valid version identifier linked list and a business key mapping table
  • the data table update module 506 is specifically used to: add the current data version identifier corresponding to the effective set of data to be processed to the valid version identifier linked list; generate a business key mapping table based on the valid version identifier linked list and the version identifier mapping table.
  • the business key mapping table includes a basic data version identifier
  • the data table update module 506 is also used to: query from the valid version identifier linked list to obtain the first target data within the first target historical time, the first target historical time is N days before the last data update, and N is a natural number; match the target business key associated with the first target data and the latest version identification data of the target business key from the version identification mapping table; and use the latest version identification data of the target business key as the new basic data version identifier of the business key mapping table.
  • the data table update module 506 is further used to: query from the version identification mapping table to obtain the second target data within the second target historical time, where the second target historical time is M days before the last data update, where M is a natural number; match from the valid version identification linked list to obtain at least one target version identification data associated with the second target data; filter the target version identification data in the effective state from the at least one target version identification data to obtain the filtered at least one target version identification data. deleting all data in the version identification mapping table associated with at least one target version identification data after filtering.
  • the data table update module 506 is also used to: obtain historical data version switching instructions; delete specified version identification data in the valid version identification list according to the historical data version switching instructions, and obtain the valid version identification list after deleting the specified version identification data; regenerate the business key mapping table according to the valid version identification list and the version identification mapping table after deleting the specified version identification data.
  • the present application further provides an electronic device 600, which shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:
  • the electronic device may include components such as a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, a power supply 603, and an input unit 604.
  • a processor 601 with one or more processing cores
  • a memory 602 with one or more computer-readable storage media
  • a power supply 603 with one or more computer-readable storage media
  • FIG8 does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
  • the processor 601 is the control center of the electronic device, and uses various interfaces and lines to connect the various parts of the entire electronic device. By running or executing the software programs and/or modules stored in the memory 602, and calling the data stored in the memory 602, the processor 601 performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole.
  • the processor 601 may include one or more processing cores; the processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • CPU central processing unit
  • DSP digital signal processors
  • ASIC application-specific integrated circuits
  • FPGA field-programmable gate arrays
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
  • the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 601.
  • the memory 602 can be used to store software programs and modules.
  • the processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602.
  • the memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc.
  • the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.
  • the electronic device also includes a power supply 603 for supplying power to each component.
  • the power supply 603 can be logically connected to the processor 601 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions.
  • the power supply 603 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
  • the electronic device may further include an input unit 604, which may be used to receive input digital or character information. and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • an input unit 604 which may be used to receive input digital or character information. and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • the electronic device may further include a display unit, etc., which will not be described in detail here.
  • the processor 601 in the electronic device will load the executable files corresponding to the processes of one or more applications into the memory 602 according to the following instructions, and the processor 601 will run the application stored in the memory 602 to implement various functions, as follows:
  • data validity notification information is sent to the peripheral system, where the data validity notification information is used to notify the peripheral system to validate all the to-be-processed data that have been received;
  • the data processing task status corresponding to the to-be-processed data set is updated to validated.
  • the processor 601 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 601 will run the application programs stored in the memory 602, thereby realizing various functions, as follows:
  • the data reception information is sent to the middle office system
  • the data version management table in the preset database is updated.
  • the present application also provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
  • ROM read-only memory
  • RAM random access memory
  • a computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the data processing method provided in the embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present application provides a data processing method and apparatus, an electronic device, and a storage medium. The method comprises: sending data update notification information to a peripheral system; if it is determined that the peripheral system has received all data to be processed in a set of data to be processed, sending data take-effect notification information to the peripheral system; and if it is determined that the peripheral system has enabled all the data to be processed in the set of data to be processed to take effect, updating a data processing task state corresponding to the set of data to be processed to have taken effect. According to the present application, data processing of a large data volume is facilitated, and after it is determined that all the data to be processed has been received by the peripheral system, the task is allowed to take effect, so that it is ensured that the atomicity of a large batch of different types of data takes effect, and the correctness, durability and integrity of the data are ensured; data version management is realized, and the durability and integrity of the data are ensured.

Description

数据处理方法、装置、电子设备及存储介质Data processing method, device, electronic device and storage medium 技术领域Technical Field
本申请涉及计算机技术领域,具体涉及一种数据处理方法、装置、电子设备及存储介质。The present application relates to the field of computer technology, and in particular to a data processing method, device, electronic device and storage medium.
发明背景Background of the Invention
随着技术发展,人们的日常生活逐渐开始使用各种不同的系统以提高生产效率,系统应用过程中,通常会伴随着系统的稳定性、系统的数据安全性、系统的操作灵活性等各种需要优化的问题。With the development of technology, people's daily lives have gradually begun to use various systems to improve production efficiency. During the system application process, there are usually various issues that need to be optimized, such as system stability, system data security, and system operational flexibility.
由于数据对于中台的重要性,数据的错误配置会导致生产事故的频繁发生,即会影响客户体验,也会导致企业损收,因此保证数据的正确性、持久性及完整性将是一个亟待解决的重要问题;对于中台数据来说,数据量大且数据种类繁多,同时要保证多个基于英特网(Inetnret)超文本分布式信息系统(World Wide Web,Web)应用中数据的一致性和完整性,现有的数据处理方法的解决方案大多只适用于单一类型数据且数据量较小的情况下版本控制,或者是将数据操作日志同步到分布式开源数据库(Hbase)中进行存储,但也只是数据的备份,并不能使其实时进行生效使用,因此现有的数据版本控制方法无法适用于中台数据。Due to the importance of data to the middle platform, incorrect configuration of data will lead to frequent production accidents, which will affect customer experience and cause corporate revenue losses. Therefore, ensuring the correctness, persistence and integrity of data will be an important issue that needs to be solved urgently. For the middle platform data, the data volume is large and the data types are diverse. At the same time, it is necessary to ensure the consistency and integrity of data in multiple Internet (Inetnret) hypertext distributed information system (World Wide Web, Web) applications. Most of the existing data processing solutions are only applicable to version control when the data is of a single type and the data volume is small, or the data operation log is synchronized to a distributed open source database (Hbase) for storage, but it is only a backup of the data and cannot be used in real time. Therefore, the existing data version control method cannot be applied to the middle platform data.
发明内容Summary of the invention
本申请提供一种能够保证多个分布式信息系统应用中数据的一致性、完整性、正确性和持久性,并将数据实时在各个服务进行生效的一种数据处理方法、装置、电子设备及存储介质。The present application provides a data processing method, device, electronic device and storage medium that can ensure the consistency, integrity, correctness and persistence of data in multiple distributed information system applications, and make the data effective in each service in real time.
一方面,本申请提供一种数据处理方法,应用于中台系统,所述中台系统与外围系统通信连接,所述方法包括:发送数据更新通知信息至所述外围系统,所述数据更新通知信息用于通知所述外围系统从预设的对象存储介质中接收待处理数据集合中的待处理数据;若确定所述外围系统已接收所述待处理数据集合中的所有待处理数据,发送所述数据生效通知信息至所述外围系统,所述数据生效通知信息用于通知所述外围系统生效已接收的所有所述待处理数据;若确定所述外围系统已生效所述待处理数据集合中的所有所述待处理数据,将与所述待处理数据集合对应的数据处理任务状态更新为已生效。On the one hand, the present application provides a data processing method, which is applied to a middle-office system, wherein the middle-office system is communicatively connected to a peripheral system, and the method includes: sending data update notification information to the peripheral system, wherein the data update notification information is used to notify the peripheral system to receive the pending data in the pending data set from a preset object storage medium; if it is determined that the peripheral system has received all the pending data in the pending data set, sending the data validity notification information to the peripheral system, wherein the data validity notification information is used to notify the peripheral system to validate all the pending data that have been received; if it is determined that the peripheral system has validated all the pending data in the pending data set, updating the data processing task status corresponding to the pending data set to validated.
在本申请一种可能的实现方式中,在所述发送数据更新通知信息至所述外围系统之前,所述方法还包括:配置多个所述待处理数据,得到所述待处理数据集合;将所述待处理数据集合打包,并将已配置完成的所述待处理数据集合上传至所述对象存储介质中。In a possible implementation of the present application, before sending the data update notification information to the peripheral system, the method also includes: configuring multiple data to be processed to obtain the data set to be processed; packaging the data set to be processed, and uploading the configured data set to be processed to the object storage medium.
在本申请一种可能的实现方式中,所述发送数据更新通知信息至所述外围系统,包括:发送所述数据更新通知信息至数据更新消息队列,以通过所述数据更新消息队列发送所述数据更新通知信息至所述外围系统。 In a possible implementation of the present application, the sending of the data update notification information to the peripheral system includes: sending the data update notification information to a data update message queue, so as to send the data update notification information to the peripheral system through the data update message queue.
在本申请一种可能的实现方式中,在所述若确定所述外围系统已接收所述待处理数据集合中的所有待处理数据,发送所述数据生效通知信息至所述外围系统之前,所述方法还包括:从回调状态消息队列中接收数据已接收信息,其中,当所述外围系统完成所述待处理数据集合中的一个所述待处理数据的接收任务时,所述回调状态消息队列从所述外围系统接收一次所述数据已接收信息;若所述回调状态消息队列中的所有所述数据已接收信息均接收完毕,则确定所述外围系统已接收所述待处理数据集合中的所有所述待处理数据。In a possible implementation of the present application, if it is determined that the peripheral system has received all the pending data in the pending data set, before sending the data effectiveness notification information to the peripheral system, the method also includes: receiving data received information from the callback status message queue, wherein, when the peripheral system completes the task of receiving one of the pending data in the pending data set, the callback status message queue receives the data received information from the peripheral system once; if all the data received information in the callback status message queue has been received, it is determined that the peripheral system has received all the pending data in the pending data set.
在本申请一种可能的实现方式中,所述若确定所述外围系统已接收所述待处理数据集合中的所有待处理数据,发送所述数据生效通知信息至所述外围系统,包括:若确定所述外围系统已接收所述待处理数据集合中的所有待处理数据,发送所述数据生效通知信息至数据生效消息队列,以通过所述数据生效消息队列发送所述数据生效通知信息至所述外围系统。In a possible implementation of the present application, if it is determined that the peripheral system has received all the data to be processed in the data set to be processed, sending the data validity notification information to the peripheral system includes: if it is determined that the peripheral system has received all the data to be processed in the data set to be processed, sending the data validity notification information to the data validity message queue, so as to send the data validity notification information to the peripheral system through the data validity message queue.
在本申请一种可能的实现方式中,在所述若确定所述外围系统已生效所述待处理数据集合中的所有所述待处理数据,将与所述待处理数据集合对应的数据处理任务状态更新为已生效之前,所述方法还包括:从所述回调状态消息队列中接收数据已生效信息,其中,当所述外围系统完成所述待处理数据集合中的一个所述待处理数据的生效任务时,所述回调状态消息队列从所述外围系统接收所述数据已生效信息;若所述回调状态消息队列中的所述数据已生效信息接收完毕,则确定所述外围系统已生效所述待处理数据集合中的所有所述待处理数据。In a possible implementation of the present application, if it is determined that the peripheral system has validated all the pending data in the pending data set, before updating the data processing task status corresponding to the pending data set to be validated, the method also includes: receiving data validation information from the callback status message queue, wherein when the peripheral system completes the validation task of one of the pending data in the pending data set, the callback status message queue receives the data validation information from the peripheral system; if the data validation information in the callback status message queue is received, it is determined that the peripheral system has validated all the pending data in the pending data set.
另一方面,本申请提供一种数据处理方法,应用于外围系统,所述外围系统与中台系统通信连接,所述方法包括:接收数据更新通知信息;根据所述数据更新通知信息,从预设的对象存储介质中接收待处理数据集合中的待处理数据;当所述待处理数据接收完毕时,发送数据已接收信息至所述中台系统;接收数据生效通知信息;根据所述数据生效通知信息,生效已接收的所有所述待处理数据;若所述待处理数据集合中的所有所述待处理数据均已生效时,对预设数据库中的数据版本管理表进行更新。On the other hand, the present application provides a data processing method, which is applied to a peripheral system, and the peripheral system is communicatively connected to the middle-office system. The method includes: receiving data update notification information; receiving the to-be-processed data in the to-be-processed data set from a preset object storage medium according to the data update notification information; when the to-be-processed data is received, sending data received information to the middle-office system; receiving data validity notification information; according to the data validity notification information, validating all the to-be-processed data that have been received; if all the to-be-processed data in the to-be-processed data set have been valid, updating the data version management table in the preset database.
在本申请一种可能的实现方式中,所述数据版本管理表包括版本标识映射表,所述待处理数据包括业务键,所述待处理数据集合包括当前数据版本标识,在所述根据所述数据更新通知信息,从预设的对象存储介质中接收待处理数据集合中的待处理数据之后,所述方法还包括:将所述业务键和所述当前数据版本标识同步保存至所述版本标识映射表。In a possible implementation of the present application, the data version management table includes a version identification mapping table, the data to be processed includes a business key, and the data set to be processed includes a current data version identification. After receiving the data to be processed in the data set to be processed from a preset object storage medium according to the data update notification information, the method also includes: synchronously saving the business key and the current data version identification to the version identification mapping table.
在本申请一种可能的实现方式中,所述数据版本管理表还包括有效版本标识链表和业务键映射表,所述若所述待处理数据集合中的所有所述待处理数据均已生效时,对预设数据库中的数据版本管理表进行更新,包括:将已生效的待处理数据集合所对应的所述当前数据版本标识添加至所述有效版本标识链表;根据所述有效版本标识链表和所述版本标识映射表,生成所述业务键映射表。In a possible implementation of the present application, the data version management table also includes a valid version identification linked list and a business key mapping table. If all the data to be processed in the data set to be processed have become effective, the data version management table in the preset database is updated, including: adding the current data version identification corresponding to the effective data set to be processed to the valid version identification linked list; generating the business key mapping table based on the valid version identification linked list and the version identification mapping table.
在本申请一种可能的实现方式中,所述业务键映射表包括基础数据版本标识,所述方法还包括:从所述有效版本标识链表中查询得到第一目标历史时间内的第一目标数据,所述第一目标历史时间为最后一次进行数据更新的前N天,N为自然数;从所述版本标识映射表中匹配得到与所述第一目标数据关联的目标业务键和所述目标业务键的最新版本标识数据;将所述目标 业务键的所述最新版本标识数据作为所述业务键映射表的新的所述基础数据版本标识。In a possible implementation of the present application, the business key mapping table includes a basic data version identifier, and the method further includes: querying from the valid version identifier linked list to obtain first target data within a first target historical time, where the first target historical time is N days before the last data update, where N is a natural number; matching from the version identifier mapping table to obtain a target business key associated with the first target data and the latest version identifier data of the target business key; and matching the target business key associated with the first target data to the latest version identifier data of the target business key; The latest version identification data of the business key is used as the new basic data version identification of the business key mapping table.
在本申请一种可能的实现方式中,所述方法还包括:从所述版本标识映射表中查询得到第二目标历史时间内的第二目标数据,所述第二目标历史时间为最后一次进行数据更新的前M天,M为自然数;从所述有效版本标识链表中匹配得到与所述第二目标数据关联的至少一个目标版本标识数据;过滤至少一个所述目标版本标识数据中处于生效状态的所述目标版本标识数据,得到过滤后的至少一个所述目标版本标识数据;删除所述版本标识映射表中与过滤后的至少一个所述目标版本标识数据关联的所有数据。In a possible implementation of the present application, the method also includes: querying from the version identification mapping table to obtain second target data within a second target historical time, where the second target historical time is M days before the last data update, and M is a natural number; matching from the valid version identification linked list to obtain at least one target version identification data associated with the second target data; filtering at least one target version identification data that is in an effective state to obtain at least one filtered target version identification data; deleting all data in the version identification mapping table that is associated with at least one filtered target version identification data.
在本申请一种可能的实现方式中,所述方法还包括:获取历史数据版本切换指令;根据所述历史数据版本切换指令,删除所述有效版本标识链表中指定版本标识数据,得到删除所述指定版本标识数据后的所述有效版本标识链表;根据删除所述指定版本标识数据后的所述有效版本标识链表和所述版本标识映射表,重新生成所述业务键映射表。In a possible implementation of the present application, the method also includes: obtaining a historical data version switching instruction; deleting the specified version identification data in the valid version identification linked list according to the historical data version switching instruction, and obtaining the valid version identification linked list after deleting the specified version identification data; and regenerating the business key mapping table according to the valid version identification linked list after deleting the specified version identification data and the version identification mapping table.
另一方面,本申请提供一种数据处理装置,应用于中台系统,所述中台系统与外围系统通信连接,所述数据处理装置包括:更新信息发送模块,用于发送数据更新通知信息至所述外围系统,所述数据更新通知信息用于通知所述外围系统从预设的对象存储介质中接收待处理数据集合中的待处理数据;生效信息发送模块,用于若确定所述外围系统已接收所述待处理数据集合中的所有待处理数据,发送所述数据生效通知信息至所述外围系统,所述数据生效通知信息用于通知所述外围系统生效已接收的所有所述待处理数据;任务状态更新模块,用于若确定所述外围系统已生效所述待处理数据集合中的所有所述待处理数据,将与所述待处理数据集合对应的数据处理任务状态更新为已生效。On the other hand, the present application provides a data processing device, which is applied to a middle-office system, and the middle-office system is communicatively connected to a peripheral system. The data processing device includes: an update information sending module, which is used to send data update notification information to the peripheral system, and the data update notification information is used to notify the peripheral system to receive the pending data in the pending data set from a preset object storage medium; an effectiveness information sending module, which is used to send the data effectiveness notification information to the peripheral system if it is determined that the peripheral system has received all the pending data in the pending data set, and the data effectiveness notification information is used to notify the peripheral system to validate all the pending data that have been received; a task status updating module, which is used to update the data processing task status corresponding to the pending data set to effective if it is determined that the peripheral system has validated all the pending data in the pending data set.
另一方面,本申请提供一种数据处理装置,应用于外围系统,所述外围系统与中台系统通信连接,所述数据处理装置包括:更新信息接收模块,用于接收数据更新通知信息;数据接收模块,用于根据所述数据更新通知信息,从预设的对象存储介质中接收待处理数据集合中的待处理数据;接收信息发送模块,用于当所述待处理数据接收完毕时,发送数据已接收信息至所述中台系统;生效信息接收模块,用于接收数据生效通知信息;数据生效模块,用于根据所述数据生效通知信息,生效已接收的所有所述待处理数据;数据表更新模块,用于若所述待处理数据集合中的所有所述待处理数据均已生效时,对预设数据库中的数据版本管理表进行更新。On the other hand, the present application provides a data processing device, which is applied to a peripheral system, and the peripheral system is communicatively connected to the middle-office system. The data processing device includes: an update information receiving module, which is used to receive data update notification information; a data receiving module, which is used to receive the pending data in the pending data set from a preset object storage medium according to the data update notification information; a received information sending module, which is used to send data received information to the middle-office system when the pending data is received; an effective information receiving module, which is used to receive data effective notification information; a data effective module, which is used to effective all the pending data that have been received according to the data effective notification information; a data table updating module, which is used to update the data version management table in the preset database if all the pending data in the pending data set have been effective.
另一方面,本申请提供一种电子设备,包括:一个或多个处理器;存储器;以及一个或多个应用程序,其中所述一个或多个应用程序被存储于所述存储器中,并配置为由所述处理器执行以实现上述任一实施例所述的数据处理方法。On the other hand, the present application provides an electronic device, comprising: one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the data processing method described in any of the above embodiments.
另一方面,本申请提供一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行上述任一实施例所述的数据处理方法。On the other hand, the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the data processing method described in any of the above embodiments.
本申请通过发送数据更新通知信息至外围系统,数据更新通知信息用于通知外围系统从预设的对象存储介质中接收待处理数据集合中的待处理数据;若确定外围系统已接收待处理数据集合中的所有待处理数据,发送数据生效通知信息至外围系统,数据生效通知信息用于通知外围系统生效已接收的所有待处理数据;若确定外围系统已生效待处理数据集合中的所有待处理 数据,将与待处理数据集合对应的数据处理任务状态更新为已生效,即本申请将待处理数据存储于对外提供下载的对象存储介质中,易于扩展与兼容,便于大数据量的数据处理,确定了外围系统已接收完毕所有待处理数据之后再允许任务生效,保证了大批量不同类型数据的原子性生效,且保证了数据的正确性、持久性和完整性;实现了数据版本管理,保留了历史数据,有效的降低了配置过程中带来的风险,保证了中台系统和外围系统数据的持久性及完整性。The present application sends data update notification information to the peripheral system, and the data update notification information is used to notify the peripheral system to receive the pending data in the pending data set from the preset object storage medium; if it is determined that the peripheral system has received all the pending data in the pending data set, a data validity notification information is sent to the peripheral system, and the data validity notification information is used to notify the peripheral system to validate all the pending data received; if it is determined that the peripheral system has validated all the pending data in the pending data set Data, updates the data processing task status corresponding to the set of data to be processed to effective, that is, this application stores the data to be processed in an object storage medium that is available for external download, which is easy to expand and compatible, and convenient for processing large amounts of data. It determines that the task is allowed to take effect only after the peripheral system has received all the data to be processed, ensuring the atomic effectiveness of large quantities of different types of data, and ensuring the correctness, persistence and integrity of the data; it implements data version management, retains historical data, effectively reduces the risks brought about by the configuration process, and ensures the persistence and integrity of the data of the middle-office system and the peripheral system.
附图简要说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。数据处理装置In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
图1是本申请一实施例提供的中台系统的应用场景示意图。FIG1 is a schematic diagram of an application scenario of a middle platform system provided in an embodiment of the present application.
图2是本申请一实施例提供的数据处理系统的应用场景示意图。FIG. 2 is a schematic diagram of an application scenario of a data processing system provided in an embodiment of the present application.
图3是本申请一实施例提供的数据处理方法的流程示意图。FIG3 is a flow chart of a data processing method provided in an embodiment of the present application.
图4是本申请另一实施例提供的数据处理方法的流程示意图。FIG. 4 is a flow chart of a data processing method provided in another embodiment of the present application.
图5是本申请另一实施例提供的数据处理方法的流程示意图。FIG5 is a flow chart of a data processing method provided in another embodiment of the present application.
图6是本申请另一实施例提供的数据处理装置的结构示意图。FIG6 is a schematic diagram of the structure of a data processing device provided in another embodiment of the present application.
图7是本申请另一实施例提供的数据处理装置的结构示意图。FIG. 7 is a schematic diagram of the structure of a data processing device provided in another embodiment of the present application.
图8是本申请一实施例中提供的电子设备的结构示意图。FIG. 8 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
实施本发明的方式Mode for Carrying Out the Invention
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
在本申请的描述中,需要理解的是,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个所述特征。在本申请的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。In the description of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
在本申请中,“示例性”一词用来表示“用作例子、例证或说明”。本申请中被描述为“示例性”的任何实施例不一定被解释为比其它实施例更优选或更具优势。为了使本领域任何技术人员能够实现和使用本申请,给出了以下描述。在以下描述中,为了解释的目的而列出了细节。应当明白的是,本领域普通技术人员可以认识到,在不使用这些特定细节的情况下也可以实现本申请。在其它实例中,不会对公知的结构和过程进行详细阐述,以避免不必要的细节使本申请的 描述变得晦涩。因此,本申请并非旨在限于所示的实施例,而是与符合本申请所公开的原理和特征的最广范围相一致。In this application, the word "exemplary" is used to mean "serving as an example, illustration, or description." Any embodiment described in this application as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is given to enable any person skilled in the art to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that one of ordinary skill in the art can recognize that the present application can be implemented without these specific details. In other instances, well-known structures and processes are not described in detail to avoid obscuring the present application with unnecessary detail. Therefore, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
中台系统,从字面意思上理解,是位于前台系统和后台系统之间,如图1所示,前台系统可以是多个外围系统,应用过程中,从后台系统将数据流入中台系统,完成海量数据的存储、计算、产品化包装过程,构成企业的核心数据能力,为多个外围系统基于数据的定制化创新和业务中台基于数据反馈的持续演进提供了强大支撑。对于中台系统的数据来说,数据量大且数据种类繁多,同时要保证多个分布式网络应用中数据的一致性和完整性,因此现有的数据处理方法对于中台系统的数据根本无法适用。The middle platform system, literally speaking, is located between the front-end system and the back-end system. As shown in Figure 1, the front-end system can be multiple peripheral systems. During the application process, data flows from the back-end system into the middle platform system to complete the storage, calculation, and product packaging of massive data, forming the core data capabilities of the enterprise, and providing strong support for the customized innovation of multiple peripheral systems based on data and the continuous evolution of the business middle platform based on data feedback. For the data of the middle platform system, the data volume is large and the data types are diverse. At the same time, the consistency and integrity of the data in multiple distributed network applications must be guaranteed. Therefore, the existing data processing methods are not applicable to the data of the middle platform system at all.
为了解决上述问题,本申请实施例提供一种数据处理方法、装置、电子设备及存储介质,以下分别进行详细说明。In order to solve the above problems, the embodiments of the present application provide a data processing method, device, electronic device and storage medium, which are described in detail below.
本申请实施例数据处理方法的执行主体可以为本申请实施例提供的数据处理装置,或者集成了该数据处理装置的服务器设备、物理主机或者用户设备(User Equipment,UE)等不同类型的电子设备,其中,数据处理装置可以采用硬件或者软件的方式实现,UE具体可以为智能手机、平板电脑、笔记本电脑、掌上电脑、台式电脑或者个人数字助理(Personal Digital Assistant,PDA)等终端设备。The executor of the data processing method of the embodiment of the present application may be the data processing device provided in the embodiment of the present application, or different types of electronic devices such as a server device, a physical host or a user equipment (UE) that integrates the data processing device, wherein the data processing device may be implemented in hardware or software, and the UE may specifically be a terminal device such as a smart phone, a tablet computer, a laptop computer, a PDA, a desktop computer or a personal digital assistant (PDA).
该电子设备可以采用单独运行的工作方式,或者也可以采用设备集群的工作方式。The electronic device may work in a single operation mode or in a device cluster mode.
如图2所示,图2是本申请一实施例提供的数据处理系统的场景示意图。其中,该数据处理系统可以包括用于完成数据处理方法的电子设备100,电子设备100中集成有数据处理装置。例如,该电子设备可以用于发送数据更新通知信息至外围系统,数据更新通知信息用于通知外围系统从预设的对象存储介质中接收待处理数据集合中的待处理数据;若确定外围系统已接收待处理数据集合中的所有待处理数据,发送数据生效通知信息至外围系统,数据生效通知信息用于通知外围系统生效已接收的所有待处理数据;若确定外围系统已生效待处理数据集合中的所有待处理数据,将与待处理数据集合对应的数据处理任务状态更新为已生效。As shown in Figure 2, Figure 2 is a scene diagram of a data processing system provided by an embodiment of the present application. Among them, the data processing system may include an electronic device 100 for completing the data processing method, and a data processing device is integrated in the electronic device 100. For example, the electronic device can be used to send data update notification information to the peripheral system, and the data update notification information is used to notify the peripheral system to receive the pending data in the pending data set from the preset object storage medium; if it is determined that the peripheral system has received all the pending data in the pending data set, send data validity notification information to the peripheral system, and the data validity notification information is used to notify the peripheral system to validate all the received pending data; if it is determined that the peripheral system has validated all the pending data in the pending data set, update the data processing task status corresponding to the pending data set to be validated.
另外,如图2所示,该数据处理系统还可以包括存储器200,用于存储数据,如存储业务中台相关的业务数据以及其他数据等。In addition, as shown in FIG. 2 , the data processing system may further include a memory 200 for storing data, such as business data related to the business middle station and other data.
需要说明的是,图2所示的数据处理系统的场景示意图仅仅是一个示例,本申请实施例描述的数据处理系统以及场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着数据处理系统的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。It should be noted that the scenario diagram of the data processing system shown in Figure 2 is merely an example. The data processing system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of data processing systems and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
下面,开始介绍本申请实施例提供的数据处理方法,本申请实施例中以电子设备作为执行主体,为了简化与便于描述,后续方法实施例中将省略该执行主体,该数据处理方法包括:发送数据更新通知信息至外围系统,数据更新通知信息用于通知外围系统从预设的对象存储介质中接收待处理数据集合中的待处理数据;若确定外围系统已接收待处理数据集合中的所有待处理数据,发送数据生效通知信息至外围系统,数据生效通知信息用于通知外围系统生效已接收的所有待处理数据;若确定外围系统已生效待处理数据集合中的所有待处理数据,将与待处理 数据集合对应的数据处理任务状态更新为已生效。Next, we will introduce the data processing method provided by the embodiment of the present application. In the embodiment of the present application, an electronic device is used as the execution subject. For the sake of simplicity and ease of description, the execution subject will be omitted in the subsequent method embodiments. The data processing method includes: sending data update notification information to the peripheral system, the data update notification information is used to notify the peripheral system to receive the pending data in the pending data set from the preset object storage medium; if it is determined that the peripheral system has received all the pending data in the pending data set, sending data validity notification information to the peripheral system, the data validity notification information is used to notify the peripheral system to validate all the received pending data; if it is determined that the peripheral system has validated all the pending data in the pending data set, it will be processed together with the pending data. The data processing task status corresponding to the data collection is updated to effective.
本申请将待处理数据存储于对外提供下载的对象存储介质中,易于扩展与兼容,便于大数据量的数据处理,确定了外围系统已接收完毕所有待处理数据之后再允许任务生效,保证了大批量不同类型数据的原子性生效,且保证了数据的正确性、持久性和完整性;实现了数据版本管理,保留了历史数据,有效的降低了配置过程中带来的风险,保证了中台系统和外围系统数据的持久性及完整性。This application stores the data to be processed in an object storage medium that is available for external download. It is easy to expand and compatible, and is convenient for processing large amounts of data. It allows the task to take effect only after it is determined that the peripheral system has received all the data to be processed, thereby ensuring the atomic effectiveness of large quantities of different types of data, and ensuring the correctness, persistence and integrity of the data; it implements data version management, retains historical data, effectively reduces the risks brought about by the configuration process, and ensures the persistence and integrity of the data of the middle-end system and the peripheral system.
如图3和图4所示,图3和图4均是本申请实施例提供的数据处理方法的一种流程示意图。需要说明的是,虽然流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。该数据处理方法应用于中台系统,中台系统与外围系统通信连接,如图3所示,该方法具体包括步骤S201~S203。As shown in Figures 3 and 4, Figures 3 and 4 are both flowcharts of the data processing method provided in an embodiment of the present application. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that here. The data processing method is applied to the middle station system, which is communicatively connected with the peripheral system, as shown in Figure 3, and the method specifically includes steps S201 to S203.
S201、发送数据更新通知信息至外围系统,数据更新通知信息用于通知外围系统从预设的对象存储介质中接收待处理数据集合中的待处理数据。S201. Send data update notification information to a peripheral system, where the data update notification information is used to notify the peripheral system to receive the to-be-processed data in the to-be-processed data set from a preset object storage medium.
待处理数据为需要在外围系统配置和生效的数据;待处理数据集为同一批次的多个待处理数据构成的合集。The data to be processed is the data that needs to be configured and effective in the peripheral system; the data set to be processed is a collection of multiple data to be processed in the same batch.
在本实施例中,待处理数据集中的多个待处理数据可以是相同类型的数据,也可以是不同类型的数据,待处理数据集中的待处理数据可以包括各种各样的业务数据,示例性的,待处理数据可以为应用于价格的业务数据,也可以为应用于产品和时效的业务数据等,本实施例对此不做具体限定。In this embodiment, the multiple data to be processed in the data set to be processed may be data of the same type or data of different types. The data to be processed in the data set to be processed may include various business data. For example, the data to be processed may be business data applied to prices, or business data applied to products and timeliness, etc. This embodiment does not make any specific limitations on this.
为了实现大量不同类型待处理数据的存储和配置,以及便于多个不同的外围系统同时进行不同类型数据的同步和实时生效,在本实施例中,中台系统将待处理数据集配置生成文件并上传至对象存储介质中,当中台系统通知多个外围系统有数据更新时,通过对象存储介质分别下发对应的文件至多个外围系统。In order to realize the storage and configuration of a large number of different types of data to be processed, and to facilitate the synchronization and real-time effectiveness of different types of data in multiple different peripheral systems at the same time, in this embodiment, the middle-office system generates a file for the configuration of the data set to be processed and uploads it to the object storage medium. When the middle-office system notifies multiple peripheral systems that there is a data update, the corresponding files are sent to the multiple peripheral systems through the object storage medium.
因此,在本实施例中,在发送数据更新通知信息至外围系统之前,该方法还包括:配置多个待处理数据,得到待处理数据集合;将待处理数据集合打包,并将已配置完成的待处理数据集合上传至对象存储介质中。Therefore, in this embodiment, before sending data update notification information to the peripheral system, the method also includes: configuring multiple data to be processed to obtain a set of data to be processed; packaging the set of data to be processed, and uploading the configured set of data to be processed to the object storage medium.
配置多个待处理数据,得到待处理数据集合,具体为:Configure multiple data to be processed to obtain a set of data to be processed, specifically:
用户可在中台系统创建数据配置任务,根据不同的待处理数据,配置不同的业务键,业务键是用户定义与待处理数据的数据特征,在本实施例中,还可以对相同类型的待处理数据配置相同的业务键,示例性的,对加时数据和服务时间数据配置相同的业务键,因此一个业务键可能包含多个待处理数据,待处理数据的业务键可以根据具体需要进行配置,本实施例对此不做具体限定。Users can create data configuration tasks in the middle-office system and configure different business keys according to different data to be processed. The business key is a user-defined data feature of the data to be processed. In this embodiment, the same business key can also be configured for the same type of data to be processed. For example, the same business key is configured for overtime data and service time data. Therefore, one business key may contain multiple data to be processed. The business key of the data to be processed can be configured according to specific needs, and this embodiment does not make any specific limitations on this.
根据需要对多个待处理数据配置其他信息,示例性的,可以根据需要,对多个待处理数据配置数据类型信息和当前配置时间信息等其他信息,最后得到包含多个待处理数据的待处理数据集合,并生成与该待处理数据集合对应的当前数据版本标识,当前数据版本标识即为待处理数据集合的版本号(批次号)。 Other information is configured for the multiple data to be processed as needed. For example, other information such as data type information and current configuration time information can be configured for the multiple data to be processed as needed. Finally, a data set to be processed containing multiple data to be processed is obtained, and a current data version identifier corresponding to the data set to be processed is generated. The current data version identifier is the version number (batch number) of the data set to be processed.
将待处理数据集合打包,并将已配置完成的待处理数据集合上传至对象存储介质中,具体为:Package the data set to be processed and upload the configured data set to be processed to the object storage medium. Specifically:
待处理数据集合对应于多个版本文件,版本文件的格式可以为压缩包,将待处理数据集合打包,并将已配置完成的待处理数据集合上传至对象存储介质中。The data set to be processed corresponds to multiple version files. The format of the version file can be a compressed package. The data set to be processed is packaged, and the configured data set to be processed is uploaded to the object storage medium.
即一个新建的数据配置任务内,待处理数据可以视作为一张业务数据表,一张业务数据表作为一个版本文件,即外围系统每更新一次业务数据,则生成一个对应于该业务数据表的版本文件,多个版本文件合并压缩,一个压缩包对应一个当前数据版本标识,每条待处理数据作为protostuff格式写入,在本实施例中,也可以采用其他的配置方式,本实施例对此不做具体限定。对象存储介质在下发待处理数据至外围系统时,每个发送任务对应一个文件,在本实施例中,通过数据分发实体向外围系统分发待处理数据。That is, in a newly created data configuration task, the data to be processed can be regarded as a business data table, and a business data table is regarded as a version file. That is, each time the peripheral system updates the business data, a version file corresponding to the business data table is generated. Multiple version files are merged and compressed, and a compressed package corresponds to a current data version identifier. Each piece of data to be processed is written in protostuff format. In this embodiment, other configuration methods can also be used, and this embodiment does not specifically limit this. When the object storage medium sends the data to be processed to the peripheral system, each sending task corresponds to a file. In this embodiment, the data to be processed is distributed to the peripheral system through the data distribution entity.
在本实施例中,对象存储介质可以为使用对象存储服务技术(Object Storage Service,OSS)的数据库,其中,OSS是一个分布式的对象存储服务,提供的是一个键值(Key-Value)对形式的对象存储服务,用户可以根据对象(Object)的名称(Key)唯一的获取该Object的内容,在本申请实施例中待处理数据可通过OSS中对象的形式存储,对待处理数据集合设置业务键、当前数据版本标识和数据任务状态,数据任务状态初始为未生效状态,待处理数据的当前数据版本标识即为待处理数据集合的名称(Key)。In this embodiment, the object storage medium may be a database using object storage service technology (Object Storage Service, OSS), wherein OSS is a distributed object storage service that provides an object storage service in the form of a key-value pair. A user may uniquely obtain the content of an object according to the name (Key) of the object. In this embodiment of the application, the data to be processed may be stored in the form of an object in OSS, and a business key, a current data version identifier, and a data task status may be set for the data set to be processed. The data task status is initially in an ineffective state, and the current data version identifier of the data to be processed is the name (Key) of the data set to be processed.
在本实施例中,为了同时要保证多个分布式web应用中数据的一致性和完整性,以及不同类型的数据同步及原子性生效,即为了保证中台系统与多个不同外围系统之间不同类型的数据的接收操作均执行成功之后才能进行下一步操作,若其中任意一个数据的接收操作执行不成功,则已经执行的任何操作都必须被撤销,让数据任务状态返回初始状态。本申请中的中台系统和外围系统之间采用消息队列方式进行消息通讯,因此,在本实施例中,发送数据更新通知信息至外围系统,具体包括:发送数据更新通知信息至数据更新消息队列,以通过数据更新消息队列发送数据更新通知信息至外围系统。In this embodiment, in order to simultaneously ensure the consistency and integrity of data in multiple distributed web applications, as well as the synchronization and atomicity of different types of data, that is, to ensure that the receiving operations of different types of data between the middle-end system and multiple different peripheral systems are all successfully executed before the next operation can be performed, if the receiving operation of any of the data is unsuccessful, any operation that has been executed must be revoked, and the data task status must be returned to the initial state. The middle-end system and the peripheral system in this application use a message queue to communicate messages. Therefore, in this embodiment, sending data update notification information to the peripheral system specifically includes: sending data update notification information to the data update message queue, so as to send the data update notification information to the peripheral system through the data update message queue.
即在本实施例中,由中台系统作为数据更新消息队列的生产者,外围系统作为数据更新消息队列的消费者,通过中台系统发送数据更新通知信息至数据更新消息队列,外围系统从数据更新消息队列接收数据更新通知信息,以实现中台系统发送数据更新通知信息至外围系统。That is, in this embodiment, the middle-office system acts as the producer of the data update message queue, and the peripheral system acts as the consumer of the data update message queue. The data update notification information is sent to the data update message queue through the middle-office system, and the peripheral system receives the data update notification information from the data update message queue, so as to realize the middle-office system sending data update notification information to the peripheral system.
数据更新通知信息可以包含简单的文本字符串,也可以包含复杂的嵌入对象。Data update notification information can contain simple text strings or complex embedded objects.
具体的,数据更新通知信息的字段可以进行如下配置:Specifically, the fields of data update notification information can be configured as follows:
任务类型:产品配置、白名单配置、价格配置、时效配置等;Task type: product configuration, whitelist configuration, price configuration, timeliness configuration, etc.
待处理数据集合的当前数据版本标识;The current data version identifier of the data set to be processed;
待处理数据集合信息摘要算法(Message-Digest Algorithm,MD5):加解密使用;Message-Digest Algorithm (MD5) of the data set to be processed: used for encryption and decryption;
待处理数据集合下载地址;Download address of the data set to be processed;
待处理数据状态:仅发送、立即生效;Data status to be processed: sent only, effective immediately;
待处理数据集合内容:与待处理数据的内容相关的描述;Contents of the data set to be processed: descriptions related to the contents of the data to be processed;
待处理数据集合数据结构,待处理数据集合数据结构可以配置为: The data structure of the data set to be processed can be configured as:
文件名:表名;File name: table name;
类名:对应的实体名;Class name: the corresponding entity name;
待处理数据集合中的所有数据行数:传输的待处理数据行数。The total number of data rows in the data set to be processed: the number of data rows to be processed that are transferred.
数据更新通知信息也可以配置其他字段,本实施例对此不做具体限定。The data update notification information may also be configured with other fields, which are not specifically limited in this embodiment.
数据更新消息队列是在数据更新通知信息的传输过程中保存数据更新通知消息的容器,其主要目的是提供路由并保证消息的传递;数据更新消息队列可以采用Kafka、RabbitMQ或者ActiveMQ中的任意一种,本实施例对此不做具体限定。The data update message queue is a container for storing data update notification messages during the transmission process of data update notification information. Its main purpose is to provide routing and ensure the delivery of messages. The data update message queue can use any one of Kafka, RabbitMQ or ActiveMQ, and this embodiment does not make specific limitations on this.
S202、若确定外围系统已接收待处理数据集合中的所有待处理数据,发送数据生效通知信息至外围系统,数据生效通知信息用于通知外围系统生效已接收的所有待处理数据。S202: If it is determined that the peripheral system has received all the to-be-processed data in the to-be-processed data set, data validation notification information is sent to the peripheral system, where the data validation notification information is used to notify the peripheral system to validate all the received to-be-processed data.
外围系统完成待处理数据的数据接收任务后,会发送数据已接收信息至中台系统,以通知中台系统该外围系统已完成数据接收。After the peripheral system completes the data receiving task of the data to be processed, it will send data reception information to the middle-office system to notify the middle-office system that the peripheral system has completed data reception.
因此,在若确定外围系统已接收待处理数据集合中的所有待处理数据,发送数据生效通知信息至外围系统之前,该方法还包括:从回调状态消息队列中接收数据已接收信息,其中,当外围系统完成待处理数据集合中的一个待处理数据的接收任务时,回调状态消息队列从外围系统接收一次数据已接收信息;若回调状态消息队列中的所有数据已接收信息均接收完毕,则确定外围系统已接收待处理数据集合中的所有待处理数据。Therefore, if it is determined that the peripheral system has received all the pending data in the pending data set, before sending data effectiveness notification information to the peripheral system, the method also includes: receiving data received information from the callback status message queue, wherein, when the peripheral system completes the task of receiving one pending data in the pending data set, the callback status message queue receives data received information from the peripheral system once; if all the data received information in the callback status message queue has been received, it is determined that the peripheral system has received all the pending data in the pending data set.
在本实施例中,由外围系统作为回调状态消息队列的生产者,中台系统作为回调状态消息队列的消费者,外围系统完成待处理数据集合中的一个待处理数据的数据接收任务后,会发送一次数据已接收信息至回调状态消息队列,中台系统作为回调状态消息队列的订阅者,外围系统发送一次数据已接收信息至回调状态消息队列,中台系统则会接收一次回调状态消息队列发送的数据已接收信息,以确定外围系统已完成数据接收。数据已接收信息可以包含简单的文本字符串,也可以包含复杂的嵌入对象。In this embodiment, the peripheral system acts as the producer of the callback status message queue, and the middle-stage system acts as the consumer of the callback status message queue. After the peripheral system completes the data reception task of one of the pending data sets, it will send a data reception message to the callback status message queue. The middle-stage system acts as the subscriber of the callback status message queue. The peripheral system sends a data reception message to the callback status message queue, and the middle-stage system receives the data reception message sent by the callback status message queue to determine that the peripheral system has completed data reception. The data reception message can contain simple text strings or complex embedded objects.
具体的,数据已接收信息的字段可以进行如下配置:Specifically, the fields of the data received information can be configured as follows:
任务类型:产品配置、白名单配置、价格配置、时效配置等;Task type: product configuration, whitelist configuration, price configuration, timeliness configuration, etc.
待处理数据集合唯一标识;Unique identifier of the data set to be processed;
待处理数据MD5;MD5 of the data to be processed;
待处理数据状态:数据已接收、数据已生效、数据处理异常等。Data status to be processed: data received, data effective, data processing exception, etc.
数据已接收信息也可以配置其他字段,本实施例对此不做具体限定。The data received information may also be configured with other fields, which is not specifically limited in this embodiment.
在本实施例中,回调状态消息队列可以采用Kafka、RabbitMQ或者ActiveMQ中的任意一种,本实施例对此不做具体限定。In this embodiment, the callback status message queue may adopt any one of Kafka, RabbitMQ or ActiveMQ, and this embodiment does not make any specific limitation to this.
为了保证中台系统与多个外围系统之间的数据一致性和准确性,在本实施例中,中台系统确定外围系统完成全部数据接收任务后,中台系统才允许各个外围系统生效待处理数据,即若确定外围系统已接收待处理数据集合中的所有待处理数据,发送数据生效通知信息至外围系统。In order to ensure data consistency and accuracy between the middle-office system and multiple peripheral systems, in this embodiment, the middle-office system allows each peripheral system to validate the data to be processed only after it determines that the peripheral system has completed all data receiving tasks. That is, if it is determined that the peripheral system has received all the data to be processed in the data set to be processed, the data validation notification information is sent to the peripheral system.
在本实施例中,若确定外围系统已接收待处理数据集合中的所有待处理数据,发送数据生效通知信息至外围系统,具体包括: In this embodiment, if it is determined that the peripheral system has received all the data to be processed in the data set to be processed, sending data validity notification information to the peripheral system specifically includes:
若确定外围系统已接收待处理数据集合中的所有待处理数据,发送数据生效通知信息至数据生效消息队列,以通过数据生效消息队列发送数据生效通知信息至外围系统。If it is determined that the peripheral system has received all the to-be-processed data in the to-be-processed data set, data validity notification information is sent to the data validity message queue, so as to send the data validity notification information to the peripheral system through the data validity message queue.
即在本实施例中,由中台系统作为数据生效消息队列的生产者,外围系统作为数据生效消息队列的消费者,通过中台系统发送数据生效通知信息至数据生效消息队列,外围系统从数据生效消息队列接收数据生效通知信息,以实现中台系统发送数据生效通知信息至外围系统。That is, in this embodiment, the middle-office system acts as the producer of the data validity message queue, and the peripheral system acts as the consumer of the data validity message queue. The data validity notification information is sent to the data validity message queue through the middle-office system, and the peripheral system receives the data validity notification information from the data validity message queue, so as to realize that the middle-office system sends the data validity notification information to the peripheral system.
数据生效通知信息可以包含简单的文本字符串,也可以包含复杂的嵌入对象。Data validation notification information can contain simple text strings or complex embedded objects.
具体的,数据生效通知信息的字段可以进行如下配置:Specifically, the fields of data effectiveness notification information can be configured as follows:
任务类型:产品配置、白名单配置、价格配置、时效配置等;Task type: product configuration, whitelist configuration, price configuration, timeliness configuration, etc.
待处理数据集合的唯一标识;The unique identifier of the data set to be processed;
待处理数据集合信息摘要算法(Message-Digest Algorithm,MD5):加解密使用;Message-Digest Algorithm (MD5) of the data set to be processed: used for encryption and decryption;
待处理数据集合下载地址;Download address of the data set to be processed;
待处理数据状态:仅发送、立即生效;Data status to be processed: sent only, effective immediately;
待处理数据集合内容:与待处理数据的内容相关的描述;Contents of the data set to be processed: descriptions related to the contents of the data to be processed;
待处理数据集合数据结构,待处理数据集合数据结构可以配置为:The data structure of the data set to be processed can be configured as:
文件名:表名;File name: table name;
类名:对应的实体名;Class name: the corresponding entity name;
待处理数据集合中的所有数据行数:传输的待处理数据行数。The total number of data rows in the data set to be processed: the number of data rows to be processed that are transferred.
数据生效通知信息也可以配置其他字段,本实施例对此不做具体限定。The data validity notification information may also be configured with other fields, which are not specifically limited in this embodiment.
数据生效消息队列可以采用Kafka、RabbitMQ或者ActiveMQ中的任意一种,本实施例对此不做具体限定。The data validation message queue may adopt any one of Kafka, RabbitMQ or ActiveMQ, and this embodiment does not specifically limit this.
S203、若确定外围系统已生效待处理数据集合中的所有待处理数据,将与待处理数据集合对应的数据处理任务状态更新为已生效。S203: If it is determined that the peripheral system has validated all the data to be processed in the data set to be processed, the data processing task status corresponding to the data set to be processed is updated to validated.
外围系统完成待处理数据的数据生效任务后,会发送数据已生效信息至中台系统,以通知中台系统该外围系统已完成数据生效。After the peripheral system completes the data validation task for the data to be processed, it will send data validation information to the middle-office system to notify the middle-office system that the peripheral system has completed the data validation.
因此,在本实施例中,在若确定外围系统已生效待处理数据集合中的所有待处理数据,将与待处理数据集合对应的数据处理任务状态更新为已生效之前,该方法还包括:从回调状态消息队列中接收数据已生效信息,其中,当外围系统完成待处理数据集合中的一个待处理数据的生效任务时,回调状态消息队列从外围系统接收一次数据已生效信息;若回调状态消息队列中的数据已生效信息全部接收完毕,则确定外围系统已生效待处理数据集合中的所有待处理数据。Therefore, in this embodiment, if it is determined that the peripheral system has validated all the pending data in the pending data set, before updating the data processing task status corresponding to the pending data set to validated, the method also includes: receiving data validation information from the callback status message queue, wherein when the peripheral system completes the validation task of one pending data in the pending data set, the callback status message queue receives data validation information from the peripheral system once; if all the data validation information in the callback status message queue has been received, it is determined that the peripheral system has validated all the pending data in the pending data set.
中台系统作为回调状态消息队列的订阅者,外围系统发送一次数据已生效信息至回调状态消息队列,中台系统则会接收一次回调状态消息队列发送的数据已生效信息,若回调状态消息队列中的数据已生效信息全部接收完毕,则确定外围系统已生效待处理数据集合中的所有待处理数据。The middle-office system is a subscriber to the callback status message queue. When the peripheral system sends a data-validated message to the callback status message queue once, the middle-office system will receive the data-validated message sent by the callback status message queue. If all the data-validated messages in the callback status message queue have been received, it is determined that the peripheral system has validated all the pending data in the pending data set.
本步骤中提出的回调状态消息队列与步骤S202中提出的回调状态消息队列可以为同一个消息队列,其区别在于,数据已接收信息和数据已生效信息中的待处理数据状态不相同。示例 性的,当回调状态消息队列中的待处理数据状态字段为数据已接收,中台系统对回调状态消息队列中的消息进行解耦后,确定外围系统已接收待处理数据,当回调状态消息队列中的待处理数据状态字段为数据已生效,中台系统对回调状态消息队列中的消息进行解耦后,则确定外围系统已生效待处理数据。The callback status message queue proposed in this step and the callback status message queue proposed in step S202 can be the same message queue, the difference between them is that the pending data status in the data received information and the data effective information is different. When the status field of the pending data in the callback status message queue shows that the data has been received, the middle-office system decouples the messages in the callback status message queue and determines that the peripheral system has received the pending data. When the status field of the pending data in the callback status message queue shows that the data has been effective, the middle-office system decouples the messages in the callback status message queue and determines that the peripheral system has effective the pending data.
在本实施例中,回调状态消息队列也可以为不同的消息队列,本申请对此不做具体限定。In this embodiment, the callback status message queue may also be a different message queue, and this application does not make any specific limitation on this.
如图4和图5所示,图4和图5均是本申请实施例提供的数据处理方法的一种流程示意图。需要说明的是,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。该数据处理方法应用于外围系统,外围系统与中台系统通信连接,如图5所示,该方法具体包括步骤S301~S306。As shown in Figures 4 and 5, Figures 4 and 5 are both flowchart diagrams of the data processing method provided in an embodiment of the present application. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that here. The data processing method is applied to a peripheral system, and the peripheral system is communicatively connected with the middle station system. As shown in Figure 5, the method specifically includes steps S301 to S306.
S301、接收数据更新通知信息。S301. Receive data update notification information.
S302、根据数据更新通知信息,从预设的对象存储介质中接收待处理数据集合中的待处理数据。S302: Receive the to-be-processed data in the to-be-processed data set from a preset object storage medium according to the data update notification information.
S303、当待处理数据接收完毕时,发送数据已接收信息至中台系统。S303. When the data to be processed is received, the data reception information is sent to the middle station system.
S304、接收数据生效通知信息。S304: Receive data validation notification information.
S305、根据数据生效通知信息,生效已接收的所有待处理数据。S305. Validate all received data to be processed according to the data validation notification information.
在本实施例中,由于步骤S201~步骤S203已经公开了中台系统与外围系统之间通过数据更新消息队列接收和发送数据更新通知信息、通过数据生效消息队列接收和发送数据生效通知信息以及通过回调状态消息队列接收和发送数据已接收信息和数据已生效信息,步骤S301~步骤S305实际是步骤S201~步骤S203相对应的步骤,因此,本实施例对此不再赘述。In this embodiment, since steps S201 to S203 have disclosed the receiving and sending of data update notification information through the data update message queue, the receiving and sending of data validity notification information through the data validity message queue, and the receiving and sending of data received information and data valid information through the callback status message queue between the middle-office system and the peripheral system, steps S301 to S305 are actually the steps corresponding to steps S201 to S203, and therefore, they are not repeated in this embodiment.
S306、若待处理数据集合中的所有待处理数据均已生效时,对预设数据库中的数据版本管理表进行更新。S306: If all the data to be processed in the data set to be processed have become effective, the data version management table in the preset database is updated.
当外围系统根据数据生效通知信息生效了接收的所有待处理数据之后,为了保留历史数据,保证系统数据持久性及完整性,以实现数据版本的控制及数据的实时生效,可以在待处理数据集合中的所有待处理数据均已生效时,对预设数据库中的数据版本管理表进行更新。After the peripheral system has validated all the received data to be processed according to the data validation notification information, in order to retain historical data, ensure the persistence and integrity of system data, and realize data version control and real-time validation of data, the data version management table in the preset database can be updated when all the data to be processed in the data set to be processed have taken effect.
在本实施例中,数据版本管理表包括有效版本标识链表。为提高数据查询与生效性能,外围系统还可以额外维护两张表,即数据版本管理表还可以包括版本标识映射表和业务键映射表。In this embodiment, the data version management table includes a valid version identification chain table. To improve data query and validation performance, the peripheral system can also maintain two additional tables, that is, the data version management table can also include a version identification mapping table and a business key mapping table.
(1)有效版本标识链表:(1) Valid version identification list:
用于记录基础数据版本标识和当前数据版本标识,基础数据版本标识为外围系统最初配置的初始数据的版本标识;Used to record the basic data version identifier and the current data version identifier. The basic data version identifier is the version identifier of the initial data initially configured by the peripheral system;
在待处理数据集合生效时写入数据;Write data when the pending data set takes effect;
字段包括当前数据版本标识、数据生效时间和数据状态等;The fields include the current data version identifier, data effective time, and data status;
存储于外围系统端的数据库中,其中,外围系统端的数据库可以为使用对象存储服务技术的数据库,也可以是其他免费开源的数据库,本实施例对此不做具体限定。The database is stored in the peripheral system end, wherein the database of the peripheral system end may be a database using object storage service technology, or may be other free and open source databases, which is not specifically limited in this embodiment.
(2)版本标识映射表:(2) Version identification mapping table:
用于记录当前数据版本标识对应的业务键集合,不记录基础数据版本标识; It is used to record the business key set corresponding to the current data version identifier, but does not record the basic data version identifier;
在待处理数据集合接收时写入数据;Write data when the data set to be processed is received;
字段包括对应当前数据版本标识、业务键类型、业务键和数据接收时间等;The fields include the corresponding current data version identifier, business key type, business key, and data receiving time;
存储于外围系统端的数据库中,其中,外围系统端的数据库可以为使用对象存储服务技术的数据库,也可以是其他免费开源的数据库,本实施例对此不做具体限定。The database is stored in the peripheral system end, wherein the database of the peripheral system end may be a database using object storage service technology, or may be other free and open source databases, which is not specifically limited in this embodiment.
(3)业务键映射表:(3) Business key mapping table:
由有效版本标识链表和版本标识映射表结合派生得到;It is derived by combining the valid version identifier chain list and the version identifier mapping table;
用于记录基础数据版本标识和业务键当前生效的数据版本标识;Used to record the basic data version identifier and the data version identifier currently in effect for the business key;
在待处理数据集合生效时写入数据;Write data when the pending data set takes effect;
字段包括业务键、业务键对应的当前数据版本标识和数据生效时间等;The fields include the business key, the current data version identifier corresponding to the business key, and the data effective time, etc.
存储于外围系统端的数据库、远程缓存和本地缓存中,待处理数据的当前数据版本标识为远程缓存键第一前缀;其中,外围系统端的数据库可以为使用对象存储服务技术的数据库,也可以是其他免费开源的数据库,本实施例对此不做具体限定。The current data version of the data to be processed is identified as the first prefix of the remote cache key in the database, remote cache and local cache stored on the peripheral system side; wherein, the database on the peripheral system side may be a database using object storage service technology, or other free and open source databases, which is not specifically limited in this embodiment.
本地缓存即为外围系统的本地缓存。The local cache is the local cache of the peripheral system.
远程缓存可以采用远程字典服务器(Remote Dictionary Server,Redis),Redis具有高性能的Key-Value数据库存储机制,以及支持数据持久化,重启数据不丢失、支持分布式部署、支持数据备份等特性,远程缓存也可以采用任意的远程缓存组件,本实施例对此不做具体限定。Remote cache can use remote dictionary server (Remote Dictionary Server, Redis). Redis has a high-performance Key-Value database storage mechanism, and supports data persistence, no data loss after restart, supports distributed deployment, supports data backup and other features. Remote cache can also use any remote cache component, which is not specifically limited in this embodiment.
在本实施例中,本地缓存和远程缓存的表结构可以如下设置:In this embodiment, the table structure of the local cache and the remote cache can be set as follows:
p2cache_config(缓存配置表):存放待处理数据刷新规则,如key字段,value字段,刷新频率,过滤条件;p2cache_config (cache configuration table): stores the refresh rules of pending data, such as key field, value field, refresh frequency, and filter conditions;
p2cache_key:存放待处理数据集合key值;p2cache_key: stores the key value of the data set to be processed;
p2cache_detail:存放待处理数据集合value值。p2cache_detail: stores the value of the data set to be processed.
应用过程中,当外围系统需要使用当前业务键数据,会先找到其最新的当前数据版本标识,然后通过当前数据版本标识和业务键获取到最新的配置数据,从而实现数据版本的控制及数据的实时生效,进而实现数据的正确性、持久性及完整性,并将数据实时在各个服务进行生效。During the application process, when the peripheral system needs to use the current business key data, it will first find its latest current data version identifier, and then obtain the latest configuration data through the current data version identifier and business key, so as to realize data version control and real-time data effectiveness, and then realize the correctness, persistence and integrity of the data, and make the data effective in real time in each service.
下面对“对预设数据库中的数据版本管理表进行更新”的更新方式进行具体介绍。The following is a detailed introduction to the update method of "updating the data version management table in the preset database".
在本申请的另一个实施例中,在根据数据更新通知信息,从预设的对象存储介质中接收待处理数据集合中的待处理数据之后,该方法还包括:将业务键和当前数据版本标识同步保存至版本标识映射表。In another embodiment of the present application, after receiving the to-be-processed data in the to-be-processed data set from a preset object storage medium according to the data update notification information, the method further includes: synchronously saving the business key and the current data version identifier to a version identifier mapping table.
具体的,外围系统接收待处理数据成功后,解析待处理数据的业务键与当前数据版本标识的映射关系,并在将该业务键与当前数据版本标识的映射关系保存至版本标识映射表;同时刷新外围系统的本地缓存以及远程缓存,将待处理数据集合的业务键以及待处理数据的当前数据版本标识同步保存至远程缓存。Specifically, after the peripheral system successfully receives the data to be processed, it parses the mapping relationship between the business key of the data to be processed and the current data version identifier, and saves the mapping relationship between the business key and the current data version identifier to the version identifier mapping table; at the same time, the local cache and remote cache of the peripheral system are refreshed, and the business key of the data set to be processed and the current data version identifier of the data to be processed are synchronously saved to the remote cache.
在本申请的另一个实施例中,若待处理数据集合中的所有待处理数据均已生效时,对预设数据库中的数据版本管理表进行更新,包括:将已生效的待处理数据集合所对应的当前数据版本标识添加至有效版本标识链表;根据有效版本标识链表和版本标识映射表,生成业务键映射 表。In another embodiment of the present application, if all the data to be processed in the data set to be processed have been effective, the data version management table in the preset database is updated, including: adding the current data version identifier corresponding to the effective data set to be processed to the valid version identifier linked list; generating a business key mapping according to the valid version identifier linked list and the version identifier mapping table; surface.
将已生效的待处理数据集合所对应的当前数据版本标识添加至有效版本标识链表,具体为:外围系统生效待处理数据成功后,在有效版本标识链表的末位添加待处理数据的当前数据版本标识。The current data version identifier corresponding to the valid set of data to be processed is added to the valid version identifier linked list. Specifically, after the peripheral system successfully validates the data to be processed, the current data version identifier of the data to be processed is added to the end of the valid version identifier linked list.
根据有效版本标识链表和版本标识映射表,生成业务键映射表,具体为:降序遍历有效版本标识链表,得到当前生效的当前数据版本标识;根据当前数据版本标识,匹配版本标识映射表;遍历版本标识映射表,确定业务键;当业务键在预设的业务键映射表中不存在时,将业务键写入业务键映射表,当业务键在预设的业务键映射表不存在时,则不执行任何操作,最终生成业务键映射表;同时刷新外围系统的本地缓存以及远程缓存,将待处理数据集合的业务键以及待处理数据的当前数据版本标识同步保存至远程缓存。A business key mapping table is generated according to the valid version identifier chain list and the version identifier mapping table, specifically: the valid version identifier chain list is traversed in descending order to obtain the current data version identifier that is currently in effect; the version identifier mapping table is matched according to the current data version identifier; the version identifier mapping table is traversed to determine the business key; when the business key does not exist in the preset business key mapping table, the business key is written into the business key mapping table; when the business key does not exist in the preset business key mapping table, no operation is performed, and finally a business key mapping table is generated; at the same time, the local cache and remote cache of the peripheral system are refreshed, and the business key of the data set to be processed and the current data version identifier of the data to be processed are synchronously saved to the remote cache.
在本申请的另一个实施例中,刷新外围系统的本地缓存以及远程缓存,具体包括:In another embodiment of the present application, refreshing the local cache and the remote cache of the peripheral system specifically includes:
在本实施例中,为了简化描述,下文将本地缓存以及远程缓存均称为缓存;In this embodiment, in order to simplify the description, the local cache and the remote cache are both referred to as caches below;
1、生产者定时任务:生产者每10秒查询缓存p2cache_config配置,根据配置查询对应的业务表,将需要刷新的待处理数据,插入到p2cache_key表与p2cache_detail表;2、消费者定时任务:消费者每10秒查询p2cahce_key表与p2cache_detail数据,并刷新到缓存。1. Producer scheduled task: The producer queries the cache p2cache_config configuration every 10 seconds, queries the corresponding business table according to the configuration, and inserts the pending data that needs to be refreshed into the p2cache_key table and p2cache_detail table; 2. Consumer scheduled task: The consumer queries the p2cahce_key table and p2cache_detail data every 10 seconds and refreshes it to the cache.
在本申请的另一个实施例中,为提升服务性能,实时更新业务键映射表至本地缓存。In another embodiment of the present application, in order to improve service performance, the business key mapping table is updated to the local cache in real time.
实时更新业务键映射表至本地缓存,具体包括:Update the business key mapping table to the local cache in real time, including:
第一次启动全量:查询数据库获取业务键及对应的当前数据版本标识,将查询得到的业务键及对应的当前数据版本标识存放到本地缓存的业务键映射表;First full startup: query the database to obtain the business key and the corresponding current data version identifier, and store the queried business key and the corresponding current data version identifier in the local cache business key mapping table;
后续增量:数据分发及缓存刷新完毕时,通知本地更新业务键与当前数据版本标识的映射关系。Subsequent increments: When data distribution and cache refresh are completed, notify the local update of the mapping relationship between the business key and the current data version identifier.
在本申请中,为避免保存的当前数据版本标识过多,即为避免缓存脏数据过多导致数据混乱、数据异常以及影响系统性能,外围系统通过定期剪枝的方式以清理脏数据。定期剪枝可以包括:将历史数据版本标识合并为基础数据版本标识;定期清理过期数据版本标识缓存。其中,历史数据版本标识为外围系统每次更新业务数据时在基础数据版本标识上记录的新的数据版本标识,该记录的新的数据版本标识包括当前数据版本标识。在本实施例中,也可以包括其他的数据剪枝方式,本申请对此不做具体限定。In the present application, in order to avoid too many current data version identifiers being saved, that is, to avoid too much dirty data in the cache causing data confusion, data anomalies and affecting system performance, the peripheral system cleans up dirty data through regular pruning. Regular pruning may include: merging historical data version identifiers into basic data version identifiers; regularly cleaning up expired data version identifier caches. Among them, the historical data version identifier is a new data version identifier recorded on the basic data version identifier each time the peripheral system updates business data, and the recorded new data version identifier includes the current data version identifier. In this embodiment, other data pruning methods may also be included, and this application does not specifically limit this.
因此,在本申请的另一个实施例中,数据处理方法还包括:将历史数据版本标识合并为基础数据版本标识。Therefore, in another embodiment of the present application, the data processing method further includes: merging the historical data version identifier into the basic data version identifier.
将历史数据版本标识合并为基础数据版本标识,具体包括:Merge the historical data version identifier into the basic data version identifier, including:
从有效版本标识链表中查询得到第一目标历史时间内的第一目标数据;Query and obtain the first target data within the first target historical time from the valid version identification linked list;
其中,第一目标历史时间为最后一次进行数据更新的前N天,N为自然数,N的值根据需要进行设置,例如前7天,本实施例对此不做具体限定;The first target historical time is N days before the last data update, where N is a natural number and the value of N is set as required, such as the previous 7 days, which is not specifically limited in this embodiment;
第一目标数据包括有效版本标识链表中处于第一目标历史时间内的所有数据,示例性的,第一目标数据可以包括处于第一目标历史时间内的数据版本标识、数据版本标识的数据生效时 间和数据状态等。从版本标识映射表中匹配得到与第一目标数据关联的目标业务键和目标业务键的最新版本标识数据;The first target data includes all data in the valid version identifier chain list within the first target historical time. For example, the first target data may include the data version identifier within the first target historical time, the data effective time of the data version identifier, time and data status, etc. Obtain the target business key associated with the first target data and the latest version identification data of the target business key by matching from the version identification mapping table;
将目标业务键的最新版本标识数据作为业务键映射表的新的基础数据版本标识,并刷新业务数据表和缓存。The latest version identification data of the target business key is used as the new basic data version identification of the business key mapping table, and the business data table and cache are refreshed.
在本实施例中,需要注意的是,若当业务键映射表已存在新的基础数据版本标识时,则删除已存在的新的基础数据版本标识,并刷新业务数据表和缓存。In this embodiment, it should be noted that if a new basic data version identifier already exists in the business key mapping table, the existing new basic data version identifier is deleted, and the business data table and cache are refreshed.
在本申请的另一个实施例中,该方法还包括:定期清理过期数据版本标识缓存。In another embodiment of the present application, the method further includes: regularly clearing the expired data version identification cache.
定期清理过期数据版本标识缓存,具体为:Regularly clean up the expired data version identifier cache, specifically:
从版本标识映射表中查询得到第二目标历史时间内的第二目标数据;Obtain the second target data within the second target historical time from the version identification mapping table;
其中,第二目标历史时间为最后一次进行数据更新的前M天,M为自然数,M的值根据需要进行设置,例如前7天,本实施例对此不做具体限定;The second target historical time is M days before the last data update, where M is a natural number and the value of M is set as required, such as the previous 7 days, which is not specifically limited in this embodiment;
第二目标数据包括版本标识映射表中处于第二目标历史时间内的所有数据,示例性的,第二目标数据可以包括处于第二目标历史时间内的数据版本标识、业务键类型、业务键和数据接收时间等。从有效版本标识链表中匹配得到与第二目标数据关联的至少一个目标版本标识数据;The second target data includes all data in the version identification mapping table within the second target historical time. Exemplarily, the second target data may include data version identification, business key type, business key, and data receiving time within the second target historical time. At least one target version identification data associated with the second target data is obtained by matching from the valid version identification linked list;
过滤至少一个目标版本标识数据中处于生效状态的目标版本标识数据,得到过滤后的至少一个目标版本标识数据;Filtering the target version identification data in the effective state in the at least one target version identification data to obtain the at least one target version identification data after filtering;
删除版本标识映射表中与过滤后的至少一个目标版本标识数据关联的所有数据,并刷新业务数据表和缓存。Delete all data in the version identification mapping table that is associated with at least one filtered target version identification data, and refresh the business data table and cache.
在本申请中,执行“将历史数据版本标识合并为基础数据版本标识”和“定期清理过期数据版本标识缓存”的执行间隔时间可以根据实际情况设定,本实施例不做具体限定。In the present application, the execution interval of "merging historical data version identifiers into basic data version identifiers" and "regularly clearing expired data version identifier cache" can be set according to actual conditions, and this embodiment does not make specific limitations.
在本申请另一个实施例中,由于外围系统会存在更新了数据之后,又需要回退至历史某个数据版本,为了方便外围系统进行数据版本的切换,数据处理方法还包括:In another embodiment of the present application, since the peripheral system may need to roll back to a historical data version after updating the data, in order to facilitate the peripheral system to switch the data version, the data processing method further includes:
获取历史数据版本切换指令,历史数据版本切换指令可以是用户发送至执行数据处理方法的装置,也可以是执行数据处理方法的装置定期自动生成历史数据版本切换指令,本实施例对此不做具体限定;Obtaining a historical data version switching instruction, where the historical data version switching instruction may be sent by a user to a device executing the data processing method, or may be automatically generated periodically by the device executing the data processing method, which is not specifically limited in this embodiment;
根据历史数据版本切换指令,删除有效版本标识链表中指定版本标识数据,得到删除指定版本标识数据后的有效版本标识链表;According to the historical data version switching instruction, the specified version identification data in the valid version identification chain list is deleted to obtain the valid version identification chain list after deleting the specified version identification data;
根据删除指定版本标识数据后的有效版本标识链表和版本标识映射表,重新生成业务键映射表。The business key mapping table is regenerated according to the valid version identification chain list and the version identification mapping table after the specified version identification data is deleted.
在本实施例中,历史数据版本切换指令包括“回退指定版本标识数据指令”和“回退至指定版本标识数据指令”,其中,根据历史数据版本切换指令,删除有效版本标识链表中指定版本标识数据,得到删除指定版本标识数据后的有效版本标识链表,具体为:In this embodiment, the historical data version switching instruction includes a "rollback specified version identification data instruction" and a "rollback to specified version identification data instruction", wherein, according to the historical data version switching instruction, the specified version identification data in the valid version identification linked list is deleted, and the valid version identification linked list after deleting the specified version identification data is obtained, specifically:
若历史数据版本切换指令为“回退指定版本标识数据指令”时,则删除有效版本标识链表中“回退指定版本标识数据指令”要求删除的指定版本标识数据,得到删除指定版本标识数据后的有效版本标识链表,并根据删除了指定版本标识数据后的有效版本标识链表和版本标识映 射表,重新生成业务键映射表,并刷新缓存;If the historical data version switching instruction is a "roll back specified version identification data instruction", the specified version identification data required to be deleted by the "roll back specified version identification data instruction" in the valid version identification chain table is deleted, and the valid version identification chain table after deleting the specified version identification data is obtained, and the valid version identification chain table after deleting the specified version identification data and the version identification mapping are used to convert the specified version identification data into a valid version identification chain table. Shooting table, regenerate business key mapping table, and refresh cache;
若历史数据版本切换指令为“回退至指定版本标识数据指令”时,则删除有效版本标识链表中“回退至指定版本标识数据指令”要求删除的排列于指定版本标识数据之后的所有版本标识数据,并根据删除了排列于指定版本标识数据之后的所有版本标识数据的有效版本标识链表和版本标识映射表,重新生成业务键映射表,并刷新缓存。If the historical data version switching instruction is the "roll back to the specified version identification data instruction", then all version identification data that are arranged after the specified version identification data and that the "roll back to the specified version identification data instruction" requires to be deleted in the valid version identification linked list will be deleted, and based on the valid version identification linked list and the version identification mapping table that have deleted all version identification data that are arranged after the specified version identification data, the business key mapping table will be regenerated and the cache will be refreshed.
通过上述方式更进一步实现了数据版本的控制及数据的实时生效,保留了历史数据,有效的降低了配置过程中带来的风险,保证了系统数据持久性及完整性。The above method further realizes the control of data version and the real-time effectiveness of data, retains historical data, effectively reduces the risks brought about by the configuration process, and ensures the persistence and integrity of system data.
在本申请另一个实施例中,为了方便外围系统查询数据,数据处理方法还包括:In another embodiment of the present application, in order to facilitate the peripheral system to query data, the data processing method further includes:
根据业务键生成策略,得到业务键值;According to the business key generation strategy, the business key value is obtained;
根据业务键在版本标识映射表匹配数据版本标识,无匹配结果时,数据版本标识即为基础数据版本标识,通过数据版本标识和业务键来查询缓存。The data version identifier is matched in the version identifier mapping table according to the business key. When there is no match result, the data version identifier is the basic data version identifier. The cache is queried by the data version identifier and the business key.
为了更好实施本申请实施例中数据处理方法,在数据处理方法基础之上,本申请实施例中还提供一种数据处理装置400,应用于中台系统,中台系统与外围系统通信连接,如图6所示,数据处理装置400包括更新信息发送模块401、生效信息发送模块402和任务状态更新模块403。In order to better implement the data processing method in the embodiment of the present application, on the basis of the data processing method, a data processing device 400 is also provided in the embodiment of the present application, which is applied to the middle-office system, and the middle-office system is communicatively connected with the peripheral system. As shown in Figure 6, the data processing device 400 includes an update information sending module 401, an effectiveness information sending module 402 and a task status update module 403.
更新信息发送模块401,用于发送数据更新通知信息至外围系统,数据更新通知信息用于通知外围系统从预设的对象存储介质中接收待处理数据集合中的待处理数据。The update information sending module 401 is used to send data update notification information to the peripheral system, and the data update notification information is used to notify the peripheral system to receive the to-be-processed data in the to-be-processed data set from a preset object storage medium.
生效信息发送模块402,用于若确定外围系统已接收待处理数据集合中的所有待处理数据,发送数据生效通知信息至外围系统,数据生效通知信息用于通知外围系统生效已接收的所有待处理数据。The validity information sending module 402 is used to send data validity notification information to the peripheral system if it is determined that the peripheral system has received all the to-be-processed data in the to-be-processed data set. The data validity notification information is used to notify the peripheral system to validate all the received to-be-processed data.
任务状态更新模块403,用于若确定外围系统已生效待处理数据集合中的所有待处理数据,将与待处理数据集合对应的数据处理任务状态更新为已生效。The task status updating module 403 is used to update the data processing task status corresponding to the to-be-processed data set to be effective if it is determined that the peripheral system has effective all the to-be-processed data in the to-be-processed data set.
本申请将待处理数据存储于对外提供下载的对象存储介质中,易于扩展与兼容,便于大数据量的数据处理,确定了外围系统已接收完毕所有待处理数据之后再允许任务生效,保证了大批量不同类型数据的原子性生效,且保证了数据的正确性、持久性和完整性;实现了数据版本管理,保留了历史数据,有效的降低了配置过程中带来的风险,保证了中台系统和外围系统数据的持久性及完整性。This application stores the data to be processed in an object storage medium that is available for external download. It is easy to expand and compatible, and is convenient for processing large amounts of data. It allows the task to take effect only after it is determined that the peripheral system has received all the data to be processed, thereby ensuring the atomic effectiveness of large quantities of different types of data, and ensuring the correctness, persistence and integrity of the data; it implements data version management, retains historical data, effectively reduces the risks brought about by the configuration process, and ensures the persistence and integrity of the data of the middle-end system and the peripheral system.
在本申请一些实施例中,数据处理装置400还包括数据配置模块404,具体用于:配置多个待处理数据,得到待处理数据集合;将待处理数据集合打包,并将已配置完成的待处理数据集合上传至对象存储介质中。In some embodiments of the present application, the data processing device 400 also includes a data configuration module 404, which is specifically used to: configure multiple data to be processed to obtain a data set to be processed; package the data set to be processed, and upload the configured data set to be processed to the object storage medium.
在本申请一些实施例中,更新信息发送模块401具体用于:发送数据更新通知信息至数据更新消息队列,以通过数据更新消息队列发送数据更新通知信息至外围系统。In some embodiments of the present application, the update information sending module 401 is specifically used to: send data update notification information to the data update message queue, so as to send the data update notification information to the peripheral system through the data update message queue.
在本申请一些实施例中,数据处理装置400还包括数据接收确定模块405,具体用于:从回调状态消息队列中接收数据已接收信息,其中,当外围系统完成待处理数据集合中的一个待处理数据的接收任务时,回调状态消息队列从外围系统接收一次数据已接收信息;若回调状态消息队列中的所有数据已接收信息均接收完毕,则确定外围系统已接收待处理数据集合中的所有 待处理数据。In some embodiments of the present application, the data processing device 400 also includes a data reception determination module 405, which is specifically used to: receive data received information from the callback status message queue, wherein when the peripheral system completes the reception task of one of the to-be-processed data in the to-be-processed data set, the callback status message queue receives data received information from the peripheral system once; if all the data received information in the callback status message queue is received, it is determined that the peripheral system has received all the data in the to-be-processed data set. Data to be processed.
在本申请一些实施例中,生效信息发送模块402具体用于:若确定外围系统已接收待处理数据集合中的所有待处理数据,发送数据生效通知信息至数据生效消息队列,以通过数据生效消息队列发送数据生效通知信息至外围系统。In some embodiments of the present application, the effectiveness information sending module 402 is specifically used to: if it is determined that the peripheral system has received all the data to be processed in the data set to be processed, send data effectiveness notification information to the data effectiveness message queue, so as to send the data effectiveness notification information to the peripheral system through the data effectiveness message queue.
在本申请一些实施例中,数据处理装置400还包括数据生效确定模块406,具体用于:从回调状态消息队列中接收数据已生效信息,其中,当外围系统完成待处理数据集合中的一个待处理数据的生效任务时,回调状态消息队列从外围系统接收数据已生效信息;若回调状态消息队列中的数据已生效信息接收完毕,则确定外围系统已生效待处理数据集合中的所有待处理数据。In some embodiments of the present application, the data processing device 400 also includes a data effectiveness determination module 406, which is specifically used to: receive data effectiveness information from the callback status message queue, wherein when the peripheral system completes the effectiveness task of one of the pending data in the pending data set, the callback status message queue receives the data effectiveness information from the peripheral system; if the data effectiveness information in the callback status message queue has been received, it is determined that the peripheral system has effective all the pending data in the pending data set.
为了更好实施本申请实施例中数据处理方法,在数据处理方法基础之上,本申请实施例中还提供一种数据处理装置500,应用于外围系统,外围系统与中台系统通信连接,如图7所示,数据处理装置500包括更新信息接收模块501、数据接收模块502、接收信息发送模块503、生效信息接收模块504、数据生效模块505和数据表更新模块506。In order to better implement the data processing method in the embodiment of the present application, on the basis of the data processing method, a data processing device 500 is also provided in the embodiment of the present application, which is applied to the peripheral system, and the peripheral system is communicatively connected with the middle system. As shown in Figure 7, the data processing device 500 includes an update information receiving module 501, a data receiving module 502, a received information sending module 503, an effective information receiving module 504, a data effective module 505 and a data table update module 506.
更新信息接收模块501,用于接收数据更新通知信息。The update information receiving module 501 is used to receive data update notification information.
数据接收模块502,用于根据数据更新通知信息,从预设的对象存储介质中接收待处理数据集合中的待处理数据。The data receiving module 502 is used to receive the to-be-processed data in the to-be-processed data set from a preset object storage medium according to the data update notification information.
接收信息发送模块503,用于当待处理数据接收完毕时,发送数据已接收信息至中台系统。The receiving information sending module 503 is used to send data reception information to the middle station system when the data to be processed is received.
生效信息接收模块504,用于接收数据生效通知信息。The validity information receiving module 504 is used to receive data validity notification information.
数据生效模块505,用于根据数据生效通知信息,生效已接收的所有待处理数据。The data validation module 505 is used to validate all received data to be processed according to the data validation notification information.
数据表更新模块506,用于若待处理数据集合中的所有待处理数据均已生效时,对预设数据库中的数据版本管理表进行更新。The data table updating module 506 is used to update the data version management table in the preset database if all the data to be processed in the data set to be processed have become effective.
在本申请一些实施例中,数据版本管理表包括版本标识映射表,待处理数据包括业务键,待处理数据集合包括当前数据版本标识,数据处理装置500还包括同步更新模块507,具体用于:将业务键和当前数据版本标识同步保存至版本标识映射表。In some embodiments of the present application, the data version management table includes a version identification mapping table, the data to be processed includes a business key, the data set to be processed includes a current data version identification, and the data processing device 500 also includes a synchronous update module 507, which is specifically used to: synchronously save the business key and the current data version identification to the version identification mapping table.
在本申请一些实施例中,数据版本管理表还包括有效版本标识链表和业务键映射表,数据表更新模块506具体用于:将已生效的待处理数据集合所对应的当前数据版本标识添加至有效版本标识链表;根据有效版本标识链表和版本标识映射表,生成业务键映射表。In some embodiments of the present application, the data version management table also includes a valid version identifier linked list and a business key mapping table, and the data table update module 506 is specifically used to: add the current data version identifier corresponding to the effective set of data to be processed to the valid version identifier linked list; generate a business key mapping table based on the valid version identifier linked list and the version identifier mapping table.
在本申请一些实施例中,业务键映射表包括基础数据版本标识,数据表更新模块506还用于:从有效版本标识链表中查询得到第一目标历史时间内的第一目标数据,第一目标历史时间为最后一次进行数据更新的前N天,N为自然数;从版本标识映射表中匹配得到与第一目标数据关联的目标业务键和目标业务键的最新版本标识数据;将目标业务键的最新版本标识数据作为业务键映射表的新的基础数据版本标识。In some embodiments of the present application, the business key mapping table includes a basic data version identifier, and the data table update module 506 is also used to: query from the valid version identifier linked list to obtain the first target data within the first target historical time, the first target historical time is N days before the last data update, and N is a natural number; match the target business key associated with the first target data and the latest version identification data of the target business key from the version identification mapping table; and use the latest version identification data of the target business key as the new basic data version identifier of the business key mapping table.
在本申请一些实施例中,数据表更新模块506还用于:从版本标识映射表中查询得到第二目标历史时间内的第二目标数据,第二目标历史时间为最后一次进行数据更新的前M天,M为自然数;从有效版本标识链表中匹配得到与第二目标数据关联的至少一个目标版本标识数据;过滤至少一个目标版本标识数据中处于生效状态的目标版本标识数据,得到过滤后的至少一个目 标版本标识数据;删除版本标识映射表中与过滤后的至少一个目标版本标识数据关联的所有数据。In some embodiments of the present application, the data table update module 506 is further used to: query from the version identification mapping table to obtain the second target data within the second target historical time, where the second target historical time is M days before the last data update, where M is a natural number; match from the valid version identification linked list to obtain at least one target version identification data associated with the second target data; filter the target version identification data in the effective state from the at least one target version identification data to obtain the filtered at least one target version identification data. deleting all data in the version identification mapping table associated with at least one target version identification data after filtering.
在本申请一些实施例中,数据表更新模块506还用于:获取历史数据版本切换指令;根据历史数据版本切换指令,删除有效版本标识链表中指定版本标识数据,得到删除指定版本标识数据后的有效版本标识链表;根据删除指定版本标识数据后的有效版本标识链表和版本标识映射表,重新生成业务键映射表。In some embodiments of the present application, the data table update module 506 is also used to: obtain historical data version switching instructions; delete specified version identification data in the valid version identification list according to the historical data version switching instructions, and obtain the valid version identification list after deleting the specified version identification data; regenerate the business key mapping table according to the valid version identification list and the version identification mapping table after deleting the specified version identification data.
在本申请的另一个实施例中,如图8所示,本申请还提供一种电子设备600,其示出了本申请实施例所涉及电子设备的结构示意图,具体来讲:In another embodiment of the present application, as shown in FIG. 8 , the present application further provides an electronic device 600, which shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:
该电子设备可以包括一个或者一个以上处理核心的处理器601、一个或一个以上计算机可读存储介质的存储器602、电源603和输入单元604等部件。本领域技术人员可以理解,图8中示出的该电子设备结构并不构成对该电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:The electronic device may include components such as a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, a power supply 603, and an input unit 604. Those skilled in the art will appreciate that the electronic device structure shown in FIG8 does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
处理器601是该电子设备的控制中心,利用各种接口和线路连接整个该电子设备的各个部分,通过运行或执行存储在存储器602内的软件程序和/或模块,以及调用存储在存储器602内的数据,执行该电子设备的各种功能和处理数据,从而对该电子设备进行整体监控。可选的,处理器601可包括一个或多个处理核心;处理器601可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,优选的,处理器601可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器601中。The processor 601 is the control center of the electronic device, and uses various interfaces and lines to connect the various parts of the entire electronic device. By running or executing the software programs and/or modules stored in the memory 602, and calling the data stored in the memory 602, the processor 601 performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 601 may include one or more processing cores; the processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 601.
存储器602可用于存储软件程序以及模块,处理器601通过运行存储在存储器602的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器602可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据该电子设备的使用所创建的数据等。此外,存储器602可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器602还可以包括存储器控制器,以提供处理器601对存储器602的访问。The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.
该电子设备还包括给各个部件供电的电源603,优选的,电源603可以通过电源管理系统与处理器601逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源603还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The electronic device also includes a power supply 603 for supplying power to each component. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions. The power supply 603 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
该电子设备还可包括输入单元604,该输入单元604可用于接收输入的数字或字符信息,以 及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。The electronic device may further include an input unit 604, which may be used to receive input digital or character information. and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
尽管未示出,该电子设备还可以包括显示单元等,在此不再赘述。Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail here.
具体在本实施例中,该电子设备中的处理器601会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器602中,并由处理器601来运行存储在存储器602中的应用程序,从而实现各种功能,如下:Specifically in this embodiment, the processor 601 in the electronic device will load the executable files corresponding to the processes of one or more applications into the memory 602 according to the following instructions, and the processor 601 will run the application stored in the memory 602 to implement various functions, as follows:
发送数据更新通知信息至外围系统,数据更新通知信息用于通知外围系统从预设的对象存储介质中接收待处理数据集合中的待处理数据;Sending data update notification information to the peripheral system, where the data update notification information is used to notify the peripheral system to receive the to-be-processed data in the to-be-processed data set from a preset object storage medium;
若确定外围系统已接收待处理数据集合中的所有待处理数据,发送数据生效通知信息至外围系统,数据生效通知信息用于通知外围系统生效已接收的所有待处理数据;If it is determined that the peripheral system has received all the to-be-processed data in the to-be-processed data set, data validity notification information is sent to the peripheral system, where the data validity notification information is used to notify the peripheral system to validate all the to-be-processed data that have been received;
若确定外围系统已生效待处理数据集合中的所有待处理数据,将与待处理数据集合对应的数据处理任务状态更新为已生效。If it is determined that the peripheral system has validated all the to-be-processed data in the to-be-processed data set, the data processing task status corresponding to the to-be-processed data set is updated to validated.
具体在本申请另一个本实施例中,该电子设备中的处理器601会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器602中,并由处理器601来运行存储在存储器602中的应用程序,从而实现各种功能,如下:Specifically, in another embodiment of the present application, the processor 601 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 601 will run the application programs stored in the memory 602, thereby realizing various functions, as follows:
接收数据更新通知信息;Receive data update notification information;
根据数据更新通知信息,从预设的对象存储介质中接收待处理数据集合中的待处理数据;Receiving the data to be processed in the data set to be processed from a preset object storage medium according to the data update notification information;
当待处理数据接收完毕时,发送数据已接收信息至中台系统;When the data to be processed is received, the data reception information is sent to the middle office system;
接收数据生效通知信息;Receive data effectiveness notification information;
根据数据生效通知信息,生效已接收的所有待处理数据;According to the data effectiveness notification information, all received data to be processed are effective;
若待处理数据集合中的所有待处理数据均已生效时,对预设数据库中的数据版本管理表进行更新。If all the data to be processed in the data set to be processed are effective, the data version management table in the preset database is updated.
本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
在本申请一些实施例中,本申请还提供一种计算机可读存储介质,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。其上存储有计算机程序,计算机程序被处理器进行加载,以执行本申请实施例所提供的数据处理方法中的步骤。In some embodiments of the present application, the present application also provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the data processing method provided in the embodiments of the present application.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见上文针对其他实施例的详细描述,此处不再赘述。In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.
以上对本申请实施例所提供的一种数据处理方法、装置、电子设备及存储介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。 The above is a detailed introduction to a data processing method, device, electronic device and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims (16)

  1. 一种数据处理方法,其特征在于,应用于中台系统,所述中台系统与外围系统通信连接,所述方法包括:A data processing method, characterized in that it is applied to a middle-end system, wherein the middle-end system is communicatively connected with a peripheral system, and the method comprises:
    发送数据更新通知信息至所述外围系统,所述数据更新通知信息用于通知所述外围系统从预设的对象存储介质中接收待处理数据集合中的待处理数据;Sending data update notification information to the peripheral system, wherein the data update notification information is used to notify the peripheral system to receive the to-be-processed data in the to-be-processed data set from a preset object storage medium;
    若确定所述外围系统已接收所述待处理数据集合中的所有待处理数据,发送所述数据生效通知信息至所述外围系统,所述数据生效通知信息用于通知所述外围系统生效已接收的所有所述待处理数据;If it is determined that the peripheral system has received all the to-be-processed data in the to-be-processed data set, the data validity notification information is sent to the peripheral system, where the data validity notification information is used to notify the peripheral system to validate all the to-be-processed data that have been received;
    若确定所述外围系统已生效所述待处理数据集合中的所有所述待处理数据,将与所述待处理数据集合对应的数据处理任务状态更新为已生效。If it is determined that the peripheral system has validated all the data to be processed in the data set to be processed, the data processing task status corresponding to the data set to be processed is updated to validated.
  2. 如权利要求1所述的数据处理方法,其特征在于,在所述发送数据更新通知信息至所述外围系统之前,所述方法还包括:The data processing method according to claim 1, characterized in that before sending the data update notification information to the peripheral system, the method further comprises:
    配置多个所述待处理数据,得到所述待处理数据集合;configuring a plurality of the data to be processed to obtain the data set to be processed;
    将所述待处理数据集合打包,并将已配置完成的所述待处理数据集合上传至所述对象存储介质中。The to-be-processed data set is packaged, and the configured to-be-processed data set is uploaded to the object storage medium.
  3. 如权利要求1或2所述的数据处理方法,其特征在于,所述发送数据更新通知信息至所述外围系统,包括:The data processing method according to claim 1 or 2, characterized in that the sending of data update notification information to the peripheral system comprises:
    发送所述数据更新通知信息至数据更新消息队列,以通过所述数据更新消息队列发送所述数据更新通知信息至所述外围系统。The data update notification information is sent to a data update message queue, so as to send the data update notification information to the peripheral system through the data update message queue.
  4. 如权利要求1至3中任一项所述的数据处理方法,其特征在于,在所述若确定所述外围系统已接收所述待处理数据集合中的所有待处理数据,发送所述数据生效通知信息至所述外围系统之前,所述方法还包括:The data processing method according to any one of claims 1 to 3, characterized in that before sending the data validity notification information to the peripheral system if it is determined that the peripheral system has received all the data to be processed in the data set to be processed, the method further comprises:
    从回调状态消息队列中接收数据已接收信息,其中,当所述外围系统完成所述待处理数据集合中的一个所述待处理数据的接收任务时,所述回调状态消息队列从所述外围系统接收一次所述数据已接收信息;Receiving data received information from the callback status message queue, wherein when the peripheral system completes a receiving task of one of the to-be-processed data in the to-be-processed data set, the callback status message queue receives the data received information from the peripheral system once;
    若所述回调状态消息队列中的所有所述数据已接收信息均接收完毕,则确定所述外围系统已接收所述待处理数据集合中的所有所述待处理数据。If all the data received information in the callback status message queue has been received, it is determined that the peripheral system has received all the to-be-processed data in the to-be-processed data set.
  5. 如权利要求1至4中任一项所述的数据处理方法,其特征在于,所述若确定所述外围系统已接收所述待处理数据集合中的所有待处理数据,发送所述数据生效通知信息至所述外围系统,包括:The data processing method according to any one of claims 1 to 4, characterized in that if it is determined that the peripheral system has received all the data to be processed in the set of data to be processed, sending the data validity notification information to the peripheral system comprises:
    若确定所述外围系统已接收所述待处理数据集合中的所有待处理数据,发送所述数据生效通知信息至数据生效消息队列,以通过所述数据生效消息队列发送所述数据生效通知信息至所述外围系统。 If it is determined that the peripheral system has received all the to-be-processed data in the to-be-processed data set, the data validity notification information is sent to the data validity message queue, so as to send the data validity notification information to the peripheral system through the data validity message queue.
  6. 如权利要求1至5中任一项所述的数据处理方法,其特征在于,在所述若确定所述外围系统已生效所述待处理数据集合中的所有所述待处理数据,将与所述待处理数据集合对应的数据处理任务状态更新为已生效之前,所述方法还包括:The data processing method according to any one of claims 1 to 5, characterized in that before updating the data processing task status corresponding to the set of data to be processed to be effective if it is determined that the peripheral system has validated all the data to be processed in the set of data to be processed, the method further comprises:
    从回调状态消息队列中接收数据已生效信息,其中,当所述外围系统完成所述待处理数据集合中的一个所述待处理数据的生效任务时,所述回调状态消息队列从所述外围系统接收所述数据已生效信息;receiving data validation information from a callback status message queue, wherein when the peripheral system completes a validation task of one of the to-be-processed data in the to-be-processed data set, the callback status message queue receives the data validation information from the peripheral system;
    若所述回调状态消息队列中的所述数据已生效信息接收完毕,则确定所述外围系统已生效所述待处理数据集合中的所有所述待处理数据。If the data validation information in the callback status message queue has been received, it is determined that the peripheral system has validated all the to-be-processed data in the to-be-processed data set.
  7. 一种数据处理方法,其特征在于,应用于外围系统,所述外围系统与中台系统通信连接,所述方法包括:A data processing method, characterized in that it is applied to a peripheral system, the peripheral system is communicatively connected with a middle system, and the method comprises:
    接收数据更新通知信息;Receive data update notification information;
    根据所述数据更新通知信息,从预设的对象存储介质中接收待处理数据集合中的待处理数据;Receiving the to-be-processed data in the to-be-processed data set from a preset object storage medium according to the data update notification information;
    当所述待处理数据接收完毕时,发送数据已接收信息至所述中台系统;When the data to be processed is received, the data reception information is sent to the middle station system;
    接收数据生效通知信息;Receive data effectiveness notification information;
    根据所述数据生效通知信息,生效已接收的所有所述待处理数据;According to the data validation notification information, all the received data to be processed are validated;
    若所述待处理数据集合中的所有所述待处理数据均已生效时,对预设数据库中的数据版本管理表进行更新。If all the data to be processed in the data set to be processed are valid, the data version management table in the preset database is updated.
  8. 如权利要求7所述的数据处理方法,其特征在于,所述数据版本管理表包括版本标识映射表,所述待处理数据包括业务键,所述待处理数据集合包括当前数据版本标识,在所述根据所述数据更新通知信息,从预设的对象存储介质中接收待处理数据集合中的待处理数据之后,所述方法还包括:The data processing method according to claim 7, characterized in that the data version management table includes a version identification mapping table, the data to be processed includes a business key, the data set to be processed includes a current data version identification, and after receiving the data to be processed in the data set to be processed from a preset object storage medium according to the data update notification information, the method further includes:
    将所述业务键和所述当前数据版本标识同步保存至所述版本标识映射表。The service key and the current data version identifier are synchronously saved in the version identifier mapping table.
  9. 如权利要求8所述的数据处理方法,其特征在于,所述数据版本管理表还包括有效版本标识链表和业务键映射表,所述若所述待处理数据集合中的所有所述待处理数据均已生效时,对预设数据库中的数据版本管理表进行更新,包括:The data processing method according to claim 8, characterized in that the data version management table further includes a valid version identification chain table and a business key mapping table, and if all the data to be processed in the data set to be processed are effective, updating the data version management table in the preset database comprises:
    将已生效的待处理数据集合所对应的所述当前数据版本标识添加至所述有效版本标识链表;Adding the current data version identifier corresponding to the valid data set to be processed to the valid version identifier linked list;
    根据所述有效版本标识链表和所述版本标识映射表,生成所述业务键映射表。The service key mapping table is generated according to the valid version identifier chain list and the version identifier mapping table.
  10. 如权利要求9所述的数据处理方法,其特征在于,所述业务键映射表包括基础数据版本标识,所述方法还包括:The data processing method according to claim 9, wherein the business key mapping table includes a basic data version identifier, and the method further comprises:
    从所述有效版本标识链表中查询得到第一目标历史时间内的第一目标数据,所述第一目标历史时间为最后一次进行数据更新的前N天,N为自然数;Query and obtain the first target data within the first target historical time from the valid version identifier linked list, where the first target historical time is N days before the last data update, where N is a natural number;
    从所述版本标识映射表中匹配得到与所述第一目标数据关联的目标业务键和所述目标业务键的最新版本标识数据; Obtaining the target service key associated with the first target data and the latest version identification data of the target service key by matching from the version identification mapping table;
    将所述目标业务键的所述最新版本标识数据作为所述业务键映射表的新的所述基础数据版本标识。The latest version identification data of the target business key is used as the new basic data version identification of the business key mapping table.
  11. 如权利要求9或10所述的数据处理方法,其特征在于,还包括:The data processing method according to claim 9 or 10, further comprising:
    从所述版本标识映射表中查询得到第二目标历史时间内的第二目标数据,所述第二目标历史时间为最后一次进行数据更新的前M天,M为自然数;Obtain second target data within a second target historical time from the version identifier mapping table, where the second target historical time is M days before the last data update, where M is a natural number;
    从所述有效版本标识链表中匹配得到与所述第二目标数据关联的至少一个目标版本标识数据;Matching and obtaining at least one target version identification data associated with the second target data from the valid version identification chain list;
    过滤至少一个所述目标版本标识数据中处于生效状态的所述目标版本标识数据,得到过滤后的至少一个所述目标版本标识数据;Filtering the target version identification data in the effective state in at least one of the target version identification data to obtain the at least one target version identification data after filtering;
    删除所述版本标识映射表中与过滤后的至少一个所述目标版本标识数据关联的所有数据。All data in the version identification mapping table that is associated with at least one of the filtered target version identification data is deleted.
  12. 如权利要求9至11中任一项所述的数据处理方法,其特征在于,还包括:The data processing method according to any one of claims 9 to 11, further comprising:
    获取历史数据版本切换指令;Get historical data version switching instructions;
    根据所述历史数据版本切换指令,删除所述有效版本标识链表中指定版本标识数据,得到删除所述指定版本标识数据后的所述有效版本标识链表;According to the historical data version switching instruction, the specified version identification data in the valid version identification chain list is deleted to obtain the valid version identification chain list after deleting the specified version identification data;
    根据删除所述指定版本标识数据后的所述有效版本标识链表和所述版本标识映射表,重新生成所述业务键映射表。The service key mapping table is regenerated according to the valid version identification chain list and the version identification mapping table after deleting the specified version identification data.
  13. 一种数据处理装置,其特征在于,应用于中台系统,所述中台系统与外围系统通信连接,所述数据处理装置包括:A data processing device, characterized in that it is applied to a middle-end system, the middle-end system is communicatively connected with a peripheral system, and the data processing device comprises:
    更新信息发送模块,用于发送数据更新通知信息至所述外围系统,所述数据更新通知信息用于通知所述外围系统从预设的对象存储介质中接收待处理数据集合中的待处理数据;An update information sending module, used for sending data update notification information to the peripheral system, wherein the data update notification information is used for notifying the peripheral system to receive the to-be-processed data in the to-be-processed data set from a preset object storage medium;
    生效信息发送模块,用于若确定所述外围系统已接收所述待处理数据集合中的所有待处理数据,发送所述数据生效通知信息至所述外围系统,所述数据生效通知信息用于通知所述外围系统生效已接收的所有所述待处理数据;A validation information sending module, used for sending the data validation notification information to the peripheral system if it is determined that the peripheral system has received all the to-be-processed data in the to-be-processed data set, wherein the data validation notification information is used to notify the peripheral system to validate all the to-be-processed data that have been received;
    任务状态更新模块,用于若确定所述外围系统已生效所述待处理数据集合中的所有所述待处理数据,将与所述待处理数据集合对应的数据处理任务状态更新为已生效。The task status updating module is used to update the data processing task status corresponding to the to-be-processed data set to be effective if it is determined that the peripheral system has effective all the to-be-processed data in the to-be-processed data set.
  14. 一种数据处理装置,其特征在于,应用于外围系统,所述外围系统与中台系统通信连接,所述数据处理装置包括:A data processing device, characterized in that it is applied to a peripheral system, the peripheral system is communicatively connected with a middle-end system, and the data processing device comprises:
    更新信息接收模块,用于接收数据更新通知信息;An update information receiving module, used for receiving data update notification information;
    数据接收模块,用于根据所述数据更新通知信息,从预设的对象存储介质中接收待处理数据集合中的待处理数据;A data receiving module, configured to receive the to-be-processed data in the to-be-processed data set from a preset object storage medium according to the data update notification information;
    接收信息发送模块,用于当所述待处理数据接收完毕时,发送数据已接收信息至所述中台系统;A receiving information sending module is used to send data reception information to the middle station system when the data to be processed is received;
    生效信息接收模块,用于接收数据生效通知信息;An effective information receiving module is used to receive data effective notification information;
    数据生效模块,用于根据所述数据生效通知信息,生效已接收的所有所述待处理数据;A data validation module, used for validating all the received data to be processed according to the data validation notification information;
    数据表更新模块,用于若所述待处理数据集合中的所有所述待处理数据均已生效时,对预 设数据库中的数据版本管理表进行更新。A data table updating module is used to update the pre-processed data table if all the pre-processed data in the pre-processed data set have taken effect. Suppose the data version management table in the database is updated.
  15. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    一个或多个处理器;one or more processors;
    存储器;以及Memory; and
    一个或多个应用程序,其中所述一个或多个应用程序被存储于所述存储器中,并配置为由所述处理器执行以实现权利要求1至6或7至12中任一项所述的数据处理方法。One or more application programs, wherein the one or more application programs are stored in the memory and are configured to be executed by the processor to implement the data processing method according to any one of claims 1 to 6 or 7 to 12.
  16. 一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行上述权利要求1至6或7至12中任一项所述的数据处理方法。 A computer-readable storage medium storing a computer program for executing the data processing method according to any one of claims 1 to 6 or 7 to 12.
PCT/CN2023/122758 2022-09-29 2023-09-28 Data processing method and apparatus, electronic device, and storage medium WO2024067832A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211204177.4A CN117827854A (en) 2022-09-29 2022-09-29 Data processing method, device, electronic equipment and storage medium
CN202211204177.4 2022-09-29

Publications (1)

Publication Number Publication Date
WO2024067832A1 true WO2024067832A1 (en) 2024-04-04

Family

ID=90476389

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/122758 WO2024067832A1 (en) 2022-09-29 2023-09-28 Data processing method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN117827854A (en)
WO (1) WO2024067832A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118132120A (en) * 2024-05-07 2024-06-04 成都赛力斯科技有限公司 Service system updating method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10402252B1 (en) * 2016-03-30 2019-09-03 Amazon Technologies, Inc. Alternative event reporting for peripheral devices
CN110766310A (en) * 2019-10-18 2020-02-07 北京思特奇信息技术股份有限公司 Wisdom operation middle platform
CN114661289A (en) * 2022-04-02 2022-06-24 深圳易伙科技有限责任公司 Knowledge and data driving-based micro application development system and method
CN114969071A (en) * 2022-06-06 2022-08-30 中国银行股份有限公司 Data updating method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10402252B1 (en) * 2016-03-30 2019-09-03 Amazon Technologies, Inc. Alternative event reporting for peripheral devices
CN110766310A (en) * 2019-10-18 2020-02-07 北京思特奇信息技术股份有限公司 Wisdom operation middle platform
CN114661289A (en) * 2022-04-02 2022-06-24 深圳易伙科技有限责任公司 Knowledge and data driving-based micro application development system and method
CN114969071A (en) * 2022-06-06 2022-08-30 中国银行股份有限公司 Data updating method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118132120A (en) * 2024-05-07 2024-06-04 成都赛力斯科技有限公司 Service system updating method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN117827854A (en) 2024-04-05

Similar Documents

Publication Publication Date Title
US11599560B2 (en) Predictive and adaptive queue flushing for real-time data reconciliation between local and remote databases
US10911536B2 (en) Real-time synchronization of data between disparate cloud data sources
US20230400990A1 (en) System and method for performing live partitioning in a data store
CN108536761B (en) Report data query method and server
US9031910B2 (en) System and method for maintaining a cluster setup
CN102779185B (en) High-availability distribution type full-text index method
WO2019133230A1 (en) Violation resolution in client synchronization
CN109493076A (en) A kind of unique consuming method of Kafka message, system, server and storage medium
CN111143382B (en) Data processing method, system and computer readable storage medium
US8494888B2 (en) Offline modification of business data
WO2024067832A1 (en) Data processing method and apparatus, electronic device, and storage medium
WO2019109854A1 (en) Data processing method and device for distributed database, storage medium, and electronic device
CN110858194A (en) Method and device for expanding database
AU2014213556A1 (en) Employing user-context in connection with backup or restore of data
WO2022095366A1 (en) Redis-based data reading method and apparatus, device, and readable storage medium
WO2012151912A1 (en) Method and device for operating data of memory database
CN110968603A (en) Data access method and device
US9591059B2 (en) File change notifications in a scale-out NAS system
US11294866B2 (en) Lazy optimistic concurrency control
CN112860343B (en) Configuration changing method, system, device, electronic equipment and storage medium
CN112084206A (en) Database transaction request processing method, related device and storage medium
CN112685499A (en) Method, device and equipment for synchronizing process data of work service flow
US11243979B1 (en) Asynchronous propagation of database events
WO2024103898A1 (en) Database cluster management method and apparatus
CN102867029A (en) Method for managing catalogue of distributed file system and distributed file system

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: 23871056

Country of ref document: EP

Kind code of ref document: A1