Distributed database access method and device
By adding library key information to the SMS content template and generating coded information, the problem that credit card SMS services cannot be routed to the correct library is solved, and low-cost and timely distributed database access is achieved to adapt to high concurrent transaction volume.
Patent Information
- Application Number
- CN202110359703.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-02
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2041-04-02
AI Technical Summary
In the credit card SMS service scenario, there is no complete shard key information such as card number in the SMS content, which makes it impossible to route to the correct database for business processing. The existing solutions increase storage costs or cannot guarantee timeliness.
By adding the sub-store key information to the SMS content template, encoding information containing the sub-store library number is generated, and the encoding information is embedded in the SMS data. The receiving end obtains the sub-store library number based on the encoding information analysis for database sub-store routing access.
It ensures service timeliness at low cost, avoids polling all databases, and can deal with high concurrent transactions through horizontal expansion of distributed systems.
Smart Images

Figure CN113051328B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the computer field, and can be applied to the financial field and other fields, and in particular to a distributed database access method and device. Background Art
[0002] As bank credit card business faces the challenges of high concurrency and high capacity in Internet-like scenarios in recent years, the core system of bank credit card has gradually migrated to a distributed platform system and adopted the database sharding method to provide external services. Since business data is sharded and stored according to certain business elements (sharding keys), such as card number, customer number, etc., the corresponding online service message needs to carry the corresponding sharding key for database routing access. However, in the current credit card SMS service scenario, based on the requirement of protecting customer privacy, the general SMS content does not contain complete sharding key information such as card number, and cannot be routed to the correct sharding database for business processing. There are generally two processing methods for the system when processing. One is to establish a corresponding relationship between mobile phone number and sharding key. This method increases storage costs, and the customer's mobile phone number will change and maintenance is inconvenient; the other is to poll all sharding databases for SMS services and integrate the results and return them. This method cannot guarantee timeliness, and cannot cope with the situation of a large increase in transaction volume and concurrency through horizontal expansion, and cannot reflect the advantages of distributed systems. Summary of the invention
[0003] The purpose of the present invention is to provide a distributed database access method and device, so as to implement a method for adding sub-database key information in a text message content template, so that after the distributed system background receives a text message service request, it can directly or indirectly obtain the sub-database key information for routing access to the corresponding sub-database data, thereby ensuring service timeliness at a lower cost while avoiding polling access to all sub-databases.
[0004] To achieve the above-mentioned purpose, the distributed database access method provided by the present invention specifically includes: obtaining the sub-library number of the distributed database; generating coding information containing the sub-library number according to the message category of the SMS content to be sent and the sub-library number; placing the coding information in the SMS content to be sent to generate SMS data, and sending the SMS data to the predetermined recipient; and receiving the SMS data, parsing the corresponding sub-library number according to the message category of the SMS data and the coding information in the SMS data; performing database sub-library routing access according to the sub-library number and executing corresponding business processing.
[0005] In the above-mentioned distributed database access method, preferably, generating the coding information including the sub-library number according to the message category of the SMS content to be sent and the sub-library number includes: when the message category is an invitation SMS, obtaining the SMS module corresponding to the SMS content to be sent; encrypting the SMS template and the sub-library number where the business data is located through the RSA algorithm to obtain an encrypted value; and assembling the coding information according to the character string and length information of the encrypted value.
[0006] In the above-mentioned distributed database access method, preferably, obtaining the corresponding sub-library number according to the message category of the SMS data and the encoding information in the SMS data by parsing includes: obtaining the encoding information according to the message category of the SMS data and the SMS template, obtaining an encrypted value according to a preset composition rule based on the encoding information; and obtaining the sub-library number by decrypting the encrypted value through the RSA algorithm.
[0007] In the above-mentioned distributed database access method, preferably, generating the coding information including the sub-library number according to the message category of the SMS content to be sent and the sub-library number includes: when the message category is a reply SMS, obtaining the SMS module corresponding to the SMS content to be sent; encrypting the SMS template and the sub-library number where the business data is located through the RSA algorithm to obtain an encrypted value; and generating the coding information according to the encrypted value by assembling the English pairs converted from hexadecimal.
[0008] In the above-mentioned distributed database access method, preferably, obtaining the corresponding sub-library number according to the message category of the SMS data and the encoding information in the SMS data by parsing includes: obtaining the encoding information according to the message category of the SMS data and the SMS template, obtaining an encrypted value by converting the encoding information into hexadecimal; and obtaining the sub-library number by decrypting the encrypted value through the RSA algorithm.
[0009] The present invention also provides a distributed database access device, which includes a sub-library information encoding module, a sub-library information decoding module and a communication module; the sub-library information encoding module is used to obtain the sub-library number of the distributed database; according to the message category of the SMS content to be sent and the sub-library number, the encoding information containing the sub-library number is generated; the encoding information is placed in the SMS content to be sent to generate SMS data; the communication module is used to send the SMS data generated by the sub-library information encoding module to a predetermined recipient; and, receive the SMS data provided by the client, and transmit the SMS data to the sub-library information decoding module; the sub-library information decoding module is used to parse the message category of the SMS data and the encoding information in the SMS data to obtain the corresponding sub-library number; according to the sub-library number, database sub-library routing access is performed and corresponding business processing is executed.
[0010] In the above-mentioned distributed database access device, preferably, the sub-library information encoding module includes: when the message category is an invitation SMS, a text message module corresponding to the SMS content to be sent is obtained; an encrypted value is obtained by encrypting the SMS template and the sub-library number where the business data is located through the RSA algorithm; and encoding information is generated by assembling the character string and length information of the encrypted value.
[0011] In the above-mentioned distributed database access device, preferably, the sub-library information decoding module includes: obtaining coding information according to the message category and SMS template of the SMS data, obtaining an encrypted value according to a preset composition rule based on the coding information; and obtaining a sub-library number by decrypting the encrypted value through an RSA algorithm.
[0012] In the above-mentioned distributed database access device, preferably, the sub-library information encoding module includes: when the message category is a reply-type SMS, a SMS module corresponding to the SMS content to be sent is obtained; an encrypted value is obtained by encrypting the SMS template and the sub-library number where the business data is located through the RSA algorithm; and encoding information is generated by assembling the English pairs converted from hexadecimal according to the encrypted value.
[0013] In the above-mentioned distributed database access device, preferably, the sub-library information decoding module includes: obtaining coding information according to the message category and SMS template of the SMS data, obtaining an encrypted value according to hexadecimal conversion of the coding information; and obtaining a sub-library number by decrypting the encrypted value through the RSA algorithm.
[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.
[0015] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above method.
[0016] The beneficial technical effect of the present invention is that: a sub-library information encoding generation module and a parsing module are used to encode and decode the sub-library number respectively, and the encoding and decoding extension functions adapted to the business scenarios are performed according to different SMS types; not only is the implementation cost low, there is no need to establish a mapping relationship between mobile phone numbers and sub-library keys, saving storage space and maintenance costs when mobile phone numbers are changed, but also the system has high processing performance, there is no need to poll all sub-libraries to summarize the results, timeliness is guaranteed, and distributed horizontal expansion can be used to cope with the situation of a large increase in concurrent transaction volume; at the same time, adding SMS codes to the SMS content can hide the sub-library information while maintaining a good user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings:
[0018] Figure 1 A schematic diagram of a flow chart of a distributed database access method provided by an embodiment of the present invention;
[0019] Figure 2 A schematic diagram of a process for generating coding information provided by an embodiment of the present invention;
[0020] Figure 3 A schematic diagram of a process for generating coding information provided by an embodiment of the present invention;
[0021] Figure 4 A schematic diagram of the structure of a distributed database access device provided by an embodiment of the present invention;
[0022] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The following will describe the implementation methods of the present invention in detail with reference to the accompanying drawings and embodiments, so that the implementation process of how the present invention applies technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly. It should be noted that as long as there is no conflict, the various embodiments of the present invention and the various features in the embodiments can be combined with each other, and the technical solutions formed are all within the protection scope of the present invention.
[0024] In addition, the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be performed in an order different from that shown here.
[0025] Please refer to Figure 1 As shown, the distributed database access method provided by the present invention specifically includes:
[0026] S101 obtains a sub-library number of a distributed database; generates coding information including the sub-library number according to the message category of the SMS content to be sent and the sub-library number;
[0027] S102: placing the encoded information into the content of the SMS to be sent to generate SMS data, and sending the SMS data to a predetermined recipient;
[0028] S103 receives the SMS data, and parses the SMS data according to the message type and the coded information in the SMS data to obtain the corresponding sub-library number;
[0029] S104 performs database sub-library routing access according to the sub-library library number and executes corresponding business processing.
[0030] In actual work, the implementation process of the above distributed database access method can be as follows:
[0031] Step 1: Add sub-library coding information to the marketing text message template.
[0032] Step 2: Create a sub-library information coding generation module for generating coding information including sub-library serial numbers; the specific implementation will be described in detail in the subsequent embodiments and will not be elaborated here one by one.
[0033] Step 3: Create a sub-library information coding parsing module for parsing and obtaining sub-library serial numbers from the sub-library coding information of the text message; the specific implementation will be described in detail in the subsequent embodiments and will not be elaborated here one by one.
[0034] Step 4: When the system sends a marketing text message, it calls the sub-library information coding generation module to generate coding information of the sub-library serial number, places it in the text message content and sends it to the customer.
[0035] Step 5: When the system receives a text message forwarded or replied by the customer, it calls the sub-library information coding parsing module to parse and obtain the sub-library serial number from the sub-library coding information of the text message, and performs database sub-library routing access and completes business processing.
[0036] Please refer to Figure 2 As shown, in an embodiment of the present invention, generating coding information including the sub-library library number according to the message category of the text message content to be sent and the sub-library library number includes:
[0037] S201 When the message category is an invitation text message, obtain the text message module corresponding to the text message content to be sent;
[0038] S202 Encrypt the sub-library library number where the text message template and business data are located through the RSA algorithm to obtain an encrypted value;
[0039] S203 Assemble and generate coding information according to the string and length information of the encrypted value.
[0040] Specifically, in actual work, assume that the sub-library number of the distributed system is k and the length is klen; for invitation text messages, input the text message template number and the sub-library serial number where the business data is located, and use the simple RSA algorithm to generate the encrypted number i with a length of ilen. This module finally generates a text message number as a full-digit code X with a length of Xlen, and controls ilen < Xlen. X is assembled from i, and other bits of X are supplemented with random numbers.
[0041] Therefore, in another embodiment of the present invention, obtaining the corresponding sub-library number according to the message category of the SMS data and the encoding information in the SMS data includes: obtaining encoding information according to the message category of the SMS data and the SMS template, obtaining an encrypted value according to the encoding information according to a preset composition rule; and obtaining the sub-library number by decrypting the encrypted value through the RSA algorithm. For example: for invitation SMS, the system intercepts the SMS content to obtain the SMS number X, obtains the encrypted number i according to the composition rule, and obtains the sub-library number k after decryption through the RSA algorithm.
[0042] Please refer to Figure 3 As shown, in one embodiment of the present invention, the encoding information including the sub-library number is generated according to the message category of the SMS content to be sent and the sub-library number, including:
[0043] S301: when the message type is a reply message, obtaining a message module corresponding to the message content to be sent;
[0044] S302 encrypts the SMS template and the sub-library number where the business data is located using the RSA algorithm to obtain an encrypted value;
[0045] S303 generates coding information by assembling English pairs converted from hexadecimal according to the encrypted value.
[0046] Specifically, in actual work, it is assumed that the distributed system sub-library number is k, and the length is klen; for customer reply SMS, the SMS template number and the sub-library serial number where the business data is located are entered, and the encrypted number i is generated using a simple RSA algorithm, and the length is ilen. The module finally generates a SMS number of all uppercase English characters Y, with a length of Ylen. Y is converted from the number i to the English representation in hexadecimal. For example, if i = 27, then Y = AA.
[0047] Therefore, in another embodiment of the present invention, obtaining the corresponding sub-library number according to the message category of the SMS data and the encoding information in the SMS data includes: obtaining encoding information according to the message category of the SMS data and the SMS template, converting the encoding information into hexadecimal to obtain an encrypted value; decrypting the encrypted value through the RSA algorithm to obtain the sub-library number. For example: for customer reply SMS, the system intercepts the SMS content to obtain the SMS number Y, converts it into hexadecimal according to the English representation to obtain the encrypted number i, and decrypts it through the RSA algorithm to obtain the sub-library number k.
[0048] In summary, in actual work, the encoding and decoding methods of the above sub-library numbers can be performed as follows:
[0049] Assume that the distributed system has a sub - database number k with a length of klen. According to the current distributed situation of the bank's core system, k generally does not exceed 256.
[0050] 1. Encoding method of the sub - database number
[0051] For invitation - type text messages: Input the text - message template number and the sub - database serial number where the service data is located. Use the simple RSA algorithm to generate the encrypted number i. The string representation of i is I with a length of Ilen. Calculated according to max(k)=256, take Ilen = 3. The module finally generates a text - message number as a full - digit code X with a length of Xlen. Considering that the text - message content does not affect the customer experience, Xlen is at most 6 digits, and control ilen < Xlen. X is assembled from I, and the other bits of X are supplemented with random digits. For customer - reply - type text messages: Input the text - message template number and the sub - database serial number where the service data is located. Use the simple RSA algorithm to generate the encrypted number i. The string representation of i is I with a length of Ilen calculated according to max(k)=256, Ilen = 3. The module finally generates a text - message number as a full - uppercase English character Y with a length of Ylen. Y is obtained by converting the number i to its English representation in base 26. For example, if i = 27, then Y = ZA. Calculated according to max(k)=256, max(Y)=IV.
[0052] 2. Decoding method of the sub - database number:
[0053] For invitation - type text messages: The system intercepts the text - message content to obtain the text - message number X, obtains the encrypted number i according to the composition rule, and decrypts it through the RSA algorithm to get the sub - database number k. For customer - reply - type text messages: The system intercepts the text - message content to obtain the text - message number Y, obtains the encrypted number i according to the base - 26 conversion of the English representation, and decrypts it through the RSA algorithm to get the sub - database number k.
[0054] Thus, when the system sends a text message, it generates the encoding information of the sub - database serial number, places it in the text - message content and sends it to the customer. When the system receives a text message, it parses and obtains the sub - database serial number from the sub - database encoding information in the text message, and performs database sub - database routing access and completes the service processing. Of course, those skilled in the relevant art should know that the above examples are only for facilitating the understanding of the specific application methods of the above - mentioned embodiments provided by the present invention, and do not make any limitations on it.
[0055] In summary, through the above encoding and decoding process, the expansion of the encoding generation method can be supported according to different SMS template numbers; the implementation cost is low, and there is no need to establish a mapping relationship between mobile phone numbers and sub-library keys, saving storage space and maintenance costs when mobile phone numbers are changed; the system has high processing performance, and there is no need to poll all sub-libraries to summarize the results, so timeliness is guaranteed, and distributed horizontal expansion can be used to cope with the situation of a large increase in concurrent transaction volume; adding SMS codes to the SMS content can hide the sub-library information while maintaining a good user experience.
[0056] Please refer to Figure 4 As shown, the present invention also provides a distributed database access device, which includes a sub-library information encoding module, a sub-library information decoding module and a communication module; the sub-library information encoding module is used to obtain the sub-library number of the distributed database; according to the message category of the SMS content to be sent and the sub-library number, the encoding information containing the sub-library number is generated; the encoding information is placed in the SMS content to be sent to generate SMS data; the communication module is used to send the SMS data generated by the sub-library information encoding module to a predetermined recipient; and, receive the SMS data provided by the client, and transmit the SMS data to the sub-library information decoding module; the sub-library information decoding module is used to parse the message category of the SMS data and the encoding information in the SMS data to obtain the corresponding sub-library number; according to the sub-library number, database sub-library routing access is performed and corresponding business processing is executed.
[0057] In one embodiment of the present invention, the sub-library information encoding module includes: when the message category is an invitation-type SMS, obtaining the SMS module corresponding to the SMS content to be sent; encrypting the SMS template and the sub-library number where the business data is located through the RSA algorithm to obtain an encrypted value; assembling and generating encoding information according to the character string and length information of the encrypted value; in another embodiment, the sub-library information encoding module includes: when the message category is a reply-type SMS, obtaining the SMS module corresponding to the SMS content to be sent; encrypting the SMS template and the sub-library number where the business data is located through the RSA algorithm to obtain an encrypted value; assembling and generating encoding information according to the English pair converted from hexadecimal based on the encrypted value.
[0058] In one embodiment of the present invention, the sub-library information decoding module includes: obtaining coding information according to the message category and SMS template of the SMS data, obtaining an encrypted value according to the coding information according to a preset composition rule; decrypting the encrypted value through the RSA algorithm to obtain the sub-library number; In another embodiment, the sub-library information decoding module includes: obtaining coding information according to the message category and SMS template of the SMS data, obtaining an encrypted value according to the coding information by converting it into hexadecimal; decrypting the encrypted value through the RSA algorithm to obtain the sub-library number.
[0059] Specifically, the above embodiment is described in detail by taking the workflow of the distributed database access device in actual work as an example. Relevant technical personnel in the field should know that this embodiment is only for facilitating the understanding of an execution principle and process of the distributed database access device provided by the present invention, and does not impose any limitation thereto.
[0060] 1. A bank plans to launch a credit card bill installment business. After the customer's credit card statement is generated, a bill installment invitation SMS (SMS template 1) is sent to a customer who meets the conditions (assuming that the customer's credit card number ends with 1234). The customer directly forwards the SMS to the bank's official phone number. The bank sends the customer a bill installment plan (SMS template 2). The customer then selects the number of installments according to the plan prompt, edits the SMS and replies to the bank's official phone number to handle the bill installment.
[0061] Template 1 (Bill installment invitation SMS template):
[0062] Bill installment: You can apply for bill installment for the current period (*month*day - *month*day) of the credit card with the last digit ****. Forward this message to XXXXX before *month*day to apply. Reply TDXS#HZFQ to unsubscribe from this message. (XX Bank)
[0063] Template 2 (SMS bill installment plan template):
[0064] The *monthly bill of your credit card with the last digit **** can be paid in installments for * yuan. You can quickly process the payment by replying the specified transaction code to XXXXX via SMS.
[0065] For 6 installments (6 months), please send “ZDFQ#6#1234”, the total handling fee is * yuan;
[0066] For 12 installments (12 months), please send “ZDFQ#12#1234”, the total handling fee is * yuan;
[0067] For 24 installments (24 months), please send “ZDFQ#24#1234”, the total handling fee is * yuan;
[0068] (XX Bank)
[0069] Assuming that the bank's distributed database is divided into 64 sub-databases, the customer data belongs to the 53rd sub-database, and the present invention is used to implement the business. The specific implementation steps are described as follows:
[0070] 1) Add sub-database coding information to the marketing SMS template:
[0071] Change SMS template 1 to:
[0072] Bill installment: You can apply for bill installment for the current period (*month*day - *month*day) of the credit card with the last digit ****. Forward this SMS to XXXXX before *month*day to apply. Reply TDXS#HZFQ to unsubscribe from this SMS. SMS number (******) (XX Bank)
[0073] Change SMS template 2 to:
[0074] The *monthly bill of your credit card with the last digit **** can be paid in installments for * yuan. You can quickly process the payment by replying the specified transaction code to XXXXX via SMS.
[0075] For 6 installments (6 months), please send “ZDFQ#**#6#1234”, the total handling fee is * yuan;
[0076] For 12 installments (12 months), please send “ZDFQ#**#12#1234”, the total handling fee is * yuan;
[0077] For 24 installments (24 months), please send “ZDFQ#**#24#1234”, the total handling fee is * yuan;
[0078] (XX Bank)
[0079] 2) Design of database information encoding module:
[0080] RSA algorithm design, take prime numbers P and Q, M = P*Q, N = (P-1)*(Q-1), take an integer E that is relatively prime to N, and take an integer D such that E*D mod N = 1. E is the encryption public key, D is the private key, then the encrypted number i = k E modN, in the implementation, if P=11, Q=13 are satisfied, then M=143, N=120, E=7, D=103. For the sub-library number 53, then i=92, I=092.
[0081] In order to ensure the user experience, the SMS number X for invitation SMS is set to 6 digits, which is composed of I. The assembly rule is set as 3 digits of I corresponding to the 2nd, 4th and 6th digits of X, and the 1st, 3rd and 5th digits are supplemented by random numbers. After the system operation, X is generated to be 605972.
[0082] 3) The device sends a text message:
[0083] The sub-database number coding information is generated through the sub-database information coding parsing module and sent to the customer. The content of the SMS is:
[0084] Bill installment: You can apply for bill installment for the current period (*month*day - *month*day) of the credit card with the last digit 1234. Forward this message to XXXXX before *month*day to apply. Reply TDXS#HZFQ to unsubscribe from this message. Message number (605972) (XX Bank)
[0085] 4) After the customer forwards the SMS to the bank's official number, the system receives the SMS:
[0086] The sub-database information coding parsing module is called to parse the sub-database coding information of the SMS to obtain the sub-database serial number, and perform database sub-database routing access and generate a bill installment plan. The SMS number X=605972 is obtained from the SMS content, and I=092 and i=92 are obtained according to the assembly rules. The parsing module is based on the public announcement k=X D modM yields k=53.
[0087] Call the sub-library information encoding module to regenerate the sub-library number encoding information i=92, convert it into English characters in hexadecimal to Y=IB, put it in the SMS content and send it to the customer.
[0088] The content of the message is:
[0089] The monthly bill of your credit card with the last digit of 1234 can be in installments for an amount of * yuan. You can quickly process it by replying the specified transaction code to XXXXX via SMS.
[0090] For 6 installments (6 months), please send “ZDFQ#IB#6#1234”, the total handling fee is * yuan;
[0091] For 12 installments (12 months), please send “ZDFQ#IB#12#1234”, the total handling fee is * yuan;
[0092] For 24 installments (24 months), please send “ZDFQ#IB#24#1234”, the total handling fee is * yuan;
[0093] (XX Bank)
[0094] 5) After receiving the SMS, the customer selects the corresponding issue number and edits the SMS and sends it to the bank's official number:
[0095] The sub-database information coding parsing module is called to parse the sub-database coding information of the SMS to obtain the sub-database serial number, and perform database sub-database routing access and complete the final bill installment business processing. The SMS number Y=IB is obtained from the SMS content, and I=092 and i=92 are obtained according to the conversion rules. The parsing module is based on the public announcement k=X D modM obtains k=53, then accesses the data in sub-database 53 and completes the business processing.
[0096] Therefore, the distributed database access device provided by the present invention adopts a sub-library information encoding generation module and a parsing module to encode and decode the sub-library number respectively, and performs encoding and decoding extension functions adapted to business scenarios according to different SMS types; not only is the implementation cost low, there is no need to establish a mapping relationship between mobile phone numbers and sub-library keys, saving storage space and maintenance costs when mobile phone numbers are changed, but also the system has high processing performance, there is no need to poll all sub-libraries to summarize the results, timeliness is guaranteed, and distributed horizontal expansion can be used to cope with the situation of a large increase in concurrent transaction volume; at the same time, adding SMS codes to the SMS content can hide the sub-library information while maintaining a good user experience.
[0097] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.
[0098] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above method.
[0099] like Figure 5 As shown, the electronic device 600 may further include: a communication module 110, an input unit 120, an audio processing unit 130, a display 160, and a power supply 170. It is worth noting that the electronic device 600 does not necessarily have to include Figure 5 In addition, the electronic device 600 may also include Figure 5 For components not shown, reference may be made to the prior art.
[0100] like Figure 5 As shown, the central processor 100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor devices and / or logic devices. The central processor 100 receives inputs and controls the operations of various components of the electronic device 600.
[0101] The memory 140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 100 may execute the program stored in the memory 140 to implement information storage or processing.
[0102] The input unit 120 provides input to the CPU 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display display objects such as images and text. The display may be, for example, an LCD display, but is not limited thereto.
[0103] The memory 140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 140 may also be some other type of device. The memory 140 includes a buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application / function storage unit 142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 600 through the central processor 100.
[0104] The memory 140 may also include a data storage unit 143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 144 of the memory 140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0105] The communication module 110 is a transmitter / receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter / receiver) 110 is coupled to the central processor 100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.
[0106] Based on different communication technologies, multiple communication modules 110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module. The communication module (transmitter / receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide an audio output via the speaker 131 and receive an audio input from the microphone 132, thereby realizing a common telecommunication function. The audio processor 130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 130 is also coupled to the central processor 100, so that the sound can be recorded on the local machine through the microphone 132, and the sound stored on the local machine can be played through the speaker 131.
[0107] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0108] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0109] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0110] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0111] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A distributed database access method, characterized in that: The method comprises: Get the sub-library number of the distributed database; Generate coding information including the sub-library number according to the message category of the SMS content to be sent and the sub-library number; Placing the encoded information into the content of a text message to be sent to generate text message data, and sending the text message data to a predetermined recipient; And, receiving SMS data, and obtaining a corresponding sub-library number according to the message category of the SMS data and the coded information in the SMS data; Perform database sub-library routing access according to the sub-library number and execute corresponding business processing; Generating coding information including the sub-library number according to the message category of the SMS content to be sent and the sub-library number includes: acquiring the SMS module corresponding to the SMS content to be sent; encrypting the SMS template and the sub-library number where the business data is located through the RSA algorithm to obtain an encrypted value; assembling the coding information according to the character string and length information of the encrypted value or assembling the coding information according to the English pair converted from hexadecimal to the encrypted value.
2. The distributed database access method according to claim 1, characterized in that: The encoding information including the sub-library number is generated according to the message category of the SMS content to be sent and the sub-library number, including: When the message type is an invitation SMS, the encoding information is assembled and generated according to the character string and length information of the encrypted value.
3. The distributed database access method according to claim 2, characterized in that: The corresponding sub-library number is obtained by parsing the message type of the SMS data and the coded information in the SMS data, including: Obtaining coding information according to the message category and the SMS template of the SMS data, and obtaining an encrypted value according to the coding information and a preset composition rule; The sub-library number is obtained by decrypting the encrypted value using the RSA algorithm.
4. The distributed database access method according to claim 1, characterized in that: The encoding information including the sub-library number is generated according to the message category of the SMS content to be sent and the sub-library number, including: When the message type is a reply SMS, The coded information is generated by assembling the English pairs converted from hexadecimal according to the encrypted value.
5. The distributed database access method according to claim 4, characterized in that: The corresponding sub-library number is obtained by parsing the message type of the SMS data and the coded information in the SMS data, including: Obtaining coding information according to the message type and the SMS template of the SMS data, and converting the coding information into hexadecimal to obtain an encrypted value; The sub-library number is obtained by decrypting the encrypted value using the RSA algorithm.
6. A distributed database access device, characterized in that: The device comprises a sub-library information encoding module, a sub-library information decoding module and a communication module; The sub-library information encoding module is used to obtain the sub-library number of the distributed database; generate encoding information containing the sub-library number according to the message category of the SMS content to be sent and the sub-library number; place the encoding information in the SMS content to be sent to generate SMS data; generate encoding information containing the sub-library number according to the message category of the SMS content to be sent and the sub-library number, including: obtaining the SMS module corresponding to the SMS content to be sent; encrypting the SMS template and the sub-library number where the business data is located through the RSA algorithm to obtain an encrypted value; assembling the encoding information according to the character string and length information of the encrypted value or assembling the encoding information according to the English pair converted from the encrypted value in hexadecimal format; The communication module is used to send the SMS data generated by the sub-database information encoding module to a predetermined recipient; and receive the SMS data provided by the client, and transmit the SMS data to the sub-database information decoding module; The sub-library information decoding module is used to parse the message category of the SMS data and the coded information in the SMS data to obtain the corresponding sub-library number; perform database sub-library routing access according to the sub-library number and execute corresponding business processing.
7. The distributed database access device according to claim 6, characterized in that: The sub-library information encoding module includes: When the message type is an invitation SMS, Encoded information is generated by assembling the character string and length information of the encrypted value.
8. The distributed database access device according to claim 7, characterized in that: The sub-library information decoding module includes: Obtaining coding information according to the message category and the SMS template of the SMS data, and obtaining an encrypted value according to the coding information and a preset composition rule; The sub-library number is obtained by decrypting the encrypted value using the RSA algorithm.
9. The distributed database access device according to claim 6, characterized in that: The sub-library information encoding module includes: When the message category is a reply SMS, the coded information is generated by assembling the English pairs converted from hexadecimal according to the encrypted value.
10. The distributed database access device according to claim 9, characterized in that: The sub-library information decoding module includes: Obtaining coding information according to the message type and the SMS template of the SMS data, and converting the coding information into hexadecimal to obtain an encrypted value; The sub-library number is obtained by decrypting the encrypted value using the RSA algorithm.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for causing a computer to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Airplane real-time air-ground data receiving, transmitting and processing system
CN105843906A
Method and device for auditing short message text based on distributed high concurrency condition
CN111628859A