CN108388438B - System base table updating method and device, computer equipment and storage medium - Google Patents

System base table updating method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN108388438B
CN108388438B CN201810123802.XA CN201810123802A CN108388438B CN 108388438 B CN108388438 B CN 108388438B CN 201810123802 A CN201810123802 A CN 201810123802A CN 108388438 B CN108388438 B CN 108388438B
Authority
CN
China
Prior art keywords
base table
message queue
distributed message
json
data
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201810123802.XA
Other languages
Chinese (zh)
Other versions
CN108388438A (en
Inventor
李依洁
刘元勋
亢宁
王雅各
孔晓霜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201810123802.XA priority Critical patent/CN108388438B/en
Publication of CN108388438A publication Critical patent/CN108388438A/en
Application granted granted Critical
Publication of CN108388438B publication Critical patent/CN108388438B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • 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
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The application relates to a system base table updating method, a system, computer equipment and a storage medium. The method comprises the following steps: sending the base table updating data of the system base table set to a distributed message queue; the system base table set is a set of system base tables with incidence relations; when the updating data of the base table contained in the distributed message queue is complete, marking a system base table set in the distributed message queue as a target version number; inquiring the current version number of a system base table set in a target system; when the target version number is the next version number of the current version number, sending a base table updating response to the target system through the distributed message queue; the base table update response is used for indicating the target system to acquire base table update data from the distributed message queue; when the base table update data contained in the target system is complete, the base table update response is also used to instruct the target system to update the base table update data into the corresponding system base table. By adopting the method, the updating efficiency of the system base table can be improved.

Description

System base table updating method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of database management technologies, and in particular, to a method and an apparatus for updating a system base table, a computer device, and a storage medium.
Background
The system base table is an entity table for storing specific base table data in the system database, and the entity table is a table corresponding to various data management objects, and is also called a base table and a data table. The system base tables will typically have associative relationships. For example, the system may include industry tables of multiple levels, and a first level industry table may have industries subdivided into sub-industries in a second level industry table, which then depends on the first level industry table.
However, when the system base table needs to be updated, due to packet loss or abnormal update sequence of the system base table, the second-level industry table is often updated successfully, but the first-level industry table depended by the second-level industry table is not updated successfully, and the like, so that the update of the system base table is abnormal, and the update of the system base table is failed.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device and a storage medium for updating a system base table, which can improve the success rate of updating the system base table.
A method of system base table update, the method comprising: sending the base table updating data of the system base table set to a distributed message queue; the system base table set is a set of system base tables with incidence relations; the base table updating data comprises a target version number; when the updating data of the base table contained in the distributed message queue is complete, marking the system base table set in the distributed message queue as the target version number; inquiring the current version number of the system base table set in a target system, and comparing the current version number with the target version number of the system base table set in a distributed message queue; when the target version number is the next version number of the current version number, sending a base table updating response to the target system through the distributed message queue; the base table update response is used for instructing the target system to acquire the base table update data from the distributed message queue; when the base table update data included in the target system is complete, the base table update response is further used for instructing the target system to update the base table update data to a corresponding system base table, and the target version number is used as the current version number of the system base table set in the target system.
In one embodiment, the sending the base table update data of the system base table set to the distributed message queue includes: packing the base table updating data of the system base table set into a plurality of JSON subdata packets; sending the JSON sub data packets to a distributed message queue; after the sending the base table update data of the system base table set to the distributed message queue, the method further includes: judging whether the base table updating data contained in the distributed message queue is complete or not according to the JSON sub data packets; when the JSON sub data packet contained in the distributed message queue is complete, judging that the base table updating data contained in the distributed message queue is complete; and when the JSON sub-data packet contained in the distributed message queue is incomplete, judging that the base table updating data contained in the distributed message queue is incomplete.
In one embodiment, the determining whether the base table update data included in the distributed message queue is complete according to the JSON sub-packets includes: counting the total number of first data packets of all JSON sub data packets, and counting the total number of second data packets of JSON sub data packets successfully received by the distributed message queue; when the total number of the first data packets is equal to the total number of the second data packets, judging that the JSON sub data packets contained in the distributed message queue are complete; and when the total number of the first data packets is not equal to the total number of the second data packets, determining that the JSON sub-data packets contained in the distributed message queue are incomplete.
In one embodiment, the determining whether the base table update data included in the distributed message queue is complete according to the JSON sub-packets includes: numbering each JSON sub-data packet; when the distributed message queue contains JSON sub data packets corresponding to all numbers, judging that the JSON sub data packets contained in the distributed message queue are complete; and when the distributed message queue does not contain JSON sub-packets corresponding to all the numbers, judging that the JSON sub-packets contained in the distributed message queue are incomplete.
In one embodiment, after the determining that the base table update data contained in the distributed message queue is incomplete, the method further includes: calculating according to the first time of packaging the base table updating data of the system base table set into a plurality of JSON sub-data packets and the second time of judging that the base table updating data contained in the distributed message queue is incomplete to obtain the system base table updating duration; when the updating duration of the system base table is longer than the preset duration, deleting the JSON sub data packets corresponding to the target version number in the distributed message queue, and returning to the step of sending the JSON sub data packets to the distributed message queue; and when the updating duration of the system base table is shorter than the preset duration, returning to the step of judging whether the updating data of the base table contained in the distributed message queue is complete according to the JSON sub-data packets.
In one embodiment, before sending the base table update response to the target system through the distributed message queue, the method further includes: receiving base table updating requests sent by a plurality of target systems; each base table updating request comprises a system identifier and a system base table set identifier of a corresponding target system; the querying a current version number of the system base table set in the target system includes: inquiring the current version number of the system base table set in the matched target system; and the matched target system is a system base table set identifier contained in the base table updating request corresponding to the corresponding system identifier and a target system consistent with the system base table set identifier corresponding to the system base table set.
In one embodiment, the base table update request further includes a system key, and the method further includes: verifying the system key according to the system identification; the querying the current version number of the system base table set in the matched target system comprises: and when the system key passes verification, inquiring the current version number of the system base table set in the matched target system.
An apparatus for updating a system base table, the apparatus comprising: the sending module is used for sending the base table updating data of the system base table set to the distributed message queue; the system base table set is a set of system base tables with incidence relations; the base table updating data comprises a target version number; a marking module, configured to mark the system base table set in the distributed message queue as the target version number when the base table update data included in the distributed message queue is complete; the query module is used for querying the current version number of the system base table set in the target system and comparing the current version number with the target version number of the system base table set in the distributed message queue; a response module, configured to send a base table update response to the target system through the distributed message queue when the target version number is a next version number of the current version number; the base table update response is used for instructing the target system to acquire the base table update data from the distributed message queue; when the base table update data included in the target system is complete, the base table update response is further used for instructing the target system to update the base table update data to a corresponding system base table, and the target version number is used as the current version number of the system base table set in the target system.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, implements the steps of the system base table updating method described in the various embodiments above.
A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the system base table updating method described in the above-mentioned embodiments.
According to the system base table updating method, the system base table updating device, the computer equipment and the storage medium, the base table updating data corresponding to the system base table set with the association relation are sent to the distributed message queue, and when the base table updating data contained in the distributed message queue are complete, the system base table set corresponding to the base table updating data in the distributed message queue is marked as the target version number. When the base table updating data contained in the distributed message queue is complete, the base table updating data of the target version number corresponding to the next version number of the current version number is determined by comparing the current version number of the system base table set in the target system with the target version number of the system base table set in the distributed message queue. By sending the base table update response to the target system, the target system can acquire the base table update data of the next version number from the distributed message queue, and when the base table update data contained in the target system is complete, the base table update data is updated to the corresponding system base table. After the updating of the system base table is completed, the target version number can be used as the current version number of the system base table set in the target system, and the next updating of the system base table is carried out when the base table updating data with the updated version number exists. The updating data of the base table of the system base table with the association relation is updated as a whole, and the updating of the system base table is carried out according to the sequence of the version numbers, so that the condition that the upper-lower relation of the system base table is abnormal when the system base table is updated is avoided, and the success rate of updating the system base table is improved.
Drawings
FIG. 1 is a diagram illustrating an exemplary implementation of a system base table update method;
FIG. 2 is a flow diagram illustrating a method for updating a base table of a system in accordance with one embodiment;
FIG. 3 is a diagram of a publish-subscribe model of a distributed message queue in one embodiment;
FIG. 4 is a block diagram of an apparatus for updating a base table of a system according to an embodiment;
FIG. 5 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, the first packet total may be referred to as the second packet total, and similarly, the second packet total may be referred to as the first packet total, without departing from the scope of the present disclosure. The first total number of data packets and the second total number of data packets are both total numbers of data packets, but are not the same total number of data packets.
The system base table updating method provided by the application can be applied to the application environment shown in fig. 1. Wherein the system server cluster 102 communicates with the base table server 104 over a network. The system server cluster 102 may include a plurality of system servers, such as a first system server 102a, a second system server 102b, and a third system server 102c, and each system server may have one or more corresponding target systems deployed thereon. The base table server 104 may send the base table update data of the system base table set to the distributed message queue, and mark the system base table set in the distributed message queue as a target version number when the base table update data included in the distributed message queue is complete. Base table server 104 may query the current version number of the set of system base tables in the target system of system servers in system server cluster 102 and compare the current version number to the target version number of the set of system base tables in the distributed message queue. When the target version number is the next version number of the current version number, a base table update response is sent to the target system through the distributed message queue, and the system server cluster 102 may obtain base table update data from the distributed message queue according to the base table update response. And when the base table updating data contained in the target system in the system server is complete, the target system updates the base table updating data to the corresponding system base table and takes the target version number as the current version number of the system base table set in the target system.
In one embodiment, as shown in fig. 2, a method for updating a system base table is provided, which is described by taking the method as an example applied to the base table server 104 in fig. 1, and includes the following steps:
step 202, sending the base table update data of the system base table set to a distributed message queue; the system base table set is a set of system base tables with incidence relations; the base table update data includes a target version number.
The system base table refers to an entity table used for storing specific base table data, and each target system comprises one or more system base tables needing system base table synchronization, and the system base tables include but are not limited to one or more of a field definition table, a configuration information table, a personal information table, an enterprise information table, an industry grade table, a city grade table and the like. The target system is a system which needs to update a system base table. The base table update data refers to base table data that needs to be added, deleted, changed, and the like in the system. The base table data refers to specific data of the system base table for the data management object. The system base table may contain fields such as table name, column type, column contents, index name, etc. Each field may correspond to one or more specific field values, and the base table data is composed of the specific field values. For example, for the data management object "industry", the base table data may be an industry name, an industry code, a superior industry code, an industry description, and the like. The related field values of each specific industry can form a piece of base table data, and the related field values of all the industries in the system base table form the base table data of the system base table. The target version number refers to the version identification of the update data of the base table.
A distributed message queue refers to a message queue that can hold a large amount of data and can process the data in parallel. Wherein, the message queue is a container for storing messages in the transmission process of the messages. Distributed message queues are divided into two broad categories, the Broker (middleware) category and the Brokerless (non-middleware) category. The distributed message queue of the Broker type refers to a distributed service with independent deployment, that is, a sender publishes a message to a Broker process, and then the Broker process pushes (Push) or pulls (Pull) the message to a subscriber. The Brokerless message queue is compiled into an Application program mainly in an API (Application Programming Interface) manner, and performs peer-to-peer communication between the Application programs.
In one embodiment, the associative relationships between the base tables of the system may be dependencies. The dependency relationship includes, but is not limited to, one or more of a value dependency, an existence dependency, an authentication dependency, a configuration dependency, a permission dependency, and the like. The value dependency means that, for example, when a field in the first system base table is a certain preset value, or a value is in a preset range, or a value meets a preset mode, or a value meets a preset type, the corresponding field in the second system base table can only be a corresponding specific value or value type; the existence of the dependency means that when the field in the first system base table is a preset value, the field in the second system base table correspondingly exists or does not exist; the verification dependency means that when the field in the first system base table is a preset value, the field in the second system base table is verified to have a corresponding verification rule, such as filling or non-filling; the permission dependence means that, for example, when the permission in the field in the first system base table is verified to be a preset value, the permission parameter in the configuration item of the field in the second system base table is correspondingly changed.
And step 204, marking the system base table set in the distributed message queue as a target version number when the updating data of the base table contained in the distributed message queue is complete.
In one embodiment, sending base table update data for a set of system base tables into a distributed message queue includes: packing the base table updating data of the system base table set into a plurality of JSON subdata packets; sending the JSON sub-data packets to a distributed message queue; after sending the base table update data of the system base table set to the distributed message queue, the method further comprises: judging whether the base table updating data contained in the distributed message queue is complete or not according to the JSON sub data packets; when the JSON sub data packet contained in the distributed message queue is complete, judging that the updating data of the base table contained in the distributed message queue is complete, and marking a system base table set corresponding to the JSON sub data packet in the distributed message queue as a target version number; and when the JSON sub-data packet contained in the distributed message queue is incomplete, judging that the updating data of the base table contained in the distributed message queue is incomplete.
The JSON (JSON Object notification, JSON Object tag, which is a lightweight data exchange format) sub-packet refers to a packet generated by converting base table update data in the JSON format. For example, 100000 rows of base table data that needs to be added, deleted, changed, etc. may be packed into one JSON sub-packet according to every 1000 rows of base table update data, and then 100 JSON sub-packets may be obtained.
Step 206, inquiring the current version number of the system base table set in the target system, and comparing the current version number with the target version number of the system base table set in the distributed message queue.
The current version number refers to a version identifier of a system base table set in the current target system, that is, the version identifier of the system base table set after the previous system base table in the target system is updated. Because the system base table is continuously updated, a corresponding target version number can be preset for each time of updating data of the base table, and the target version numbers can be numbered according to the updating sequence of the system base table. By comparing the current version number of the system base table set with the target version number of the system base table set in the distributed message queue, whether the target version number is the next version number of the current version number can be judged. For example, the target version number of the first base table update data that needs to be updated may be No. 1, the target version number of the second base table update data that needs to be updated may be No. 2, the target version number of the third base table update data that needs to be updated may be No. 3, and so on. Then version number 2 is the next version number of version number 1 and version number 3 is the next version number of version number 2.
In one embodiment, when the target version number is not the next version number to the current version number, then no processing is performed. For example, when the system base table set in the target system is version 7, the system base table update is not performed on the base table update data of the system base table set including version 10 in the distributed message queue until the base table update data of the system base table set including version 8 in the distributed message queue, so that step 208 is not performed. By updating the system base table according to the version number, the situation that the second-level industry table is successfully updated but the first-level industry table depended by the second-level industry table is not successfully updated and the upper-lower level relation of the system base table in the target system is abnormal is avoided.
Step 208, when the target version number is the next version number of the current version number, sending a base table updating response to the target system through the distributed message queue; the base table update response is used to instruct the target system to retrieve base table update data from the distributed message queue.
The base table update response is a response sent by the base table server to the corresponding target system, and is used for indicating the corresponding target system to acquire the base table update data from the distributed message queue. Each system server in the system server cluster can establish long connection with the distributed message queue, and whether the distributed message queue contains base table updating data of the base table of the system subscribed by the corresponding target system or not is monitored in real time. When the distributed message queue contains base table updating data having a subscription relationship with a target system in any one of the system servers, the server corresponding to the target system receives a base table updating response sent by the base table server through the distributed message queue,
FIG. 3 is a schematic diagram of a publish-subscribe model of a distributed message queue. The base table server may send the base table data and the system base table identifier of the corresponding system base table to the distributed message queue 304 as a Publisher 302(Publisher), so that a Subscriber (Subscriber) may obtain the corresponding message in the distributed message queue. There may be multiple subscribers, such as subscriber 306a, subscriber 306b, and subscriber 306 c. For example, when the publisher 302 publishes three messages corresponding to the system base table, i.e., message 1, message 2, and message 3(Msg1, 2, 3), the subscriber can obtain the corresponding message from the distributed message queue 304 according to the system base table identifier contained in the message, e.g., the subscriber 306a can obtain message 1 from the distributed message queue 304 (Msg1), the subscriber 306b can obtain message 2 from the distributed message queue 304 (Msg2), and the subscriber 306c can obtain message 3 from the distributed message queue 304 (Msg 3).
In one embodiment, each system server in the system server cluster may establish a long connection with the distributed message queue, and monitor in real time whether the distributed message queue contains base table update data of a system base table subscribed by a corresponding target system. When the distributed message queue contains base table update data having a subscription relationship with a target system in any one of the system servers, the system server corresponding to the target system receives a base table update response sent by the base table server through the distributed message queue.
Step 210, when the base table update data included in the target system is complete, the base table update response is further used to instruct the target system to update the base table update data to the corresponding system base table, and the target version number is used as the current version number of the system base table set in the target system.
When the system server corresponding to the target system is detected to successfully acquire the base table updating data corresponding to the target version number, the target system can update the base table updating data to the corresponding system base table. For example, the target system may add, delete, change, etc. the base table data in the corresponding system family table according to the base table update data.
In one embodiment, when the base table update data of the system base table set is delivered in the form of multiple JSON sub-packets, and when the JSON sub-packets included in the target system are complete, the target system may parse all the JSON sub-packets, and update the obtained complete base table update data to the corresponding system base table. The JSON sub-packet may include a plurality of fields, for example: "tableSet", such as "NEW _ INDUSTRY", represents updating the NEW _ INDUSTRY table set; target version number, which represents the whole update of the 100 data packets at this time, is the second update version of SSP _ CITY table; "table", such as "NEW _ INDUSTRY", represents the base table name of the particular update; "column" means the base list name of the particular update; "ACTION", representing this 1 line of data, is C (new), U (update), D (delete); "ID", "CREATED _ BY", "CREATED _ DATE", "UPDATED _ BY", "UPDATED _ DATE", which represent what the fields of the base table of a particular update are; a "count" such as 100 represents the whole update, and there are 100 packets; "orderNo", such as 3, represents the current packet, which is the 3 rd packet of 100 packets; "affectedLines" indicates which effects would be had by updating the base table with this 1 packet; "totalCnt" represents how many rows of data are affected in total by updating the base table with the 1 packet; "createdCnt" represents how many rows of data will be added by updating the base table with the 1 packet; "updatedCnt" which represents how many rows of data will be updated by updating the base table with the 1 packet; "deletedCnt" indicates how much row data will be deleted by updating the base table with this 1 packet.
In the system base table updating method, the base table updating data corresponding to the system base table set with the association relation is sent to the distributed message queue, and when the base table updating data contained in the distributed message queue is complete, the system base table set corresponding to the base table updating data in the distributed message queue is marked as the target version number. When the base table updating data contained in the distributed message queue is complete, the base table updating data of the target version number corresponding to the next version number of the current version number is determined by comparing the current version number of the system base table set in the target system with the target version number of the system base table set in the distributed message queue. And sending the base table update response to the target system, so that the target system can acquire the base table update data of the next version number from the distributed message queue, and when the base table update data contained in the target system is complete, the base table update data is updated to the corresponding system base table. After the updating of the system base table is completed, the target version number can be used as the current version number of the system base table set in the target system, and the next updating of the system base table is carried out when the base table updating data with the updated version number exists. The updating data of the base table of the system base table with the association relation is updated as a whole, and the updating of the system base table is carried out according to the sequence of the version numbers, so that the condition that the upper-lower relation of the system base table is abnormal when the system base table is updated is avoided, and the success rate of updating the system base table is improved.
It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, the determining whether the base table update data contained in the distributed message queue is complete according to the JSON sub-packets includes: counting the total number of first data packets of all JSON sub data packets, and counting the total number of second data packets of JSON sub data packets successfully received by a distributed message queue; when the total number of the first data packets is equal to the total number of the second data packets, judging that JSON sub data packets contained in the distributed message queue are complete; and when the total number of the first data packets is not equal to the total number of the second data packets, judging that JSON sub-data packets contained in the distributed message queue are incomplete.
For example, 100000 rows of base table data that needs to be added, deleted, changed, etc. are packed into one JSON sub-packet according to the update data of each 1000 rows of base table, and then the total number of the first packet is 100. And when the total number of the second data packets of the JSON sub-data packets successfully received by the distributed message queue is less than 100, indicating that the JSON sub-data packets contained in the distributed message queue are incomplete.
In one embodiment, the determining whether the base table update data contained in the distributed message queue is complete according to the JSON sub-packets includes: numbering each JSON sub-data packet; when the distributed message queue contains JSON sub data packets corresponding to all numbers, judging that the JSON sub data packets contained in the distributed message queue are complete; and when the distributed message queue does not contain JSON sub-data packets corresponding to all the numbers, judging that the JSON sub-data packets contained in the distributed message queue are incomplete.
For example, there are 100 JSON sub-packets with the number 1, the number 2, the number n, and the number 100, and when the distributed message queue includes the JSON sub-packet corresponding to all the numbers from the number 1 to the number 100, it is determined that the JSON sub-packet included in the distributed message queue is complete. And further detecting whether the JSON sub-data packets with repeated numbers exist, and if so, deleting the JSON sub-data packets with repeated numbers to ensure that each number only corresponds to one JSON sub-data packet, thereby reducing data redundancy.
In the embodiment, the base table updating data is packaged into the plurality of JSON sub-data packets, and each JSON sub-data packet is numbered, so that the abnormal JSON sub-data packets can be directly re-issued without being completely re-issued when the JSON sub-data packets are issued abnormally, the time for issuing the base table updating data is saved, and the updating efficiency of the system base table is improved.
In one embodiment, when the base table update data contained in the distributed message queue is incomplete, the system base table set corresponding to the base table update data contained in the distributed message queue may be marked as an abnormal version. And when the target system detects that the system base table set in the distributed message queue is an abnormal version, the system base table is not updated.
In one embodiment, after determining that the base table update data contained in the distributed message queue is incomplete, the method further comprises: calculating according to the first time of packaging the base table updating data of the system base table set into a plurality of JSON sub-data packets and the second time of judging that the base table updating data contained in the distributed message queue is incomplete to obtain the updating duration of the system base table; when the updating duration of the system base table is longer than the preset duration, deleting the JSON sub data packets corresponding to the target version number in the distributed message queue, and returning to the step of sending the JSON sub data packets to the distributed message queue; and when the updating duration of the system base table is shorter than the preset duration, returning to the step of judging whether the updating data of the base table contained in the distributed message queue is complete according to the JSON sub-data packets.
The first time refers to the time for starting updating the system base table, the second time refers to the time for judging that the base table updating data contained in the distributed message queue is incomplete currently, and the system base table updating time length refers to the actual time length for updating the system base table from the first time to the second time. When the system base table updating time length is less than the preset time length, for example, 2 minutes, it indicates that the base table server is still in the process of issuing the JSON sub data packet to the distributed message queue, and may temporarily not process the JSON sub data packet, and after waiting for a period of time, count again the total number of second data packets of the JSON sub data packet successfully received by the distributed message queue. When the updating time length of the system base table is longer than the preset time length, the fact that the JSON sub data packet is sent by the base table server at this time is indicated to be finished, and due to the fact that the updating data of the base table contained in the distributed message queue is incomplete, the fact that the JSON sub data packet is sent abnormally is indicated. When the JSON sub data packet is abnormally issued, the JSON sub data packet corresponding to the target version number in the distributed message queue can be deleted, and the base table server can execute the step of sending the JSON sub data packets to the distributed message queue again until the JSON sub data packets contained in the distributed message queue are complete.
In the embodiment, whether the JSON sub data packet is still sent down is judged according to the updating time length of the system base table, so that the possibility that the normal updating process of the system base table is judged to be abnormal is avoided, and the repeated sending work of the JSON sub data packet is prevented.
In one embodiment, before sending the base table update response to the target system through the distributed message queue, the method further comprises: receiving base table updating requests sent by a plurality of target systems; each base table updating request comprises a system identifier and a system base table set identifier of a corresponding target system; querying a current version number of a set of system base tables in the target system, comprising: inquiring the current version number of the system base table set in the matched target system; the matched target system is a target system which is consistent with the system base table set identification corresponding to the system base table set, wherein the system base table set identification is contained in the base table updating request corresponding to the corresponding system identification.
The base table updating request refers to a request that a target system is used for accessing a base table server and updating a system base table through the base table server. The system identifier is an identifier for distinguishing one target system from other target systems, such as an english name, an english name abbreviation, a chinese name abbreviation, and the like of the target system. The system base table set identification refers to the identification of the system base table set subscribed by the target system. When the system base table updating data exists, the target system with the mapping relation with the system base table set can be searched according to the system base table set related to the system base table updating data, and the system base table updating data is updated to the corresponding target system through the various system base table updating methods.
In one embodiment, the distributed message queue may send base table update responses to the corresponding target systems according to the system base table set identification. For example, when the distributed message Queue is of a Broker class, the distributed message Queue includes a message switch (Exchange) for specifying which Queue the message is routed to according to what rule), a message Queue bearer (Queue, each message is put into one or more queues), and a Binding (Binding for Binding Exchange and Queue according to the routing rule), and after receiving the message including the base table update data and the corresponding system base table set identifier, the message switch may route the message to the corresponding message Queue bearer according to the Binding rule, that is, the mapping relationship between the system identifier and the system base table set identifier, and the target system may obtain the base table update data in the message Queue bearer.
In one embodiment, the process of updating the base table update data in the target system to the system base table may also be set to rollback. When only the base table update data corresponding to a part of target version numbers in the target system is updated successfully, rolling back the corresponding base table data in the system base table set to the current version number before updating can be triggered. Whether the updating data of the base table is completely updated can be judged by detecting the last updating time of the updating data of the base table in the system base table and the total row number of the updating data of the base table in the system base table.
In one embodiment, the base table update request further includes a system key, and the method further includes: verifying the system key according to the system identifier; inquiring the current version number of the system base table set in the matched target system, wherein the method comprises the following steps: and when the system key passes verification, inquiring the current version number of the system base table set in the matched target system.
The system key refers to a key used by the target system to prove the identity of the target system, and the system key of each target system may be globally unique. The system key may be the token number TokenID assigned by the base table server for each target system. The system key may be composed of one or more of English letters, punctuation marks, Arabic numerals, etc.
In one embodiment, the system identifier may be encrypted by a preset encryption algorithm, and the obtained ciphertext may be used as the system key. For example, the system identifier may be encrypted by a single encryption Algorithm such as MD5(Message Digest Algorithm 5), SHA (Secure Hash Algorithm), HMAC (Hash Authentication Code), etc., the system identifier is converted into a character string of a fixed length, and the obtained character string is used as a system key. The global uniqueness of the system key can be ensured by using a ciphertext obtained by encrypting the system identifier as the system key. After the system identification and the system key are received, the received system identification can be encrypted through a preset encryption algorithm, and whether the obtained ciphertext is consistent with the received system key or not is judged. If yes, judging that the key passes the verification; if not, the key verification is judged not to be passed.
In one embodiment, a variety of attributes may be preset for the distributed message queue. For example, the message consumption mode (e.g., a point-to-point mode, a broadcast mode, a subscription mode, etc.), the message consumption mode (e.g., a push mode, a pull mode), the message encryption mode (e.g., the message may be transmitted and stored in a binary manner), the size limit of a single message (e.g., 32K, 64K), the message delivery efficiency (e.g., millisecond to 5 seconds), the message storage period (e.g., 5 days, after 5 days, the message is deleted regardless of whether the message is consumed or not), a function switch for sending and receiving the message (e.g., turning off the message function when the distributed message queue is abnormal) may be preset.
In one embodiment, as shown in FIG. 4, there is provided a system base table updating apparatus 400, comprising: a sending module 402, configured to send base table update data of the system base table set to a distributed message queue; the system base table set is a set of system base tables with incidence relations; the base table updating data comprises a target version number; a marking module 404, configured to mark a system base table set in the distributed message queue as a target version number when update data of the base table included in the distributed message queue is complete; the query module 406 is configured to query a current version number of a system base table set in the target system, and compare the current version number with a target version number of the system base table set in the distributed message queue; a response module 408, configured to send a base table update response to the target system through the distributed message queue when the target version number is a next version number of the current version number; the base table update response is used for indicating the target system to acquire base table update data from the distributed message queue; when the base table update data contained in the target system is complete, the base table update response is also used for indicating the target system to update the base table update data to the corresponding system base table, and the target version number is used as the current version number of the system base table set in the target system.
In one embodiment, the sending module 402 is further configured to pack the base table update data of the system base table set into a plurality of JSON sub-packets; sending the JSON sub-data packets to a distributed message queue; the device also comprises an integrity judging module which is used for judging whether the base table updating data contained in the distributed message queue is complete or not according to the JSON sub data packets; when the JSON sub data packet contained in the distributed message queue is complete, judging that the updating data of the base table contained in the distributed message queue is complete; and when the JSON sub-data packet contained in the distributed message queue is incomplete, judging that the updating data of the base table contained in the distributed message queue is incomplete.
In one embodiment, the integrity judgment module is further configured to count the total number of first data packets of all JSON sub data packets, and count the total number of second data packets of the JSON sub data packets successfully received by the distributed message queue; when the total number of the first data packets is equal to the total number of the second data packets, judging that JSON sub data packets contained in the distributed message queue are complete; and when the total number of the first data packets is not equal to the total number of the second data packets, judging that JSON sub-data packets contained in the distributed message queue are incomplete.
In one embodiment, the integrity judgment module is further configured to number each JSON sub-packet; when the distributed message queue contains JSON sub data packets corresponding to all numbers, judging that the JSON sub data packets contained in the distributed message queue are complete; and when the distributed message queue does not contain JSON sub-data packets corresponding to all the numbers, judging that the JSON sub-data packets contained in the distributed message queue are incomplete.
In an embodiment, the sending module 402 is further configured to perform calculation according to a first time for packing the base table update data of the system base table set into the multiple JSON sub-packets and a second time for determining that the base table update data included in the distributed message queue is incomplete, so as to obtain a system base table update duration; when the updating duration of the system base table is longer than the preset duration, deleting the JSON sub data packets corresponding to the target version number in the distributed message queue, and returning to the step of sending the JSON sub data packets to the distributed message queue; and when the updating duration of the system base table is shorter than the preset duration, returning to the step of judging whether the updating data of the base table contained in the distributed message queue is complete according to the JSON sub-data packets.
In one embodiment, the apparatus further comprises a receiving module, configured to receive base table update requests sent by a plurality of target systems; each base table updating request comprises a system identifier and a system base table set identifier of a corresponding target system; the query module 406 queries the current version number of the system base table set in the matched target system; the matched target system is a target system which is consistent with the system base table set identification corresponding to the system base table set, wherein the system base table set identification is contained in the base table updating request corresponding to the corresponding system identification.
In one embodiment, the base table update request further includes a system key, and the receiving module is further configured to verify the system key according to the system identifier; the query module 406 is further configured to query the current version number of the system base table set in the matching target system when the system key is verified.
For specific limitations of the system base table updating apparatus, reference may be made to the above limitations of the system base table updating method, which are not described herein again. The various modules in the system base table update apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing base table updating data, a system base table set and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a system base table update method.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program: sending the base table updating data of the system base table set to a distributed message queue; the system base table set is a set of system base tables with incidence relations; the base table updating data comprises a target version number; when the updating data of the base table contained in the distributed message queue is complete, marking a system base table set in the distributed message queue as a target version number; inquiring the current version number of a system base table set in a target system, and comparing the current version number with the target version number of the system base table set in a distributed message queue; when the target version number is the next version number of the current version number, sending a base table updating response to the target system through the distributed message queue; the base table update response is used for indicating the target system to acquire base table update data from the distributed message queue; when the base table update data contained in the target system is complete, the base table update response is also used for indicating the target system to update the base table update data to the corresponding system base table, and the target version number is used as the current version number of the system base table set in the target system.
In one embodiment, the step of sending base table update data for the set of system base tables into the distributed message queue, as implemented by the processor executing the computer program, comprises the steps of: packing the base table updating data of the system base table set into a plurality of JSON subdata packets; sending the JSON sub-data packets to a distributed message queue; after the step of sending base table update data for the set of system base tables into the distributed message queue is implemented, the method further comprises the steps of: judging whether the base table updating data contained in the distributed message queue is complete or not according to the JSON sub data packets; when the JSON sub data packet contained in the distributed message queue is complete, judging that the updating data of the base table contained in the distributed message queue is complete; and when the JSON sub-data packet contained in the distributed message queue is incomplete, judging that the updating data of the base table contained in the distributed message queue is incomplete.
In one embodiment, the step of determining whether the base table update data included in the distributed message queue is complete according to the JSON sub-packets when the processor executes the computer program includes the following steps: counting the total number of first data packets of all JSON sub data packets, and counting the total number of second data packets of JSON sub data packets successfully received by a distributed message queue; when the total number of the first data packets is equal to the total number of the second data packets, judging that JSON sub data packets contained in the distributed message queue are complete; and when the total number of the first data packets is not equal to the total number of the second data packets, judging that JSON sub-data packets contained in the distributed message queue are incomplete.
In one embodiment, the step of determining whether the base table update data included in the distributed message queue is complete according to the JSON sub-packets when the processor executes the computer program includes the following steps: numbering each JSON sub-data packet; when the distributed message queue contains JSON sub data packets corresponding to all numbers, judging that the JSON sub data packets contained in the distributed message queue are complete; and when the distributed message queue does not contain JSON sub-data packets corresponding to all the numbers, judging that the JSON sub-data packets contained in the distributed message queue are incomplete.
In one embodiment, the processor, when executing the computer program, after the step of determining that the base table update data contained in the distributed message queue is incomplete, further comprises the steps of: calculating according to the first time of packaging the base table updating data of the system base table set into a plurality of JSON sub-data packets and the second time of judging that the base table updating data contained in the distributed message queue is incomplete to obtain the updating duration of the system base table; when the updating duration of the system base table is longer than the preset duration, deleting the JSON sub data packets corresponding to the target version number in the distributed message queue, and returning to the step of sending the JSON sub data packets to the distributed message queue; and when the updating duration of the system base table is shorter than the preset duration, returning to the step of judging whether the updating data of the base table contained in the distributed message queue is complete according to the JSON sub-data packets.
In one embodiment, the processor, when executing the computer program, further comprises, prior to the step of sending a base table update response to the target system via the distributed message queue: receiving base table updating requests sent by a plurality of target systems; each base table updating request comprises a system identifier and a system base table set identifier of a corresponding target system; the step of querying the current version number of the system base table set in the target system comprises the following steps: inquiring the current version number of the system base table set in the matched target system; the matched target system is a target system which is consistent with the system base table set identification corresponding to the system base table set, wherein the system base table set identification is contained in the base table updating request corresponding to the corresponding system identification.
In one embodiment, the base table update request further includes a system key, and the processor executes the computer program to further perform the following steps: verifying the system key according to the system identifier; inquiring the current version number of the system base table set in the matched target system, wherein the method comprises the following steps: and when the system key passes verification, inquiring the current version number of the system base table set in the matched target system.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: sending the base table updating data of the system base table set to a distributed message queue; the system base table set is a set of system base tables with incidence relations; the base table updating data comprises a target version number; when the updating data of the base table contained in the distributed message queue is complete, marking a system base table set in the distributed message queue as a target version number; inquiring the current version number of a system base table set in a target system, and comparing the current version number with the target version number of the system base table set in a distributed message queue; when the target version number is the next version number of the current version number, sending a base table updating response to the target system through the distributed message queue; the base table update response is used for indicating the target system to acquire base table update data from the distributed message queue; when the base table update data contained in the target system is complete, the base table update response is also used for indicating the target system to update the base table update data to the corresponding system base table, and the target version number is used as the current version number of the system base table set in the target system.
In one embodiment, the computer program when executed by the processor performs the step of sending base table update data for the set of system base tables into the distributed message queue, comprising the steps of: packing the base table updating data of the system base table set into a plurality of JSON subdata packets; sending the JSON sub-data packets to a distributed message queue; after the step of sending base table update data for the set of system base tables into the distributed message queue is implemented, the method further comprises the steps of: judging whether the base table updating data contained in the distributed message queue is complete or not according to the JSON sub data packets; when the JSON sub data packet contained in the distributed message queue is complete, judging that the updating data of the base table contained in the distributed message queue is complete; and when the JSON sub-data packet contained in the distributed message queue is incomplete, judging that the updating data of the base table contained in the distributed message queue is incomplete.
In one embodiment, the step of determining whether the base table update data contained in the distributed message queue is complete according to the JSON sub-packets when the computer program is executed by the processor comprises the steps of: counting the total number of first data packets of all JSON sub data packets, and counting the total number of second data packets of JSON sub data packets successfully received by a distributed message queue; when the total number of the first data packets is equal to the total number of the second data packets, judging that JSON sub data packets contained in the distributed message queue are complete; and when the total number of the first data packets is not equal to the total number of the second data packets, judging that JSON sub-data packets contained in the distributed message queue are incomplete.
In one embodiment, the step of determining whether the base table update data contained in the distributed message queue is complete according to the JSON sub-packets when the computer program is executed by the processor comprises the steps of: numbering each JSON sub-data packet; when the distributed message queue contains JSON sub data packets corresponding to all numbers, judging that the JSON sub data packets contained in the distributed message queue are complete; and when the distributed message queue does not contain JSON sub-data packets corresponding to all the numbers, judging that the JSON sub-data packets contained in the distributed message queue are incomplete.
In one embodiment, the computer program, when executed by the processor, further comprises, after the step of performing determining that base table update data contained in the distributed message queue is incomplete, the steps of: calculating according to the first time of packaging the base table updating data of the system base table set into a plurality of JSON sub-data packets and the second time of judging that the base table updating data contained in the distributed message queue is incomplete to obtain the updating duration of the system base table; when the updating duration of the system base table is longer than the preset duration, deleting the JSON sub data packets corresponding to the target version number in the distributed message queue, and returning to the step of sending the JSON sub data packets to the distributed message queue; and when the updating duration of the system base table is shorter than the preset duration, returning to the step of judging whether the updating data of the base table contained in the distributed message queue is complete according to the JSON sub-data packets.
In one embodiment, the computer program when executed by the processor further comprises, prior to the step of sending a base table update response to the target system via the distributed message queue: receiving base table updating requests sent by a plurality of target systems; each base table updating request comprises a system identifier and a system base table set identifier of a corresponding target system; the step of querying the current version number of the system base table set in the target system comprises the following steps: inquiring the current version number of the system base table set in the matched target system; the matched target system is a target system which is consistent with the system base table set identification corresponding to the system base table set, wherein the system base table set identification is contained in the base table updating request corresponding to the corresponding system identification.
In one embodiment, the base table update request further includes a system key, and the computer program when executed by the processor further performs the steps of: verifying the system key according to the system identifier; inquiring the current version number of the system base table set in the matched target system, wherein the method comprises the following steps: and when the system key passes verification, inquiring the current version number of the system base table set in the matched target system.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (14)

