Primary key ID generation method and device, electronic equipment and storage medium

A successful and business technology, applied in the database field, it can solve the problems of limited application conditions, disordered primary key ID, and high system concurrency, achieving the effect of wide application scope and low configuration requirements

Pending Publication Date: 2022-03-11
CHINA CONSTRUCTION BANK
0 Cites 0 Cited by

AI-Extracted Technical Summary

Problems solved by technology

[0004] However, the method of using the database primary key auto-increment mechanism to generate the primary key ID is only applicable when the logic of the new system and the old system are highly consistent, and the configuration requirements are relatively high. If a transaction is successfully processed in the old system but fails in the new system, then It will lead to confusion of the primary key IDs generated by the new and old systems; the way of generating primary key IDs by splicing timestamps and specific business fields has limited appli...
View more

Method used

Therefore, the application provides a kind of main key ID generation method, is applied to the system with outbound calling function, can receive the quantity that the service corresponding to service request generates main key ID by judging; And select corresponding according to the quantity that generates main key ID The primary key ID generation method of the system mainly uses the outbound call function of the system to call the corresponding primary key ID in the system to be compared based on the global tracking serial number corresponding to each business to compare and update, further ensuring that the generated primary key ID is consistent with the The consistency of the primary key ID in the system can lay the foundation for the double issuance and follow-up of system transactions between both parties.
[0061] Specifically, the terminal device 101 sends the service request to the routing platform 102. Further, after receiving the service request, the routing platform 102 wi...
View more

Abstract

The invention relates to the technical field of databases, and provides a primary key ID generation method and device, electronic equipment and a storage medium, applied to a first business system, the method comprises the following steps: receiving a business request; the service request is a service request successfully processed by the second service system; determining the number of to-be-generated primary key IDs based on the service request; if the number of the primary key IDs to be generated is multiple, generating a global tracking serial number, multiple first primary key IDs and first business elements corresponding to the primary key IDs based on the business request, and calling corresponding second primary key IDs and second business elements in a second business system based on the global tracking serial number, and updating the first primary key ID based on a comparison result of the first business element and the second business element. Therefore, the consistency of the primary key IDs stored in the databases in the systems of the two parties is guaranteed, a foundation is laid for double-sending account following of transaction of the systems of the two parties, and the method is low in configuration requirement and wide in application range.

Application Domain

Database updatingSpecial data processing applications +1

Technology Topic

Service systemEngineering +5

Image

  • Primary key ID generation method and device, electronic equipment and storage medium
  • Primary key ID generation method and device, electronic equipment and storage medium
  • Primary key ID generation method and device, electronic equipment and storage medium

Examples

  • Experimental program(1)

Example Embodiment

