Data processing method, device, electronic device and storage medium
By querying the storage identifier in the preset service list in the data processing system, determining whether the response data is in cache, the problem of reducing service data processing efficiency caused by flow restriction is solved, and more efficient service data processing is achieved.
Patent Information
- Application Number
- CN202411726367.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-04-04
AI Technical Summary
In the prior art, the traffic data is restricted to avoid database access exceptions, resulting in reduced efficiency of business data processing and inconvenience to business processing.
By receiving service data requests, obtaining data identification and querying the storage identification in the preset service list to determine the response method. If the response data is in the cache, the parsing model is called to parse and send; if it needs to be retrieved from the database, the generation model is called to generate and send the response data.
By directly parsing and sending response data from the cache, processing exceptions caused by the database are reduced, business processing efficiency is improved, and data processing process is reduced.
Smart Images

Figure CN119759961A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a data processing method, device, electronic equipment and storage medium. Background Art
[0002] In various business processing systems, business data is usually stored in a database. In business processing, data storage and reading are required through database access, so the high availability of the database becomes the key to normal business processing. In related technologies, in order to avoid business data being unable to be processed due to abnormal database access, business data is usually limited, but this method will reduce the efficiency of business data processing, thereby causing inconvenience to business processing. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides a data processing method, device, electronic device and storage medium, which can solve the problem that limiting the flow of business data reduces the efficiency of business data processing, thereby causing inconvenience to business processing.
[0004] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for data processing is provided.
[0005] A data processing method according to an embodiment of the present invention comprises: receiving a service data request, obtaining a corresponding data identifier, and querying a storage identifier associated with the data identifier in a preset service list;
[0006] In response to the storage identifier being a first preset value, obtaining business information to which the business data belongs, generating response information based on the business information and the data identifier, querying a cache data table associated with the response information, extracting corresponding storage data from the cache data table, calling a preset parsing model to parse the storage data, obtaining response data, and sending the response data;
[0007] In response to the storage identifier being a second preset value, target data is acquired from the database based on the data identifier to call a preset generation model, and response data is generated and sent based on the target data.
[0008] In one embodiment, calling a preset parsing model to parse the stored data to obtain response data includes:
[0009] Calling a preset parsing model to parse the stored data to obtain target data;
[0010] Identify a parameter field in the target data, match the parameter field with the business data request to extract a parameter value of the parameter field, and generate response data based on the target data and the parameter value.
[0011] In yet another embodiment, calling a preset parsing model to parse the stored data to obtain response data includes:
[0012] The stored data is converted into a preset format, the converted stored data is decoded into data to be processed through a decoding model, and the data to be processed is deserialized to obtain the response data.
[0013] In yet another embodiment, the acquiring of the business information to which the business data belongs, so as to generate the response information based on the business information and the data identifier, includes:
[0014] The business type to which the business data belongs is obtained, and a corresponding character string is generated in combination with the transaction code of the business data, and the character string is concatenated with the data identifier to generate response information.
[0015] In yet another embodiment, acquiring target data from the database based on the data identifier includes:
[0016] Sending a data request to the database based on the data identifier, and receiving feedback information sent by the database;
[0017] In response to the feedback information being a failure, querying a record parameter corresponding to the data identifier in the preset service list;
[0018] In response to the record parameter being a preset parameter, business information to which the business data belongs is obtained, response information is generated based on the business information and the data identifier, a cache data table associated with the response information is queried, and corresponding storage data is extracted from the cache data table.
[0019] In yet another embodiment, after generating response data based on the target data, the method further comprises:
[0020] Generate storage data based on the response data to update the storage data to the cache data table, and update the storage identifier corresponding to the data identifier in the preset service list to the first preset value.
[0021] To achieve the above objective, according to another aspect of an embodiment of the present invention, a data processing device is provided.
[0022] A data processing device according to an embodiment of the present invention comprises: a receiving unit, configured to receive a service data request, obtain a corresponding data identifier, and query a storage identifier associated with the data identifier in a preset service list;
[0023] a processing unit, configured to obtain, in response to the storage identifier being a first preset value, business information to which the business data belongs, generate response information based on the business information and the data identifier, query a cache data table associated with the response information, extract corresponding storage data from the cache data table, call a preset parsing model to parse the storage data, obtain response data, and send the response data;
[0024] The processing unit is further used to obtain target data from the database based on the data identifier in response to the storage identifier being a second preset value, so as to call a preset generation model, generate response data based on the target data, and send it.
[0025] In one embodiment, the processing unit is specifically configured to:
[0026] Calling a preset parsing model to parse the stored data to obtain target data;
[0027] Identify a parameter field in the target data, match the parameter field with the business data request to extract a parameter value of the parameter field, and generate response data based on the target data and the parameter value.
[0028] In yet another embodiment, the processing unit is specifically configured to:
[0029] The stored data is converted into a preset format, the converted stored data is decoded into data to be processed through a decoding model, and the data to be processed is deserialized to obtain the response data.
[0030] In yet another embodiment, the processing unit is specifically configured to:
[0031] The business type to which the business data belongs is obtained, and a corresponding character string is generated in combination with the transaction code of the business data, and the character string is concatenated with the data identifier to generate response information.
[0032] In yet another embodiment, the processing unit is specifically configured to:
[0033] Sending a data request to the database based on the data identifier, and receiving feedback information sent by the database;
[0034] In response to the feedback information being a failure, querying a record parameter corresponding to the data identifier in the preset service list;
[0035] In response to the record parameter being a preset parameter, business information to which the business data belongs is obtained, response information is generated based on the business information and the data identifier, a cache data table associated with the response information is queried, and corresponding storage data is extracted from the cache data table.
[0036] In yet another embodiment, the apparatus further comprises:
[0037] An updating unit is used to generate storage data based on the response data to update the storage data to the cache data table, and to update the storage identifier corresponding to the data identifier in the preset service list to the first preset value.
[0038] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device is provided.
[0039] An electronic device according to an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method provided by the embodiment of the present invention.
[0040] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer readable medium is provided.
[0041] A computer-readable medium according to an embodiment of the present invention stores a computer program, and when the program is executed by a processor, the data processing method provided by the embodiment of the present invention is implemented.
[0042] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer program product is provided.
[0043] A computer program product according to an embodiment of the present invention includes a computer program, and when the program is executed by a processor, the data processing method provided by the embodiment of the present invention is implemented.
[0044] An embodiment of the above invention has the following advantages or beneficial effects: In the embodiment of the present invention, when receiving a business data request, the storage identifier associated with the data identifier in the preset business list can be queried according to the data identifier to determine the response method of the requested data; when the storage identifier is a first preset value, it means that the corresponding response data already exists and is stored in the cache data table, so the response information can be generated based on the business information and the data identifier, the cache data table associated with the response information is queried, the corresponding storage data is extracted from the cache data table, and the preset parsing model is called to parse the storage data to obtain the response data and send it; when the storage identifier is a second preset value, it means that the corresponding data needs to be obtained from the database, so the target data is obtained from the database based on the data identifier to call the preset generation model, and the response data is generated based on the target data and sent. Thus, in an embodiment of the present invention, for the requested data, the response information can be directly stored in the cache, and when it needs to be sent, it can be parsed from the cache and sent directly, thereby reducing the number of processing exceptions caused by the database and improving the efficiency of business processing; and in an embodiment of the present invention, the response data that can be sent is stored, and after determining that the response data corresponding to the request data is stored in the cache, the response data can be sent to the requesting end, thereby reducing the data processing process and improving the efficiency of business processing.
[0045] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0047] Figure 1 is a schematic diagram of a main flow of a data processing method according to an embodiment of the present invention;
[0048] Figure 2 is a schematic diagram of another main flow of a data processing method according to an embodiment of the present invention;
[0049] Figure 3 is a schematic diagram of another main flow of a data processing method according to an embodiment of the present invention;
[0050] Figure 4 is a schematic diagram of main units of a data processing apparatus according to an embodiment of the present invention;
[0051] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0052] Figure 6 It is a schematic diagram of the structure of a computer system suitable for implementing the embodiment of the present invention. DETAILED DESCRIPTION
[0053] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0054] It should be pointed out that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict. The acquisition, transmission, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations. In the embodiments of this application, some existing solutions in the industry such as certain software, components, and models may be mentioned, which should be considered as exemplary. Their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0055] The embodiment of the present invention provides a data system, which can be used in a scenario of processing request data, and specifically can be used in a scenario of processing data by combining a database and a cache.
[0056] The embodiment of the present invention provides a data processing method, which can be executed by a data processing system. Figure 1 As shown, the method includes:
[0057] S101: receiving a service data request, obtaining a corresponding data identifier, and querying a storage identifier associated with the data identifier in a preset service list.
[0058] The service data request may be sent by the data request end, and may specifically be a data request message. The service data request may include a data identifier to indicate the requested data.
[0059] In an embodiment of the present invention, in order to facilitate data exception processing and improve business processing efficiency, corresponding data for responding to business data requests can be stored in the cache, so after receiving a business data request, it can be determined whether the response information corresponding to the data request can be stored in the cache. Specifically, in an embodiment of the present invention, a business list can be preset, including storage identifiers associated with each data identifier, and the value of the storage identifier indicates whether the corresponding response data is stored in the cache. The value of the storage identifier is a first preset value, indicating that the response data corresponding to the data identifier is stored in the cache; the value of the storage identifier is a second preset value, indicating that the response data corresponding to the data identifier is not stored in the cache.
[0060] It should be noted that the cache in the embodiment of the present invention can be set according to demand, for example, it can be Redis cache, MongoDB, etc. The storage identifier associated with each data in the preset service list can be updated according to the data storage situation in the cache, and the preset service list can be implemented through the Msgcache.serviceID parameter list.
[0061] S102: In response to the storage identifier being a first preset value, obtain the business information to which the business data belongs, generate response information based on the business information and the data identifier, query the cache data table associated with the response information, extract the corresponding storage data from the cache data table, call the preset parsing model to parse the storage data, obtain the response data and send it.
[0062] The storage identifier is a first preset value, indicating that the cache stores the response data corresponding to the data identifier, so the response data corresponding to the business data request can be obtained from the cache. The response data can represent data that can be directly sent to the data request end.
[0063] In order to facilitate the storage of cached data, the response data is usually transcoded, compressed, serialized, etc. before storage. Therefore, in this step, the corresponding storage data can be obtained from the cache data table first, and then the storage data can be parsed to obtain the response data corresponding to the business data request, and then the response data can be sent to the data request end.
[0064] In the embodiment of the present invention, the parsing model is pre-set, and it can usually be set according to the data storage method in the cache. For example, when the response data in the cache is transcoded, compressed, and serialized, the parsing model needs to perform the corresponding parsing processing on the stored data to obtain the response data.
[0065] Specifically, the parsing of the stored data in this step can be performed as follows: converting the stored data into a preset format, decoding the converted stored data into data to be processed through a decoding model, deserializing the data to be processed, and obtaining response data.
[0066] The preset format may include multiple formats, such as a digital format, a string format, etc. The decoding model may be Base64 decoding to convert the string into binary data. Deserialization may specifically be converting a JSON string into a message object, that is, the obtained response data is specifically a response message.
[0067] In one embodiment, the response data represents a message sent to the requesting end. After the parsing result is obtained, some of the parameters required for sending need to be updated, such as the sending address and the receiving address, etc. Therefore, in this step, the preset parsing model is called to parse the stored data to obtain the target data, and then the personalized parameters required for sending can be updated. Therefore, the parameter fields that need to be updated in the target data can be identified to extract the field values of these parameter fields from the business data request, and then generate the response data based on the target data and the parameter values. Therefore, this step can be executed as follows: calling the preset parsing model, parsing the stored data, and obtaining the target data; identifying the parameter fields in the target data, matching the parameter fields with the business data request to extract the parameter values of the parameter fields, and generating the response data based on the target data and the parameter values. The parameter field can be a pre-selected setting, or it can be a field with an empty parameter value identified from the message header of the target data.
[0068] In another embodiment, in order to facilitate the storage of response data and the processing of each business, corresponding response information can be generated for different business types and transactions, so that the corresponding response data can be queried according to the response information. Therefore, this step can be specifically performed as follows: obtaining the business type to which the business data belongs, generating a corresponding string in combination with the transaction code of the business data, splicing the string with the data identifier, and generating response information.
[0069] It should be noted that, in an embodiment of the present invention, the cache data table is pre-set, in which the storage time information and valid flag of each response data can also be stored, the storage time information indicates the storage duration of the response data, and the valid flag indicates whether the response data is valid. When the response data is invalid, it can continue to be stored as dirty data, so that when the data acquisition storage is abnormal, the dirty data can be used to respond. For example, when an exception is caused by a failure to access the database or a timeout in business processing, dirty data needs to be used as a backup to avoid a direct return failure.
[0070] S103: In response to the storage identifier being a second preset value, target data is acquired from a database based on the data identifier to call a preset generation model, and response data is generated and sent based on the target data.
[0071] The storage identifier is a second preset value, indicating that the response data corresponding to the data identifier is not stored in the cache, so the data corresponding to the business data request can be obtained from the data, and then the response data is generated and sent. The generation model in this step is preset, and specifically can be a message generation model, that is, a response message is generated according to the target data to be sent to the request end.
[0072] In one embodiment, in this step, it is possible that the data may fail to be obtained from the database. In this case, the following specific steps may be performed: a data request is sent to the database based on the data identifier, and feedback information sent by the database is received; in response to the feedback information being a failure, a record parameter corresponding to the data identifier in a preset business list is queried; in response to the record parameter being a preset parameter, the business information to which the business data belongs is obtained, response information is generated based on the business information and the data identifier, a cache data table associated with the response information is queried, and corresponding stored data is extracted from the cache data table.
[0073] The feedback information is failure, which means that the requested data cannot be provided in the database. At this time, you can query the record parameters corresponding to the data identifier in the preset business list again. The queried record parameters are preset parameters, which means that the requested data has been stored in the cache data table. At this time, the requested data may be invalid due to expiration and other factors, but the database cannot provide the requested data at present, so the invalid data in the cache data table can be used as the requested big data to return. Therefore, the business information to which the business data belongs can be obtained to generate response information based on the business information and data identifier, and query the cache data table associated with the response information to extract the corresponding stored data from the cache data table, and then the response data can be obtained by parsing the stored data and sent.
[0074] It should be noted that in the embodiment of the present invention, the feedback information returned by the database is a failure, which may include multiple failure types, such as database connection failure, database not storing the requested data, abnormal data stored in the database, etc. For different failure types, different processing methods can also be set in the embodiment of the present invention. For example, when the failure type is database connection failure, the data in the cache data table can be returned as the requested data; when the failure type is that the database does not store the requested data, the production system of the requested data can be queried to obtain data by calling the connection interface of the production system, so as to obtain the requested data in time and then return it. Therefore, in the embodiment of the present invention, after determining that the feedback information is a failure, the failure type can be judged, and the failure type can be carried in the feedback information, and then the subsequent processing method can be determined by the feedback type.
[0075] In another embodiment, after the response data is generated in this step, it can be stored in the cache to facilitate subsequent data request processing. Specifically, it can be performed as follows: generating storage data based on the response data, updating the storage data to the cache data table, and updating the storage identifier corresponding to the data identifier in the preset service list to the first preset value.
[0076] There is no limitation on the method of generating storage data based on response data. After the storage data is generated, it is updated to the cache data table. When a subsequent data request is made, data can be directly read from the cache data table to obtain and send the information.
[0077] In an embodiment of the present invention, for requested data, response information can be directly stored in a cache, and when it needs to be sent, it can be parsed from the cache and sent directly, thereby reducing processing exceptions caused by the database and improving business processing efficiency; and in an embodiment of the present invention, the response data that can be sent is stored, and after determining that the response data corresponding to the request data is stored in the cache, the response data can be sent to the requesting end, thereby reducing the data processing process and improving business processing efficiency.
[0078] Combine the following Figure 1 The system architecture shown in the figure specifically describes the data processing method in the embodiment of the present invention. Figure 2 As shown, the method includes:
[0079] S201: Receive a service data request, obtain a corresponding data identifier, and query a storage identifier associated with the data identifier in a preset service list.
[0080] S202: In response to the storage identifier being the first preset value, obtaining the business type to which the business data belongs, generating a corresponding character string in combination with the transaction code of the business data, concatenating the character string with the data identifier, and generating response information.
[0081] S203: calling a preset parsing model to parse the stored data to obtain target data.
[0082] S204: Identify parameter fields in the target data, match the parameter fields with the business data request to extract parameter values of the parameter fields, and generate response data based on the target data and the parameter values.
[0083] S205: In response to the storage identifier being a second preset value, acquiring target data from a database based on the data identifier, so as to call a preset generation model and generate response data based on the target data.
[0084] S206: Send response data.
[0085] It should be noted that the data processing principle in the embodiment of the present invention is the same as Figure 1 The corresponding data processing principles in the illustrated embodiments are the same and will not be described in detail here.
[0086] Combine the following Figure 1 The embodiment shown in the figure specifically describes the method for data processing in the embodiment of the present invention. Figure 3 As shown, the method includes:
[0087] S301: Receive a service data request, obtain a corresponding data identifier, and query a storage identifier associated with the data identifier in a preset service list.
[0088] S302: In response to the storage identifier being a first preset value, obtain the business information to which the business data belongs, generate response information based on the business information and the data identifier, query the cache data table associated with the response information, extract the corresponding storage data from the cache data table, call the preset parsing model to parse the storage data, obtain the response data and send it.
[0089] S303: In response to the storage identifier being a second preset value, target data is acquired from a database based on the data identifier to call a preset generation model, and response data is generated and sent based on the target data.
[0090] S304: Generate storage data based on the response data to update the storage data to the cache data table.
[0091] S305: Update the storage identifier corresponding to the data identifier in the preset service list to a first preset value.
[0092] It should be noted that the data processing principle in the embodiment of the present invention is the same as Figure 1 The corresponding data processing principles in the illustrated embodiments are the same and will not be described in detail here.
[0093] In order to solve the problems existing in the prior art, an embodiment of the present invention provides a data processing device 400, such as Figure 4 As shown, the device 400 includes:
[0094] The receiving unit 401 is used to receive a service data request, obtain a corresponding data identifier, and query a storage identifier associated with the data identifier in a preset service list;
[0095] The processing unit 402 is configured to obtain the business information to which the business data belongs in response to the storage identifier being the first preset value, generate response information based on the business information and the data identifier, query the cache data table associated with the response information, extract the corresponding storage data from the cache data table, call a preset parsing model to parse the storage data, obtain the response data, and send it;
[0096] The processing unit 402 is further configured to, in response to the storage identifier being a second preset value, obtain target data from the database based on the data identifier, so as to call a preset generation model, generate response data based on the target data, and send the response data.
[0097] It should be understood that the manner of implementing the embodiments of the present invention is different from the Figure 1 The method of the illustrated embodiment is the same and will not be repeated here.
[0098] In one embodiment, the processing unit 402 is specifically configured to:
[0099] Calling a preset parsing model to parse the stored data to obtain target data;
[0100] Identify a parameter field in the target data, match the parameter field with the business data request to extract a parameter value of the parameter field, and generate response data based on the target data and the parameter value.
[0101] In yet another embodiment, the processing unit 402 is specifically configured to:
[0102] The stored data is converted into a preset format, the converted stored data is decoded into data to be processed through a decoding model, and the data to be processed is deserialized to obtain the response data.
[0103] In yet another embodiment, the processing unit 402 is specifically configured to:
[0104] The business type to which the business data belongs is obtained, and a corresponding character string is generated in combination with the transaction code of the business data, and the character string is concatenated with the data identifier to generate response information.
[0105] In yet another embodiment, the processing unit 402 is specifically configured to:
[0106] Sending a data request to the database based on the data identifier, and receiving feedback information sent by the database;
[0107] In response to the feedback information being a failure, querying a record parameter corresponding to the data identifier in the preset service list;
[0108] In response to the record parameter being a preset parameter, business information to which the business data belongs is obtained, response information is generated based on the business information and the data identifier, a cache data table associated with the response information is queried, and corresponding storage data is extracted from the cache data table.
[0109] In yet another embodiment, the apparatus 400 further includes:
[0110] An updating unit is used to generate storage data based on the response data to update the storage data to the cache data table, and to update the storage identifier corresponding to the data identifier in the preset service list to the first preset value.
[0111] It should be understood that the manner of implementing the embodiments of the present invention is different from the Figure 1 , 2 , and 3 are the same as the embodiments shown in FIG. 3 and will not be described again here.
[0112] In the embodiment of the present invention, when receiving a business data request, the storage identifier associated with the data identifier in the preset business list can be queried according to the data identifier to determine the response mode of the request data; when the storage identifier is the first preset value, it means that the corresponding response data already exists and is stored in the cache data table, so the response information can be generated based on the business information and the data identifier, the cache data table associated with the response information is queried, the corresponding storage data is extracted from the cache data table, and the preset parsing model is called to parse the storage data to obtain the response data and send it; when the storage identifier is the second preset value, it means that the corresponding data needs to be obtained from the database, so the target data is obtained from the database based on the data identifier to call the preset generation model, and the response data is generated based on the target data and sent. In this way, in the embodiment of the present invention, for the requested data, the response information can be directly stored in the cache, and when it needs to be sent, it can be parsed from the cache and sent directly, thereby reducing the number of abnormalities caused by the database and improving the efficiency of business processing; and in the embodiment of the present invention, the response data that can be sent is stored, and after determining that the response data corresponding to the request data is stored in the cache, the response data can be sent to the request end, thereby reducing the data processing process and improving the efficiency of business processing.
[0113] According to an embodiment of the present invention, the embodiment of the present invention further provides an electronic device and a readable storage medium.
[0114] The electronic device of an embodiment of the present invention comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the data processing method provided by the embodiment of the present invention.
[0115] Figure 5 An exemplary system architecture 500 is shown to which the data processing method or data processing apparatus according to the embodiment of the present invention can be applied.
[0116] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0117] The user can use the terminal devices 501, 502, 503 to interact with the server 505 through the network 504 to receive or send messages, etc. Various client applications can be installed on the terminal devices 501, 502, 503.
[0118] The terminal devices 501 , 502 , and 503 may be, but are not limited to, smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0119] The server 505 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 501, 502, and 503. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as product information - only an example) to the terminal device.
[0120] It should be noted that the data processing method provided in the embodiment of the present invention is generally executed by the server 505 , and accordingly, the data processing device is generally set in the server 505 .
[0121] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0122] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 suitable for implementing an embodiment of the present invention. Figure 6 The computer system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0123] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0124] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0125] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.
[0126] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0127] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a unit, a program segment, or a part of a code, and the above-mentioned unit, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0128] The units involved in the embodiments of the present invention may be implemented by software or hardware. The units described may also be arranged in a processor, for example, it may be described as: a processor includes a receiving unit and a processing unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the receiving unit may also be described as a "unit with a receiving function".
[0129] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device executes the data processing method provided by the present invention.
[0130] As another aspect, the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the data processing method provided by an embodiment of the present invention.
[0131] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for data processing, characterized in that: include: Receive a service data request, obtain a corresponding data identifier, and query a storage identifier associated with the data identifier in a preset service list; In response to the storage identifier being a first preset value, obtaining business information to which the business data belongs, generating response information based on the business information and the data identifier, querying a cache data table associated with the response information, extracting corresponding storage data from the cache data table, calling a preset parsing model to parse the storage data, obtaining response data, and sending the response data; In response to the storage identifier being a second preset value, target data is acquired from the database based on the data identifier to call a preset generation model, and response data is generated and sent based on the target data.
2. The method according to claim 1, characterized in that The calling of a preset parsing model to parse the stored data to obtain response data includes: Calling a preset parsing model to parse the stored data to obtain target data; Identify a parameter field in the target data, match the parameter field with the business data request to extract a parameter value of the parameter field, and generate response data based on the target data and the parameter value.
3. The method according to claim 1, characterized in that The calling of a preset parsing model to parse the stored data to obtain response data includes: The stored data is converted into a preset format, the converted stored data is decoded into data to be processed through a decoding model, and the data to be processed is deserialized to obtain the response data.
4. The method according to claim 1, characterized in that The acquiring of the business information to which the business data belongs, so as to generate response information based on the business information and the data identifier, includes: The business type to which the business data belongs is obtained, and a corresponding character string is generated in combination with the transaction code of the business data, and the character string is concatenated with the data identifier to generate response information.
5. The method according to claim 1, characterized in that: Acquiring target data from the database based on the data identifier includes: Sending a data request to the database based on the data identifier, and receiving feedback information sent by the database; In response to the feedback information being a failure, querying a record parameter corresponding to the data identifier in the preset service list; In response to the record parameter being a preset parameter, business information to which the business data belongs is obtained, response information is generated based on the business information and the data identifier, a cache data table associated with the response information is queried, and corresponding storage data is extracted from the cache data table.
6. The method according to claim 1, characterized in that After generating response data based on the target data, the method includes: Generate storage data based on the response data to update the storage data to the cache data table, and update the storage identifier corresponding to the data identifier in the preset service list to the first preset value.
7. A data processing device, characterized in that: include: A receiving unit, configured to receive a service data request, obtain a corresponding data identifier, and query a storage identifier associated with the data identifier in a preset service list; a processing unit, configured to obtain, in response to the storage identifier being a first preset value, business information to which the business data belongs, generate response information based on the business information and the data identifier, query a cache data table associated with the response information, extract corresponding storage data from the cache data table, call a preset parsing model to parse the storage data, obtain response data, and send the response data; The processing unit is further used to obtain target data from the database based on the data identifier in response to the storage identifier being a second preset value, so as to call a preset generation model, generate response data based on the target data, and send it.
8. The device according to claim 7, characterized in that The processing unit is specifically used for: Calling a preset parsing model to parse the stored data to obtain target data; Identify a parameter field in the target data, match the parameter field with the business data request to extract a parameter value of the parameter field, and generate response data based on the target data and the parameter value.
9. The device according to claim 7, characterized in that The processing unit is specifically used for: The stored data is converted into a preset format, the converted stored data is decoded into data to be processed through a decoding model, and the data to be processed is deserialized to obtain the response data.
10. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
11. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
12. A computer program product, comprising a computer program, characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.