1. A method of system base table update, the method comprising:
sending the base table updating data of the system base table set to a distributed message queue; the system base table set is a set of system base tables with incidence relations; the system base table is an entity table used for storing specific base table data; the base table updating data comprises a target version number;
when the updating data of the base table contained in the distributed message queue is complete, marking the system base table set in the distributed message queue as the target version number;
inquiring the current version number of the system base table set in a target system, and comparing the current version number with the target version number of the system base table set in a distributed message queue;
when the target version number is the next version number of the current version number, sending a base table updating response to the target system through the distributed message queue; the base table update response is used for instructing the target system to acquire the base table update data from the distributed message queue;
when the base table updating data contained in the target system is complete, the base table updating response is further used for instructing the target system to update the base table updating data to a corresponding system base table, and the target version number is used as the current version number of a system base table set in the target system;
the sending of the base table update data of the system base table set to the distributed message queue includes:
packing the base table updating data of the system base table set into a plurality of JSON subdata packets;
sending the JSON sub data packets to a distributed message queue;
after the sending the base table update data of the system base table set to the distributed message queue, the method further includes:
judging whether the base table updating data contained in the distributed message queue is complete or not according to the JSON sub data packets;
when the JSON sub data packet contained in the distributed message queue is complete, judging that the base table updating data contained in the distributed message queue is complete;
and when the JSON sub-data packet contained in the distributed message queue is incomplete, judging that the base table updating data contained in the distributed message queue is incomplete.
2. The method of claim 1, wherein the determining whether the base table update data contained in the distributed message queue is complete according to the JSON subpackets comprises:
counting the total number of first data packets of all JSON sub data packets, and counting the total number of second data packets of JSON sub data packets successfully received by the distributed message queue;
when the total number of the first data packets is equal to the total number of the second data packets, judging that the JSON sub data packets contained in the distributed message queue are complete;
and when the total number of the first data packets is not equal to the total number of the second data packets, determining that the JSON sub-data packets contained in the distributed message queue are incomplete.
3. The method of claim 1, wherein the determining whether the base table update data contained in the distributed message queue is complete according to the JSON subpackets comprises:
numbering each JSON sub-data packet;
when the distributed message queue contains JSON sub data packets corresponding to all numbers, judging that the JSON sub data packets contained in the distributed message queue are complete;
and when the distributed message queue does not contain JSON sub-packets corresponding to all the numbers, judging that the JSON sub-packets contained in the distributed message queue are incomplete.
4. The method of claim 1, wherein after the determining that the base table update data contained in the distributed message queue is incomplete, further comprising:
calculating according to the first time of packaging the base table updating data of the system base table set into a plurality of JSON sub-data packets and the second time of judging that the base table updating data contained in the distributed message queue is incomplete to obtain the system base table updating duration;
when the updating duration of the system base table is longer than the preset duration, deleting the JSON sub data packets corresponding to the target version number in the distributed message queue, and returning to the step of sending the JSON sub data packets to the distributed message queue;
and when the updating duration of the system base table is shorter than the preset duration, returning to the step of judging whether the updating data of the base table contained in the distributed message queue is complete according to the JSON sub-data packets.
5. The method of any of claims 1 to 3, further comprising, prior to said sending a base table update response to the target system via the distributed message queue:
receiving base table updating requests sent by a plurality of target systems; each base table updating request comprises a system identifier and a system base table set identifier of a corresponding target system;
the querying a current version number of the system base table set in the target system includes:
inquiring the current version number of the system base table set in the matched target system; and the matched target system is a system base table set identifier contained in the base table updating request corresponding to the corresponding system identifier and a target system consistent with the system base table set identifier corresponding to the system base table set.
6. The method of claim 5, wherein the base table update request further includes a system key, the method further comprising:
verifying the system key according to the system identification;
the querying the current version number of the system base table set in the matched target system comprises:
and when the system key passes verification, inquiring the current version number of the system base table set in the matched target system.
7. An apparatus for updating a system base table, the apparatus comprising:
the sending module is used for sending the base table updating data of the system base table set to the distributed message queue; the system base table set is a set of system base tables with incidence relations; the system base table is an entity table used for storing specific base table data; the base table updating data comprises a target version number;
a marking module, configured to mark the system base table set in the distributed message queue as the target version number when the base table update data included in the distributed message queue is complete;
the query module is used for querying the current version number of the system base table set in the target system and comparing the current version number with the target version number of the system base table set in the distributed message queue;
a response module, configured to send a base table update response to the target system through the distributed message queue when the target version number is a next version number of the current version number; the base table update response is used for instructing the target system to acquire the base table update data from the distributed message queue; when the base table updating data contained in the target system is complete, the base table updating response is further used for instructing the target system to update the base table updating data to a corresponding system base table, and the target version number is used as the current version number of a system base table set in the target system;
the sending module is further configured to package the base table update data of the system base table set into a plurality of JSON sub-data packets; sending the JSON sub data packets to a distributed message queue;
the device also comprises an integrity judgment module, wherein the integrity judgment module is used for judging whether the base table updating data contained in the distributed message queue is complete or not according to the JSON sub data packets; when the JSON sub data packet contained in the distributed message queue is complete, judging that the base table updating data contained in the distributed message queue is complete; and when the JSON sub-data packet contained in the distributed message queue is incomplete, judging that the base table updating data contained in the distributed message queue is incomplete.
8. The apparatus of claim 7, wherein the integrity determination module is further configured to count a total number of first data packets of all JSON subpackets, and count a total number of second data packets of the JSON subpackets successfully received by the distributed message queue;
when the total number of the first data packets is equal to the total number of the second data packets, judging that the JSON sub data packets contained in the distributed message queue are complete;
and when the total number of the first data packets is not equal to the total number of the second data packets, determining that the JSON sub-data packets contained in the distributed message queue are incomplete.
9. The apparatus of claim 7, wherein the integrity determination module is further configured to number each JSON sub-packet; when the distributed message queue contains JSON sub data packets corresponding to all numbers, judging that the JSON sub data packets contained in the distributed message queue are complete; and when the distributed message queue does not contain JSON sub-packets corresponding to all the numbers, judging that the JSON sub-packets contained in the distributed message queue are incomplete.
10. The apparatus of claim 7, wherein the sending module is further configured to perform a calculation according to a first time for packing base table update data of a system base table set into a plurality of JSON sub-packets and a second time for determining that the base table update data included in the distributed message queue is incomplete, so as to obtain a system base table update duration;
when the updating duration of the system base table is longer than the preset duration, deleting the JSON sub data packets corresponding to the target version number in the distributed message queue, and returning to the step of sending the JSON sub data packets to the distributed message queue;
and when the updating duration of the system base table is shorter than the preset duration, returning to the step of judging whether the updating data of the base table contained in the distributed message queue is complete according to the JSON sub-data packets.
11. The apparatus of any one of claims 7 to 9, further comprising:
the receiving module is used for receiving base table updating requests sent by a plurality of target systems; each base table updating request comprises a system identifier and a system base table set identifier of a corresponding target system;
the query module is used for querying the current version number of the system base table set in the matched target system; and the matched target system is a system base table set identifier contained in the base table updating request corresponding to the corresponding system identifier and a target system consistent with the system base table set identifier corresponding to the system base table set.
12. The apparatus of claim 11, wherein the base table update request further includes a system key,
the receiving module is further configured to verify the system key according to the system identifier;
the querying the current version number of the system base table set in the matched target system comprises:
and when the system key passes verification, inquiring the current version number of the system base table set in the matched target system.
13. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
14. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201810123802.XA 2018-02-07 2018-02-07 System base table updating method and device, computer equipment and storage medium Active CN108388438B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810123802.XA CN108388438B (en) 2018-02-07 2018-02-07 System base table updating method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810123802.XA CN108388438B (en) 2018-02-07 2018-02-07 System base table updating method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108388438A CN108388438A (en) 2018-08-10
CN108388438B true CN108388438B (en) 2021-04-23