[0051] Exemplary embodiments will be described in detail herein, and examples are illustrated in the drawings. The following description is related to the drawings, unless otherwise indicated, the same figures in the different drawings represent the same or similar elements. The embodiment described in the exemplary embodiments is not meant to all embodiments consistent with the present application. Instead, they are only examples of apparatus and methods consistent with some aspects of the present application as detailed in the appended claims.
[0052] The term "multiple" in this application refers to two or more. In the present application, "and / or" is merely an association relationship to describe the associated object, indicating that there may be three relationships, such as A and / or B, which can be represented: Alone present A, while there is A and B, separate There are three cases of B. Further, the character "/" in this application, generally means that the front and rear association object is a "or" relationship; in the formula, characters "/", indicating the relationship between the front and rear associations is a "remide". "The following (s) or similar expressions are referred to, referring to any combination of these items, including any combination of single items or plural (s). At least one of, B, or C, can be represented: A, B, C, AB, AC, BC, or ABC, where A, B, and C may be single, or multiple .
[0053] In order to facilitate the understanding of the technical solution of the present application embodiment, in the embodiment of the present application, the same item or similar items such as "first", "second", substantially the same, the same item or similar items are made substantially the same. For example, the first device and the second device are only for distinguishing devices, and they do not limit their order. Those skilled in the art will appreciate that the words "first" and "second" are not limited to the number and execution order, and "first", "second" and other words are not limited to a certain difference.
[0054] It should be noted that "exemplary" or "exemplary" or "," or "exemplary" or "exemplary" or "," Any embodiment or design of "exemplary" or "exemplary" as described in this application should not be construed as being more preferred or more advantageous than other embodiments or design. Specifically, the use of "exemplary" or "for example" is intended to present the relevant concept in a specific manner.
[0055] It will be appreciated that the various digital numbers involved in the embodiments of the present application are only the distinction of convenient, and are not intended to limit the scope of the embodiments of the present application.
[0056] It will be appreciated that in the embodiments of the present application, the size of the sequence numbers of each process does not mean that the order of execution sequence, the execution order of each process should be determined in its function and inherent logic, and should not be regarded The implementation process of the embodiment constitutes any defined.
[0057] First explain the nouns involved in this application:
[0058] Transaction double-income: When technically reconstructing the bank's trade system, there is usually a data account comparison stage, that is, the production of business transactions are sent to the old system and new systems, and the data differences between the new-term system. You can judge whether the new system is complete and smoothly inherits all business logic of the old system. For example, the old system can be a system that utilizes the old IBM host architecture system, and the new system can be a system that uses a distributed architecture, and the specific type of the present application is not limited to the new and old systems.
[0059] Primary key ID: Database key key number, usually random number. For example, customer number, debit card number, online banking nozzle, etc., can be used to distinguish between the identification number of the corresponding user. The number of random numbers of the primary key ID is not limited to the number of random numbers of the primary key ID. For example, it can be "11" or "8809813321".
[0060] The embodiments of the present application will be described below with reference to the accompanying drawings. figure 1 An application scenario is provided for the present application embodiment, and a primary key ID generating method provided herein can be applied to figure 1 In the application scenario shown, the application scene includes a terminal device 101, a routing platform 102, an old system 103, and a new system 104; in order to adapt to the development of the era, the bank's system needs to be updated, however, the bank's new core system and the old line There is a big difference in the system, so we must guarantee the new and old system parallel and double-increasing stages to ensure the consistency of the primary key ID in the old system database, we need to judge whether the new system is complete and smoothly inherits all business logic. .
[0061] Specifically, the terminal device 101 transmits the service request to the routing platform 102, and the routing platform 102 will first process the service request to the old system 103 after receiving the service request, and if the old system 103 is handled successfully And the message feedback to the process is given to the routing platform 102, further, the routing platform 102 receives the message to send the service request to the new system 104, because the new system 104 and the old system 103 are different, It may be different for the processing order of multiple information in the same business, and there is a possible two system generated multiple primary key IDs that cannot be corresponding, so it is necessary to take the primary key ID generating method of the present application, the primary key ID generated in the old system 103. Update the primary key ID generated in the new system 104 to ensure the consistency of the primary key ID in the database in both parties, lay the foundation for both parties.
[0062] It should be noted that the process will be terminated in the routing platform 102 to the old system, the old system processing error, the flow will terminate, the routing platform 102 can return the error information directly to the terminal device.
[0063] It should be noted that the number of terminal devices and the number of service requests are not specified.
[0064] The above terminal device may be a wireless terminal or a wired terminal. The wireless terminal can refer to the user with a device that provides voice and / or other service data connectivity, a handheld device with a wireless connection function, or other processing devices connected to the wireless modem. The wireless terminal can communicate with one or more core network devices via a radio access network (RAN). The wireless terminal can be a mobile terminal, such as a mobile phone (or a "cellular" telephone) and a mobile terminal. Computers, for example, may be portable, pocket, handheld, computer built-in or in-vehicle mobile devices, exchange language and / or data with wireless access network. For example, the wireless terminal can also be a personal communication service (PCS) telephone, a cordless telephone, a session initiament protocol (SIP) phone, WiReless Local Loop, WLL station, personal digital assistant Equipment such as Personal Digital Assistant, PDA. The wireless terminal can also be referred to as a system, a subscriber unit, a subscriber station, a mobile station (Mobile station), a remote station (Remote station), remote terminal (Remote Terminal), In the Terminal, User Terminal, User Agent, User Device (User Device User Equipment) is not limited. Optionally, the terminal device can also be a smart watch, a tablet, and other devices.
[0065] In the prior art, when the same transaction logic is handled in the new system and the old system, the corresponding primary key ID can be directly utilized by the respective database primary keys; it is also possible to directly utilize the timestamp of the individual system to process transaction to the database. Specific business fields in the transaction generate corresponding primary key IDs; can also obtain the number of numbers supplied from the third party code generation system to generate the corresponding primary key ID.
[0066] However, the mode of using the database main key to generate the primary key ID only applies only to the high-end highness of the new system and the old system logic, the configuration requirements are high, if a transaction is successful in the old system, the new system processing failed It will cause the next new and old system generated primary key ID mess; use the timestamp and the specific service field to generate the main key ID, the applicable conditions are limited, and the new old system clock is completely consistent, and the system is not very high, Otherwise, the primary key ID is chaos; uses third-party number generation system to generate primary key IDs require new systems and old systems to have excels, and the architecture of many old system applications of many banks is not allowed, and the scenario is available limitation.
[0067] Therefore, the present application provides a primary key ID generation method, and is applied to a system having an outer call adjustment function, and can determine the number of main key IDs corresponding to the service request corresponding to the service request; and select the corresponding primary key ID according to the number of generated primary key IDs. Generating a method, the method mainly utilizes the overall callback function of the system based on the global key ID to be compared to the primary key ID corresponding to the system in the system, further guarantee the generated primary key ID and the system in the system. The consistency of the primary key ID can lay the foundation for both parties.
[0068] Exemplary, figure 2 A flow diagram of a primary key ID generating method provided in the present application embodiment, such as figure 2 As shown, the method of the present application embodiment includes:
[0069] S201, receive a business request; the service request is a successful service request for the second service system.
[0070] In this step, the first service system receives a service request, and the first service system can refer to a system having an outer call modulation function, which can be a bank new core system, and the second service system is a bank port system.
[0071] It should be noted that the service request received by the first service system must be a successful service request for the second service system. If the second service system fails when processing a certain service request, the error will be reported to the execution of the service request. And the error message returns to the user's terminal device. If the second service system is successful during processing a service request, the second service system will use the global tracking of the business transaction, a business transaction. Duplicate business elements and generated primary key IDs are recorded in the table, for example, the table name of the table is OLD_SYS_TRACE2, which is as follows:
[0072]
[0073]Where old_sys_trace2 represents the table name; evt_trace_id represents the global tracking water number, which is the only way to identify a transaction, that is, a business corresponding to a global tracking water number; table_name represents the database table name, which is stored in the database The global tracking of the corresponding relationship between the stream number and the primary key ID, table, table_name is the sub-table in OLD_SYS_TRACE2; Biz_field1 represents business elements 1, biz_field2 represents business elements 2, biz_field3 represents business elements 3; Old_sys_id indicates the old system primary key ID, The primary key ID generated in a certain database table for a business transaction.
[0074] It will be appreciated that the above table is not limited to the form of a table, and may, for example, other data structures, for example, an array, queue or stack, or the like, and other factors can also be included in the above table. The specific form and table of the table does not specifically limit the specific forms and tables of the table, but the various factors required for the present application must be included in the above table. Among them, the name "OLD_SYS_TRACE2", the global trace number "evt_trace_id" "evt_trace_id", the business element 1 "Biz_Field1", etc., for example, the "Old Table 2", the overall game Tracking the "ID number", business element 1 "D1", etc., this application is not specifically limited.
[0075] It should be noted that the structure of the table appearing in the following example is similar to the structure of the above table, but the structure of the factor is different, and the structure of the table in the following embodiment is not limited, and the following is not Repeat again.
[0076] S202, determine the number of primary key IDs to be generated based on the service request.
[0077] In this step, the first service system determines that the service request corresponding to the service request can generate several primary key IDs, further, select the corresponding method of generating the primary key ID according to the number of generated primary key IDs.
[0078] Exemplary, if there is a number of possibilities for the same option in a service, for example, the way the contacts corresponding to the service 1 can be the landline number, or the mobile phone number, when the machine number and the mobile phone number are present, corresponding The service will generate two primary key IDs, after the service request for the first service system is receiving the service request, it will determine that the service generates two primary key IDs.
[0079] S203, if the number of primary key IDs to be generated is multiple, the first service elements corresponding to the global tracking water number, the plurality of first main key IDs, and each primary key ID is generated based on the service request, and is based on the global tracking. Number Calls the corresponding second primary key ID and the second service element in the second service system, by comparing the first service element and the second service element, based on the alignment result, based on the alignment result The second primary key ID updates the first main key ID; wherein each business request corresponds to the unique global tracking water number.
[0080] In the present application embodiment, the global tracking water number can refer to the top system generation, the backend system sequentially passes, stores, and prints the encoding number of the log output. For operation and maintenance query problems, business full link tracking, and testing, the global tracking water number is unique, each business generates a unique global tracking water number when processing, that is, each business request corresponds to the only global tracking serial number. Business elements can refer to elements that do not repeat them between multiple primary key IDs corresponding to a business, such as customer name, business license number, organizational code, etc., in order to distinguish between primary key ID, the number of business elements is at least one .
[0081] In this step, the alignment result may be corresponding to the first service element and the second service element, or may be at least one first service element and the second business element, for the first service element and the second The case where the business element corresponds to the result of two processing results, that is, multiple first service elements and the second service elements are the same, but the corresponding primary key ID is different, replace the primary key ID corresponding to the second service element. The primary key ID corresponding to a business element, if the corresponding primary key ID is different, the primary key ID corresponding to the first service element can be directly retained.
[0082] It should be noted that if at least one first service element is not corresponding to the second service element, the primary key ID corresponding to the second service element is replaced, replacing the primary key ID corresponding to the first service element, and the first service The elements are replaced with the second business feature.
[0083] In this step, the first service system generates a global tracking water number, a plurality of first main key IDs, and the first service elements corresponding to each primary key ID, and records the first service system to NEW_SYS_TRACE. In the table, in which the tables will also record which data is processed. Which data is not processed, and the processed data refers to a record that has generated the final primary key ID, that is, the first business element. The first main key ID after the second service element is updated, and the corresponding logo is added to the processed record and the unprocessed record, for example, the processed record adds processing flag "1", the unprocessed record add processing Sign "0". Specifically, the structure of the New_SYS_TRACE table is as follows:
[0084]
[0085] Among them, new_sys_trace represents the table name; evt_trace_id represents the global tracking of the water, for the whole uniquely identifies a transaction, the only global tracking water number; Table_Name represents the database table name, which is stored in the database The global tracking of the corresponding relationship between the water number and the primary key ID and other related data, table_name is the sub-table in new_sys_trace; biz_field1 represents the business element 1, biz_field2 represents the business element 2, biz_field3 represents the business element 3; new_sys_id represents the new system primary key ID, The primary key ID generated in a certain database table is generated in a business transaction; Process_FLLAG represents the processing flag, "1" represents the service record has been processed, "0" represents the service record untreated.
[0086] It should be noted that the above NEW_SYS_TRACE is a table of the first service system generated based on the service request, and the present application adds a corresponding flag for the processed record and unprocessed records, not specifically defined, the above is only an example description, the two signs Can be used to distinguish or not processed.
[0087] Exemplary, in figure 1 Under the application scenario, after receiving the service request, determine the number of primary key IDs to be generated by the service request, first, the new system 104 generates a global tracking water number "A0410000000131" and 2 based on the service request The first main key ID "034209001" and "034209002", as well as the first main key ID "034209001" corresponding to the first business element "Company 1, business license, 8809811122", first main key ID "034209002" corresponding first business Elements "Company 2, business license, 880981333333" "028709001" corresponds to the second business element "Company 1, business license, 8809811122", second primary key ID "08877333", the second business element "Company 2, business license, 8809813321", by comparing the first business elements and Second business elements, find that the first main key ID corresponding to the first business element is different from the second primary key ID corresponding to the second service element, and can be changed to "028709001" in the new system 104 in the new system 104. "088773331".
[0088] It should be noted that after the new system 104 obtains the updated primary key ID, by calling the same primary key ID in the new system 104 and the old system 103, the data corresponding to the respective primary keys ID is queried, and further, by comparing the old system Data differences can determine whether the new system 102 inherits all business logic of the old system 103, the above process to use the process of using the old system 103 to use the new and old system's data to compare the comparison, using this process to test the new system Integrity and stability, facilitating accelerating the process of replacing new systems.
[0089] Therefore, the primary key ID generating method provided herein does not rely on third-party systems, and only the first service system supports transaction-called modification, the second service system does not need to support transaction-opening call modifiers, it can guarantee the first The consistency of primary key ID in the database in the second business system can not only reduce resource waste, but also lay the foundation for both system transactions, the configuration requirements are low, wide application range.
[0090] It should be noted that the new system appearing in the following examples represents the first service system, the old system, which represents the second service system, and the following is no longer repeated.
[0091] Optionally, the method also includes:
[0092] If the number of primary key IDs to be generated is one, then the second service system is called based on the global tracking stream number and the table name generated by the service request, and utilizes the global tracking water number and the table name to acquire the primary key ID. .
[0093] In this step, the number of primary key IDs based on the service request is 1, so after the second service system is successfully processed, only the global tracking flow number and the generated primary key ID of the business transaction is required. Record in the table, for example, the table name is OLD_SYS_TRACE1, which is as follows:
[0094]
[0095] Where old_sys_trace1 represents the table name; evt_trace_id indicates that the global tracking of the water number is the only way to identify a transaction, that is, a business corresponding to a global tracking water number; table_name represents the database table name, the table is stored in the database The global tracking of the corresponding relationship between the flow number and the primary key ID and tables of other related data, table_name is the sub-table in OLD_SYS_TRACE1; Old_sys_id indicates the old system primary key ID, generated in a certain database table in a certain database table.
[0096] Exemplary, in figure 1 Under the application scenario, after receiving the service request, determine the number of primary key IDs to be generated by the service request corresponding to the service request, the new system 104 only needs to generate a global tracking water number "A0410000000131" and a table name. "OLD_SYS_TRACE1", further, based on the global tracking water number "A0410000000131" and the table name "OLD_SYS_TRACE1" can call the main key ID "028709001" "in the old system 103, the primary key ID" 028709001 "is the service in the new system 104 Corresponding primary key ID.
[0097] It should be noted that when the number of primary key IDs to be generated is one, the second service system only needs to generate a primary key ID based on the global tracking stream number and a table name generated by the service request.
[0098]Therefore, when a business transaction will only generate a primary key ID in the database table, the primary key ID generated directly to the second service system can not only reduce the waste, save space, but also improve the accuracy of processing.
[0099] Optionally, the primary key ID is obtained using the global tracking of the water number and the table name, including:
[0100] Based on the table name acquisition database, the table is used to store the corresponding relationship between the global tracking water number and the primary key ID;
[0101] The corresponding primary key ID is found in the table with the global tracking water number in the table.
[0102] Exemplary, in figure 1 Under the application scenario, the new system 104 generates a global tracking of the "OLD_SYS_TRACE1" based on the business request, and can first obtain the table corresponding to the database in the database, further, in the "OLD_SYS_TRACE1" table based on the table name "OLD_SYS_TRACE1". The primary key ID "028709001" corresponding to the global tracking water number "A0410000000131" is found.
[0103] Therefore, the lookup rate can be improved, and the primary key ID corresponding to the service request is accurately found.
[0104] Optionally, each main key ID corresponds to at least one business element, the service element does not repeat the elements between the plurality of primary key IDs corresponding to the service; the second service system is called based on the global tracking water number. The corresponding second primary key ID and the second business feature include:
[0105] The launch polling process reads the processing record corresponding to the service in the pre-stored table in the second service system; the pre-storage table is used to store the global tracking water number of the service system processing generated by the second service system processing service request, second Business elements, second primary key IDs and processing records; the processing record includes recording that has been processed and unprocessed; the processed record is called and is used to update the first main key ID; The record is recorded as a record that is not called;
[0106] The second primary key ID and the second service element corresponding to the unopened record in the processing record are found using the global tracking of the water number.
[0107] In the present application embodiment, the polling process may refer to whether the system creation is inquiry whether each record is processed in advance storage table, and no call, then ask the next record, then constantly revive the process, A record that has not been processed in the table.
[0108] In this step, the pre-stored table is used to store the global tracking water number, the second service element, the second primary key ID, and the processing record that the second service system processing service request generated, including the processed record and not Records of the processing, the structure portion of the pre-store table can be "OLD_SYS_TRACE2" as described above, but the pre-storage table further includes processing records.
[0109] Exemplary, in figure 1 Under the application scenario, the new system 104 generates a global tracking water number "A04100000000131" and 2 first main key ID "034209001" and "034209002", as well as the first main key ID "034209001" corresponding to the first service element corresponding to the first main key ID "034209001" "Company 1, business license, 8809811122", first main key ID "034209002", "Company 2, business license, 8809813321", start the polling process reads the business in advance storage table in the old system 103 Corresponding processing record; further, read into a record in the pre-storage table, using the global tracking water number "A0410000000131" to find the second primary key ID and the second service that have not yet been processed in the recorded record Elements, respectively, the second main key ID "028709001" "Company 1, business license, 8809811122", second primary key ID "08877333" corresponding second business element "Company 2, business license, 88098133321".
[0110] Therefore, the recorded record in the table of the second service system is queried by polling, and all records can be overwritten.
[0111] Reduce omissions and improve the success rate.
[0112] Optionally, the number of first service elements and second service elements is plural; the second primary key ID is updated based on the alignment result, including:
[0113] If a plurality of the first service elements and the second service elements correspond, the second primary key ID is updated, based on the first service element and the corresponding relationship of the second service element, using the second primary key ID update the first Programs ID;
[0114] When any of the first service elements are not corresponding to the second service element, multiple of the second service elements replace the plurality of the first service elements, and utilize a plurality of the second primary key ID. Replace the plurality of the first main key ID, and will replace the primary key ID and its corresponding service feature feedback to the operator, and the transportation maintenance personnel checks if there is a problem with this replacement.
[0115] In this step, it is not limited to the way the main key ID of the final replacement and its corresponding service feature is reflected in the way to view the operator, and can be sent to the terminal device of the operator in a prompt message to supply the transportation personnel to view Is there a problem with this replace, or the replacement result can be directly displayed on the display screen of the first service system, and send a prompt information. The transportation maintenance personnel check if there is a problem in this replacement, and the present application is not specific. limited.
[0116] Exemplary, in figure 1 Under the application scenario, if the new system 104 generates a global tracking water number "A0410000000131" and 2 first main key ID "034209001" and "034209002", there is a first service element corresponding to the first main key ID "034209001". "Company 1, business license, 8809811122", first main key ID "034209002", the first business element "Company 2, business license, 8809813321", the old system 103 generates a global tracking water number "A0410000000131" and 2 based on the service request The first main key ID "034209001" and "034209002", as well as the second main key ID "034209001" corresponding to the second business element "Company 1, business license, 8809811122", second primary key ID "034209002" corresponding second service Elements "Company 2, business license, 88098133321", can determine that both the first service elements and the second service elements are correspondingly corresponding, and the first main key ID is determined based on the above alignment results, and "034209002" is determined.
[0117] Optionally, if the old system 103 generates a global tracking water number "A04100000000131" and 2 second primary keys ID "034209003" and "034209004", and the second primary key ID "034209003" corresponds to the second business element. "Company 3, business license, 8809811123", second primary key ID "034209004" corresponding second business element "Company 3, business license, 88098133324", the above first business elements and second business elements are not one The second service element corresponding to the two second primary key IDs is replaced by the first service element corresponding to the two first main key IDs generated by the first service system, and replaced the first service using the two second primary key IDs described above. The two first main key IDs generated by the system generate the corresponding primary key IDs "034209003" and "034209004", and the primary key ID "034209003" and "034209004" and its corresponding business elements "Company 3, business license, 8809811123" And "Company 3, Business License, 88098133324" to send the transportation person's terminal equipment to the operation vehicle to see if there is a problem.
[0118] Optionally, if the old system 103 generates a global tracking water number "A04100000000131" and 2 second primary keys ID "034209001" and "034209004", there is a second main key ID "034209001" corresponding to second business elements. "Company 1, business license, 8809811121", second primary key ID "034209004" corresponding second business element "Company 3, business license, 880981333324", only the first main key ID "034209002" corresponds to the first business element and The second business element corresponding to the second primary key ID "034209004" does not correspond to the second service elements corresponding to the first second primary key ID "034209004" replace one first main key ID generated by the first service system. 034209002 "The corresponding first business element, and uses the above-described one second primary key ID to replace the first main key ID generated by the first service system, generate the corresponding primary key ID" 034209004 ", and the other retain the first main key ID" 034209001 "Do not need to be replaced, and the main key ID" 034209004 "and its corresponding business element" Company 3, business license, 8809811124 "will be sent to the operator's terminal to the operation vehicle's terminal equipment for transporter personnel to view this time Replacement has problems.
[0119] It should be noted that the first service element corresponding to each first main key ID, any one of the first service elements and the second service elements are not correspondingly, not only the second service element will be utilized. Replacing, it is also necessary to replace the first primary key ID corresponding to the first element by the second primary key ID corresponding to the second service element.
[0120] Therefore, for the above different circumstances, the present application has a method of responding to a solution.
[0121] Optionally, the first main key ID is updated by the second primary key ID based on the corresponding relationship of the first service element and the second service element, including:
[0122] A second primary key ID corresponding to the second service element matching the first service element is determined for each of the first service elements, and the first main key ID is determined to determine the first main key ID and the second primary key. The ID is the same;
[0123] If the same, the first main key ID is retained;
[0124] If the second primary key ID is replaced by the second primary key ID.
[0125] Exemplary, in figure 1Under the scenario, when the new service request based system 104 generates a global tracking serial numbers "A0410000000131" and the two first primary key ID "034209001" and "034209002", and the first primary key ID "034209001" corresponding to first service elements "a company, a business license, 8809811122", the first main key ID "034209002" corresponding to the first service element "2 company, business license, 8809813321," based on the old system 103 generates a global tracking service request serial number "A0410000000131" and 2 a first master key ID "034209001" and "034209002", and the second primary key ID "034209001" corresponding to the second service element "a company, a business license, 8809811122", the second primary key ID "034209002" corresponding to the second service element "2 company, business license, 8809813321", it may be determined the same as corresponding elements of the first service of the first service and the second primary key ID corresponding to the second primary key element ID, the reserved first primary key ID "034209001" and " 034,209,002. "
[0126] Alternatively, if the old system generates a service request 103 based on the tracking global serial number "A0410000000131" and the two first primary key ID "034209001" and "034209002", and the second primary key ID "034209002" corresponding to the second service elements "a company, a business license, 8809811122", the second primary key ID "034209001" corresponding to the second service element "2 company, business license, 8809813321," the primary key using the second ID "034209002" and "034209001" replacing the first primary key ID "034209001" and "034209002."
[0127] Therefore, if the business processing sequence chaos that multiple business elements corresponding to the same service ID corresponding to different primary key, you can ensure the consistency of the primary key ID, the primary key ID to reduce the likelihood of confusion, improve the success rate of calls.
[0128] Optionally, the method also includes:
[0129] Generate a first changed lower file file for every preset cycle, a processing record corresponding to the service request is stored based on the primary key ID.
[0130] The first changed lower file file is compared with the second change lower file file corresponding to the second service system;
[0131] If the first record present in the second change lower file file is not present in the first changing lower file file, the first record to the second service system is stored;
[0132] If the first record present in the second change lower file file is different from the second record in the first changing lower file file, the second record is replaced with the first record.
[0133] The present application embodiment, the preset period may be set refers to a system for checking the system data is complete, a start time than the period of the process, e.g., the predetermined period may be one day. Embodiments of the present application for a preset period of time is not particularly limited, and may be set manually.
[0134] In this step, the changed data file under the file table entry being altered, the altered table in the memory for processing recording preset period.
[0135] Exemplary, image 3 Example embodiments of the present application provides A data updating method of a scene than the schematic, as image 3 Shown, every other day, the old system may request the recording process corresponding to the service ID storage on a primary key, for example, as a primary key ID may be serial number 028709001 corresponding to a global tracking and operational elements are A0410000000131 1 company, business license number 8809811122 and ; 028709002 primary key ID corresponding to a global tracking and serial number of the operational elements are A0410000000132 2 company, organization code, and code configuration 09832211-1; 028709003 primary key ID corresponding to a global tracking and serial number of the operational elements are A0410000000133 institutions 1 , corporate career certificate certificate No. 99933322101, and the like for storing data records, further, the data is recorded in the old system carried out in table a file, change the file generation date of the old system file (i.e., the second change gear file) under the old system the day of the change gear files can be uploaded to the new system.
[0136] Accordingly, every other day, the new system Laid may request process corresponding to the record based on the primary key ID storage service, e.g., a primary key ID may be as 028,709,001 corresponding global tracking Serial No. A0410000000131 and operational elements are companies 1, business license and number 8809811122; 028709003 primary key ID corresponding to a global tracking and serial number of the operational elements are A0410000000133 institutions 1, corporate career certificate certificate No. 77733322101, and the like for storing data records, further, the new data is recorded in the system table a is under file, create a new file under the file system to change the date (i.e., the first change gear file), further, the change may be acquired under the old system profile file transfer day old system, the changed file and the file system for the day the new date of the old system change file recorded in comparison file can be found, a new file system for the day change the profile ID as the primary key is missing 028,709,002 corresponding global tracking and serial number of the operational elements are A0410000000132 2 company, organization code, and code configuration 09832211-1 record, the new system transfers the record is inserted into the new system, to change the date of the new system master key ID is 028709003 corresponding business factors record file file 3 old system to change the date the file file primary key ID to 028,709,003 corresponding 3 there is a difference in the record business factors, the use of the old system that day changed the downside file service factors and three corresponding "99933322101" with the new system changed the downside file business factors day 3 the corresponding "77733322101" to complete the data comparison update .
[0137] Therefore, the error scenario occurs when the system fails or the first business of their business process outgoing calls second service system for the first business transaction systems, methods provided herein can ensure the consistency of both system data and improve the accuracy of the system .
[0138] In conjunction with the above-described embodiment, the main method of generating a key ID provided herein may be applied to the scene as a business transaction ID will only produce a primary key in a database table, Figure 4 One particular application of the present ID primary key generation method according to an embodiment of a schematic flowchart, such as Figure 4 , The specific embodiment comprises the step of performing the method embodiments of the present application:
[0139] Step S1: The application sent to the end of the business transaction routing platform to step S2.
[0140] In this step, the application may refer to a terminal end of the above-mentioned embodiment of the apparatus, which is not repeated herein, routing platform as a plug board router chassis, and a power supply including routing engine cooling means, for providing a network Serve.
[0141] Step S2: receiving the routing internet business transaction, business transactions and sent to the old system (i.e., a second service system), step S3.
[0142] Step S3: the old system receives the business transaction processing and, after completion of the service logic processing the transaction, the transaction tracking the global serial number primary key ID and the generated record to the table 1, step S4.
[0143] In this step, a table for storing a corresponding relationship between a global track serial numbers and ID of the primary key. For example, within the dashed box data in Table 1, the global tracking serial numbers A0410000000131, the corresponding primary key ID is 028709001. It will be appreciated that Table 1 can be extracted to 028,709,001 ID and global serial number tracking is A0410000000131 other relevant data from Table A.
[0144] Step S4: the old system returns the transaction response message, the transaction response message shows the result of the old system of business transaction processing to step S5.
[0145] Step S5: If the old system returns the transaction response message is successful, the routing platform to continue to apply the amount of business transactions sent to the new system (ie, the first business system), step S6.
[0146] Step S6: the new system receives the business transaction and processed, in processing this transaction needs to generate corresponding primary key A table, by sending outbound global trace table name and serial number on the old transaction system, further acquires Table 1 registration primary key ID, step S7.
[0147] Step S7: the old system returns the corresponding serial number primary key ID, for the new use according to the global tracking system.
[0148] Alternatively, the master key ID generating method provided herein may also be applied when a scene may generate a business transaction ID plurality of primary keys in a database table, Figure 5 Flow schematic diagram of another specific application ID primary key generation method according to an embodiment, such as Figure 5 , The specific embodiment comprises the step of performing the method embodiments of the present application:
[0149] Process step S2 to step S1- Figure 4 Example embodiments of the process in step S1-S2 are similar, they are not repeated here.
[0150] Step S3: the old system receives the business transaction processing and, after completion of the service logic processing the transaction, the transaction tracking the global serial number, a business will not be repeated in the business transactions and the generated key element ID recorded in table 2, step S4.
[0151] In this step, will not repeat business elements may refer to the customer name, business license number and so on, for example, Figure 5 The old system operational elements 1 1 to company, business to business license elements 2, 3 to the operational elements business license number: 8809811122, the corresponding primary key ID is 028709001, global tracking serial numbers A0410000000131.
[0152] Wherein the global trace table 2 for storing the serial number, feature correspondence relationship between the at least one service ID, and the primary key. For example, the data in Table 2 within the dashed box, the global tracking serial numbers A0410000000131, the corresponding primary key ID to 028,709,001, respectively corresponding service company element 1, and the business license number 8809811122. It will be appreciated that Table 2 can be extracted from the ID table A is 028,709,001, respectively, the operational elements 1 company, business license numbers and serial numbers 8809811122 and global tracking A0410000000131 other relevant data.
[0153] Process steps S4-S5 and Figure 4 Example embodiment process steps S4-S5 are similar, they are not repeated here.
[0154] Step S6: The new system is based on the sum business transaction generate the primary key ID through its own transactions internal logic, the corresponding new system corresponding generated primary key ID recorded in Table 3, further, the new system starts a daemon polls Table 2 reading recorded in table 2 has not been processed, the read data record is stored in table 3, and add the appropriate processing flag after reading the data, i.e., processing flag is a record corresponding to step S7.
[0155] What needs to be explained is Figure 5, The processing flag is 1, the new system is the primary key ID 034209001, global tracking serial numbers A0410000000131, operational elements are 1 companies, business license and a record number 8809811122 for recording processed.
[0156] Step S7: the old system to the new system call transaction acquiring the old system which records the primary key ID corresponding to the step S8.
[0157] Step S8: A table of the new system ID to update the primary key for the primary key of the old system ID.
[0158] It should be noted that the technical solution of the present application, acquisition, storage, and application users' personal information involved, are in line with the provisions of relevant laws and regulations, and does not violate public order and morals.
[0159] In the foregoing embodiment, the primary key ID generating method according to an embodiment of the present application has been introduced, but in order to achieve the above-described present application the functional method provided in the embodiment, as an electronic device to perform the main body may include hardware and / or software module, hardware configuration, a software module, hardware configuration or form plus software modules to implement the above functions. A function in the above functions is performed in a hardware structure, software module, or a hardware structure, and a software module, depending on the specific application and design constraint conditions of the technical solution.
[0160] E.g, Image 6 Present application diagram of a primary key ID generating apparatus according to an embodiment of the structure, such as Image 6 As shown, the apparatus includes:
[0161] A receiving module 610, configured to receive a service request; the service request is a service system of the second service request processing is successful;
[0162] Determining module 620, based on the service request to determine the number of primary key ID to be generated;
[0163] When the number of the plurality of processing module 630, when the primary key ID to be generated, for generating the service request based on a global tracking serial number, a plurality of first primary key ID and the first service elements each main key corresponding to the ID, and based on the said global track the second primary key ID and the service feature invoking the second serial number corresponding to the second service system, by comparing the first service and the second service element element, to obtain a comparison result, based on the second comparison result using the first primary key ID updating the primary key ID;
[0164] Wherein each service request corresponding to the global unique serial number tracking.
[0165] Alternatively, the processing module 630 is further configured to:
[0166] When the ID number of the primary key to be generated for a time, the second call to the service system based on the global tracking service request generated table name and serial number, and using the global serial number and the track acquired primary key ID table .
[0167] Alternatively, the processing module 630 includes an acquisition unit; the acquisition unit for:
[0168] The access to the database table name based on the corresponding table, wherein said table for storing a corresponding relationship between a global track serial numbers and ID of the primary key;
[0169] Using the global serial number tracking to find the corresponding key ID in the primary table.
[0170] Optionally, the module 630 comprises a call processing unit and the update unit;
[0171] Specifically, each main key ID corresponding to the at least one service feature, the traffic between elements of a plurality of main keys corresponding to the service ID does not recurring elements; the calling unit, configured to:
[0172] Polling process starts reading the second service processing system corresponding to the service record table stored in advance; a pre-stored table for storing a second global service system processing a service request generated serial tracking service, a second operational elements, the second main key and the ID recording process; the recording process includes a recording processed and unprocessed record; recording said processed as has been invoked for recording and updating the first ID of the primary key; the non- recording process to record not called;
[0173] Using the global serial number to track the process to find the key ID and the second primary element of the second service record corresponding to the record untreated.
[0174] Alternatively, the number of the first service and the second service elements are a plurality of elements; the update unit, configured to:
[0175] When a plurality of the first service and the second service element corresponding to each element on the second main key ID updating the correspondence relationship based service using the first element and the second element of the first traffic primary key ID;
[0176] When any one of the first service and the second service element is not on the corresponding element, said second plurality of operational elements replace the plurality of first service element, using a plurality of the second main key ID Alternatively a plurality of the first primary key ID, and the feedback element after the replacement service ID and its corresponding primary key to the operation and maintenance personnel for operation and maintenance personnel to see if there are problems of this alternative.
[0177] Alternatively, the update unit, configured to:
[0178] A first primary key for the ID of each element corresponding to the first service, the first service element is determined to match the second service corresponding to the second primary key element ID, and determine whether the first and the second primary key ID primary key whether the ID is the same;
[0179] If yes, retaining the first primary key ID;
[0180] If different, then replacing the first with the second primary key ID primary key ID.
[0181] Optionally, the apparatus further comprises a comparison module, the comparison module, configured to:
[0182] Every predetermined period, the processing corresponding to the recording request based on the primary key of the service ID is stored, the archive files to generate a first change;
[0183] Changing the first lower gear and the second file system operations corresponding to the second change gear ratio of the documents;
[0184] If the first file record of the second speed change at present does not exist in the first change speed lower file, the first record is stored to the second service system;
[0185] If the first file record of the file exists in the first and second recording speed is changed at the second there is a difference file changes, the replacement of the second recording with the first recording.
[0186] Primary key ID provided by the present application generates a specific embodiment of the apparatus can see the effect of the principle and the related description of the foregoing embodiment and corresponding, here not described in detail here.
[0187] Exemplary, embodiments of the present application a schematic structural diagram of an electronic apparatus is also provided, Figure 7 Application schematic structural diagram of an electronic device according to an embodiment, such as Figure 7 , The electronic device may include: a processor 702 and a memory connected to the processor 701 in communication with; a computer program stored in the memory 701; a computer program executed by the processor 702 stored in the memory 701, causes the processor 702 to perform Example of the method of any preceding embodiment.
[0188] Wherein, processor 702 and memory 701 may be connected through a bus 703.
[0189] Embodiments of the present application further provides a computer-readable storage medium, a computer-readable storage medium storing computer program instructions executed, computer-executable instructions are used to implement the present application as any of the preceding embodiments ID primary key generated embodiments when executed method.
[0190] Chip embodiment of the present application further provides an operation command, the ID chip main key generation method in the embodiment is executed by the electronic device according to any one of the preceding embodiments, such as application for execution.
[0191] Example embodiments of the present application further provides a computer program product, comprising program code, when a computer running the computer program, the program code of this application to any one of the preceding ID primary key generation method embodiment performed by the electronic device to one embodiment.
[0192] In several embodiments provided herein, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiment described above is merely schematic, for example, the division of the module is only a logical function division, and there may be additional division mode, such as a plurality of modules or components, can be combined or integrated. To another system, or some features can be ignored, or not executed. On the other hand, the coupling or direct coupling or communication connection of the displayed or discussed may be an electrical, mechanical or other form.
[0193] As the module illustrated by the separation component may or may be not physically separated, the components displayed as a module may be or may not be a physical unit, i.e., may be located in one place, or can be distributed to a plurality of network units. The present embodiment can be implemented in accordance with the actual needs to select some or all of the modules.
[0194] Further, each function module in the various embodiments of the present application can be integrated in one processing unit, or each module can be generated separately, or two or more modules can be integrated into one unit. The unit formed by the module can be implemented in the form of hardware, or may be implemented in the form of a hardware plus software function unit.
[0195] The integrated module implemented in the form of a software function module can be stored in a computer readable storage medium. The above software function module is stored in a storage medium, including several instructions to make a computer device (can be a personal computer, server, or network device, etc.) or processor to perform some of the steps of the methods described herein.
[0196] It should be understood, it said processor may be a central processing unit (central processing unit, CPU), may also be other general purpose processor, a digital signal processor (digital signal processor, DSP), ASIC (application specific integrated circuit, ASIC) Wait. The general purpose processor can be a microprocessor or the processor can also be any conventional processor or the like. Binding steps of the method disclosed herein may be embodied directly in hardware processor execution completes, or by a combination of processor hardware and software module executed is completed.
[0197] The memory may include high-speed random access memory (random access memory, RAM), and may also include non-volatile memory (non-volatile memory, NVM), such as at least one disk storage, you may also be U disk, mobile hard disk, only read memory, disk or CD-ROM.
[0198]The bus can be an industrial standard architecture (ISA) bus, an External Equipment Interconnect, a PCI, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. In order to facilitate the presentation, the bus in the drawings of the present application does not limit only one bus or a type of bus.
[0199] The above storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), can be wiped In addition to programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or disc. The storage medium can be any available medium that can be accessed with a general or dedicated computer.
[0200] An exemplary storage medium is coupled to the processor, thereby enabling the processor to read information from the storage medium, and can write information to the storage medium. Of course, the storage medium can also be part of the processor. Processors and storage media can be located in Application Specific Integrated Circuits, ASICs. Of course, the processor and storage medium can also be present in an electronic device or a master device as a discrete component.
[0201] As described above, only the specific embodiment of the present application embodiment, but the scope of the present application embodiment is not limited thereto, any change or replacement within the technical range disclosed in the present application embodiment, should be covered in this The scope of application of the application is applied. Therefore, the protection range of the present application embodiment should be based on the scope of protection of the claims.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.

Similar technology patents

Single computer safety checking system of electronic key based on integrated flash memory

InactiveCN103390131AReduce configuration requirementsEase of statistical analysis
Owner:WUXI CINSEC INFORMATION TECH

Method for improving polluted soil

ActiveCN1689721AThe harmless effect is stable for a long timeWide range of applications
Owner:阿斯特古东京股份有限公司 +3

Unidirectional four-lane highway tunnel assembled excavation and steel arch installation trolley

PendingCN110318787AReduce configuration requirementslow cost
Owner:中交二公局第四工程有限公司

Crowd sensing method and system based on blockchain

ActiveCN112053043Areduce workloadReduce configuration requirements
Owner:BEIJING UNIV OF POSTS & TELECOMM

Classification and recommendation of technical efficacy words

  • Reduce configuration requirements
  • Wide range of applications

Crowd sensing method and system based on blockchain

ActiveCN112053043Areduce workloadReduce configuration requirements
Owner:BEIJING UNIV OF POSTS & TELECOMM

Unidirectional four-lane highway tunnel assembled excavation and steel arch installation trolley

PendingCN110318787AReduce configuration requirementslow cost
Owner:中交二公局第四工程有限公司

Single computer safety checking system of electronic key based on integrated flash memory

InactiveCN103390131AReduce configuration requirementsEase of statistical analysis
Owner:WUXI CINSEC INFORMATION TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products