Family

ID=63074397

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810123802.XA Active CN108388438B (en) 2018-02-07 2018-02-07 System base table updating method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108388438B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109634526B (en) * 2018-12-11 2022-04-22 浪潮(北京)电子信息产业有限公司 Data operation method based on object storage and related device
CN110083612B (en) * 2019-03-21 2021-09-17 北京三快在线科技有限公司 Data updating method and device, electronic equipment and readable storage medium
CN111177302B (en) * 2019-12-16 2024-02-13 金蝶软件(中国)有限公司 Service bill processing method, device, computer equipment and storage medium
CN111522672B (en) * 2020-04-24 2023-02-28 北京思特奇信息技术股份有限公司 Method and system for repeated consumption of fusing data
CN112667653A (en) * 2020-12-30 2021-04-16 平安普惠企业管理有限公司 Data updating method, device, equipment and storage medium
CN115328569B (en) * 2022-07-18 2024-03-15 易保网络技术(上海)有限公司 Method, system, electronic device and computer readable storage medium for processing data conflict

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679888A (en) * 2015-03-17 2015-06-03 浪潮集团有限公司 Device and method for data synchronization
CN105978921A (en) * 2016-07-29 2016-09-28 重庆长安汽车股份有限公司 Remote upgrading method for vehicle-mounted communication terminal
CN107085603A (en) * 2017-03-31 2017-08-22 北京奇艺世纪科技有限公司 A kind of data processing method and device
CN107301196A (en) * 2017-05-03 2017-10-27 北京小度信息科技有限公司 Method of data synchronization, device, equipment and monitoring server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6901417B2 (en) * 2002-01-11 2005-05-31 International Business Machines Corporation Method, system, and program for updating records in a database when applications have different version levels

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679888A (en) * 2015-03-17 2015-06-03 浪潮集团有限公司 Device and method for data synchronization
CN105978921A (en) * 2016-07-29 2016-09-28 重庆长安汽车股份有限公司 Remote upgrading method for vehicle-mounted communication terminal
CN107085603A (en) * 2017-03-31 2017-08-22 北京奇艺世纪科技有限公司 A kind of data processing method and device
CN107301196A (en) * 2017-05-03 2017-10-27 北京小度信息科技有限公司 Method of data synchronization, device, equipment and monitoring server

Also Published As

Publication number Publication date
CN108388438A (en) 2018-08-10

Similar Documents

Publication Publication Date Title
CN108388438B (en) System base table updating method and device, computer equipment and storage medium
CN108829727B (en) Data storage method and device, computer equipment and storage medium
CN110602239B (en) Block chain information storage method and related equipment
CN107886328B (en) Transaction processing method and device, computer equipment and storage medium
CN109359994B (en) Service processing method, device and system based on block chain
US11546348B2 (en) Data service system
CN110224855B (en) Registration method and device of micro service instance, computer equipment and storage medium
CN110543448A (en) data synchronization method, device, equipment and computer readable storage medium
CN108376154B (en) System base table synchronization method and device, computer equipment and storage medium
CN112214519B (en) Data query method, device, equipment and readable medium
CN111159233B (en) Distributed caching method, system, computer equipment and storage medium
CN111177121A (en) Order data feedback method and device, computer equipment and storage medium
CN110781140A (en) Method and device for data signature in block chain, computer equipment and storage medium
CN110599267A (en) Electronic invoice billing method and device, computer readable storage medium and computer equipment
CN108389124B (en) Data processing method, data processing device, computer equipment and storage medium
CN111382976B (en) Early warning data processing method and device, computer equipment and storage medium
CN109460182B (en) Data storage and reading method and device
CN112862455A (en) Test execution work order generation method and device, computer equipment and storage medium
CN114969803A (en) Data storage method, device and storage medium
CN112364059A (en) Correlation matching method, device, equipment and storage medium under multi-rule scene
CN111524009A (en) Transaction verification method and device for blockchain system and hardware equipment
CN111552989A (en) Service data processing method, device, equipment and storage medium based on block chain
CN110888892A (en) Block synchronization method, device and storage medium
CN110597466B (en) Control method and device of block chain node, storage medium and computer equipment
CN112738264B (en) Message middleware message transmission method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant