CN109871251B - Response data processing method and device, storage medium and terminal equipment - Google Patents

Response data processing method and device, storage medium and terminal equipment Download PDF

Info

Publication number
CN109871251B
CN109871251B CN201910042833.7A CN201910042833A CN109871251B CN 109871251 B CN109871251 B CN 109871251B CN 201910042833 A CN201910042833 A CN 201910042833A CN 109871251 B CN109871251 B CN 109871251B
Authority
CN
China
Prior art keywords
response data
data
preset
language type
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910042833.7A
Other languages
Chinese (zh)
Other versions
CN109871251A (en
Inventor
于亚军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910042833.7A priority Critical patent/CN109871251B/en
Publication of CN109871251A publication Critical patent/CN109871251A/en
Application granted granted Critical
Publication of CN109871251B publication Critical patent/CN109871251B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for processing response data, a storage medium, and a terminal device. The method comprises the following steps: receiving an access request of an application terminal, and determining a language type requested by the application terminal according to the access request; analyzing the access request, sending the analyzed access request to each micro-service, so that each micro-service responds to the received access request and returns corresponding first response data; acquiring first response data returned by each micro service, and searching second response data which corresponds to each first response data and is matched with the language type from a preset database; the second response data is returned to the application terminal, so that the internationalization processing of each micro service is avoided by carrying out unified internationalization processing on all the response data, the internationalization processing efficiency is improved, the code redundancy is reduced, the readability and the repairability of the code are enhanced, and the code maintenance is convenient.

Description

Response data processing method and device, storage medium and terminal equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for processing response data, a computer readable storage medium, and a terminal device.
Background
Along with the rise of the internet and the growth of user burst, the oriented user groups are diversified, so that the application program can respond differently according to the user region or language setting, the response data returned by each interface in the application program is often required to be internationalized, and the conventional internationalized processing mode is usually to perform respective internationalization processing in each interface, so that the internationalized processing efficiency is lower, code redundancy is caused, and the reading and modification of codes are inconvenient.
Disclosure of Invention
The embodiment of the invention provides a processing method, a processing device, a computer readable storage medium and terminal equipment for response data, which can perform unified internationalization processing on all response data, avoid respective internationalization processing in each micro service, effectively improve the efficiency of internationalization processing, reduce code redundancy, enhance the readability and repairability of codes and facilitate code maintenance.
In a first aspect of an embodiment of the present invention, a method for processing response data is provided, including:
receiving an access request of an application terminal, and determining a language type requested by the application terminal according to the access request;
analyzing the access request, sending the analyzed access request to each micro-service, so that each micro-service responds to the received access request and returns corresponding first response data;
acquiring first response data returned by each micro service, and searching second response data which corresponds to each first response data and is matched with the language type from a preset database, wherein the second response data of each language type corresponding to each first response data is configured in the preset database;
and returning the second response data to the application terminal.
In a second aspect of an embodiment of the present invention, there is provided a processing apparatus for response data, including:
the access request receiving module is used for receiving an access request of an application terminal and determining a language type requested by the application terminal according to the access request;
the access request response module is used for analyzing the access request and sending the analyzed access request to each micro service so that each micro service responds to the received access request and returns corresponding first response data;
the response data processing module is used for acquiring first response data returned by each micro service, and searching second response data which corresponds to each first response data and is matched with the language type from a preset database, wherein the second response data of each language type corresponding to each first response data is configured in the preset database;
and the response data return module is used for returning the second response data to the application terminal.
In a third aspect of embodiments of the present invention, there is provided a computer readable storage medium storing computer readable instructions which, when executed by a processor, implement the steps of the method for processing response data as described in the first aspect.
In a fourth aspect of the embodiment of the present invention, there is provided a terminal device including a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, the processor implementing the following steps when executing the computer readable instructions:
receiving an access request of an application terminal, and determining a language type requested by the application terminal according to the access request;
analyzing the access request, sending the analyzed access request to each micro-service, so that each micro-service responds to the received access request and returns corresponding first response data;
acquiring first response data returned by each micro service, and searching second response data which corresponds to each first response data and is matched with the language type from a preset database, wherein the second response data of each language type corresponding to each first response data is configured in the preset database;
and returning the second response data to the application terminal.
From the above technical solutions, the embodiment of the present invention has the following advantages:
in the embodiment of the invention, after the access request of the application terminal is received, the language type requested by the application terminal can be determined according to the access request, the access request is analyzed, and the analyzed access request is sent to each micro service, so that each micro service responds to the received access request and returns corresponding first response data, when the first response data returned by each micro service is obtained, unified internationalization processing can be carried out on each first response data, and second response data obtained by internationalization processing is returned to the application terminal, thus the respective internationalization processing in each micro service can be avoided by carrying out unified internationalization processing on all response data, the processing efficiency of internationalization processing is effectively improved, the code redundancy is reduced, the readability and repairability of the code are enhanced, and the code maintenance is convenient.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an embodiment of a method for processing response data according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for processing response data in an embodiment of the present invention to obtain second response data in an application scenario;
fig. 3 is a schematic flow chart of a processing method of response data in an embodiment of the present invention for obtaining second response data in another application scenario;
FIG. 4 is a block diagram of an embodiment of a response data processing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a processing method, a processing device, a computer readable storage medium and terminal equipment for response data, which are used for carrying out unified internationalization processing on all response data, avoiding respective internationalization processing in each micro service, effectively improving the processing efficiency of internationalization processing, reducing code redundancy, enhancing the readability and repairability of codes and facilitating code maintenance.
In order to make the objects, features and advantages of the present invention more comprehensible, the technical solutions in the embodiments of the present invention are described in detail below with reference to the accompanying drawings, and it is apparent that the embodiments described below are only some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, an embodiment of the present invention provides a method for processing response data, where the method includes:
step S101, receiving an access request of an application terminal, and determining a language type requested by the application terminal according to the access request;
in the embodiment of the invention, the gateway can receive the access request of the application terminal, and can determine the language type requested by the application terminal according to the access request, for example, the language type requested by the application terminal can be determined according to the target language tag carried by the access request, so as to return corresponding response data to the application terminal according to the language type.
Step S102, analyzing the access request, and sending the analyzed access request to each micro-service, so that each micro-service responds to the received access request and returns corresponding first response data;
it may be understood that after the access request of the application terminal is received through gateway, the access request may be subjected to parsing, for example, the access request may be subjected to parsing according to a cooperative working condition between each micro service, so as to decompose the access request into a plurality of sub-requests corresponding to each micro service, and the plurality of sub-requests are forwarded to the corresponding micro service through gateway, so that each micro service may respond to the received sub-request, obtain corresponding first response data, and may return the first response data to the gateway.
Step S103, first response data returned by each micro service are obtained, and second response data which correspond to each first response data and are matched with the language type are searched from a preset database, wherein the second response data of each language type corresponding to each first response data are configured in the preset database;
in the embodiment of the invention, before the first response data returned by each micro service reaches gateway, interception processing can be performed on each first response data, that is, before the first response data returned by each micro service reaches gateway, the first response data returned by each micro service can be obtained, and according to the language type corresponding to the access request, second response data which corresponds to each first response data and matches with the language type is searched from a preset database, wherein the second response data of each language type corresponding to each first response data is configured in the preset database. In the embodiment of the invention, before the returned first response data reach gateway, the first response data are uniformly intercepted, and then the first response data are uniformly internationalized by searching the data in the preset database, so that internationalization processing in each micro service is not needed, code redundancy is effectively reduced, code readability and modification are enhanced, and the processing efficiency of internationalization processing is improved.
In a specific application scenario, the preset database is configured with second response data B, second response data C, second response data D, second response data E, and second response data F corresponding to the first response data a, where the language type of the second response data B is english, the language type of the second response data C is japanese, the language type of the second response data D is french, the language type of the second response data E is german, the language type of the second response data F is korean, and when the first response data returned by a certain access request is the first response data a, and when it is determined that the language type requested by the application terminal is french according to the access request, the second response data corresponding to the first response data a and conforming to the requested language type can be found from the preset database as the second response data D.
Further, as shown in fig. 2, the searching the second response data corresponding to each first response data and matched with the language type from the preset database may include:
step S201, acquiring historical searching times of the first response data in the language type;
step S202, judging whether the historical searching times are larger than a preset times threshold value or not;
step 203, if the history searching times is greater than the preset times threshold, searching second response data corresponding to the first response data and matched with the language type from a preset cache unit;
step S204, if the historical searching times are smaller than or equal to the preset times threshold, searching second response data which corresponds to the first response data and is matched with the language type from the preset database.
In the embodiment of the invention, in order to improve the processing speed and efficiency of internationalization processing and improve the use experience of a user, hot spot data which are frequently accessed in a preset database can be stored in a preset cache unit, for example, the hot spot data can be stored in a Redis server, so that before certain first response data are internationalization processed into second response data of a certain language type, whether the second response data of the language type are the hot spot data can be judged first, and if the second response data of the language type are the hot spot data, the second response data can be directly searched from the Redis server; if the second response data of the language type is not the hot spot data, the second response data can be searched from a preset database.
As to the above steps S210 to S204, it may be understood that, in an application scenario, the hotspot data may be determined according to the number of searches, that is, the preset number of times threshold may be set in advance, for example, the preset number of times threshold may be set to 10 times according to a specific situation, that is, when the number of times of historic searches of a certain first response data in a certain language type is greater than 10 times, the second response data corresponding to the first response data and matched with the language type may be determined as the hotspot data, and may be stored in the Redis server.
When the history searching times of the first response data in the language type are larger than the preset times threshold, if the history searching times are larger than 10 times, the second response data corresponding to the first response data and matched with the language type can be considered as hot spot data, and the searching of the second response data can be carried out from a Redis server, so that the data searching speed is improved, and the internationalization processing speed and efficiency are improved; and when the historical searching times is smaller than or equal to a preset times threshold, if the historical searching times is 4 times, the second response data corresponding to the first response data and matched with the language type can be considered to be not hot spot data, and the searching of the second response data can be carried out from a preset database.
Preferably, as shown in fig. 3, the searching the second response data corresponding to each first response data and matched with the language type from the preset database may include:
step S301, acquiring the data type of the first response data;
step S302, judging whether the data type belongs to a preset data type or not;
step S303, if the data type belongs to a preset data type, judging whether the language type belongs to a preset language type;
step S304, if the language type belongs to a preset language type, searching second response data which corresponds to the first response data and is matched with the language type from a preset cache unit;
step S305, if the data type does not belong to a preset data type or the language type does not belong to a preset language type, searching second response data corresponding to the first response data and matched with the language type from the preset database.
For the above steps S301 to S305, in another application scenario, the embodiment of the present invention may further determine hotspot data according to the data type and the language type, for example, response data of english types such as EC (eastern China), SC (south China) and the like, which need to be acquired frequently, may be determined as hotspot data according to specific situations, and stored in the Redis server.
When the first response data is the region type data, whether the language type required by the internationalization processing is the preset language type or not can be further judged, if the language type required by the internationalization processing is the English, and when the language type required by the internationalization processing is the English, the second response data which corresponds to the first response data and is matched with the language type can be considered as hot spot data, namely the second response data can be searched from a Redis server, so that the data searching speed is improved, and the internationalization processing speed and the internationalization processing efficiency are improved; and the data type of the first response data does not belong to region type data, or although the data type of the first response data belongs to region type data, when the language type required by the internationalization processing is not English, the second response data corresponding to the first response data and matched with the language type can be considered to be not hot spot data, and the search of the second response data can be performed from a preset database.
Optionally, in an embodiment of the present invention, searching, from a preset database, second response data corresponding to each first response data and matched with the language type may include:
step a, obtaining attribute information of each first response data;
and b, searching second response data which correspond to each first response data and are matched with the language type from the preset database according to the attribute information.
For the steps a and b, it may be understood that in the embodiment of the present invention, in the preset database, the second response data of each language type may be classified and stored according to the attribute information of the first response data, for example, the second response data may be classified and stored according to the category (category) and/or the keyword (key) of the first response data, so that after the first response data is obtained, the attribute information of the first response data may be immediately obtained, and then the quick search of the second response data may be performed in the preset database according to the attribute information.
Here, since the values of the enumerated types generally have invariance, such as enumeration values EC (eastern China) and SC (south China) describing regions, and internationalized values of values Available, pending (in creation), and deleted, etc. representing resource states, that is, the second response data of each language type thereof can be obtained by directly searching in a preset database according to keywords; the internationalization value of the character string type can be obtained by self-defining attribute information 'key' and 'category' in annotation @ i18N, finding a data table where the category is located in a preset database, and then obtaining specific data according to the key.
It should be noted that, in the preset buffer unit, the related second response data may be classified and stored according to the attribute information of the first response data, and when the second response data is searched in the preset buffer unit, the method may also be executed according to the step a and the step b.
And step S104, returning the second response data to the application terminal.
It can be understood that after the corresponding second response data is obtained through unified interception and unified internationalization processing, the corresponding second response data can be returned to the application terminal through gateway, so that the processing result is displayed in the application terminal according to the requested language type.
Further, in an embodiment of the present invention, the method for processing response data may further include:
step c, when a data update request is received, acquiring update data;
and d, updating corresponding second response data in the preset database according to the updating data, or updating corresponding second response data in the preset database and corresponding second response data in the preset cache unit according to the updating data.
For the steps c and d, it can be understood that in the embodiment of the present invention, the update of each second response data may be further performed according to the actual situation, so as to ensure the correctness of the second response data. Specifically, when a data update request is received, corresponding update data can be obtained, corresponding second response data in a preset database can be updated according to the update data, meanwhile, whether the update data is hot spot data can be judged, and when the update data is hot spot data, the corresponding second response data in the preset cache unit can be synchronously updated according to the update data.
In the embodiment of the invention, after the access request of the application terminal is received, the language type requested by the application terminal can be determined according to the access request, the access request is analyzed, and then the analyzed access request is sent to each micro service, so that each micro service responds to the received access request and returns corresponding first response data, after the first response data returned by each micro service is obtained, unified internationalization processing can be carried out on each first response data, and second response data obtained by the internationalization processing is returned to the application terminal, namely, the internationalization processing of each micro service is avoided by carrying out unified internationalization processing on all the response data, thereby effectively improving the processing efficiency of the internationalization processing, reducing code redundancy, enhancing the readability and repairability of codes, and facilitating the code maintenance.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
The above mainly describes a method of processing response data, and a device for processing response data will be described in detail.
Fig. 4 is a block diagram showing an embodiment of a processing apparatus for response data in the embodiment of the present invention. As shown in fig. 4, the processing apparatus includes:
an access request receiving module 401, configured to receive an access request of an application terminal, and determine a language type requested by the application terminal according to the access request;
the access request response module 402 is configured to parse the access request, and send the parsed access request to each micro service, so that each micro service responds to the received access request, and returns corresponding first response data;
the response data processing module 403 is configured to obtain first response data returned by each micro service, and search second response data corresponding to each first response data and matched with the language type from a preset database, where the preset database is configured with second response data of each language type corresponding to each first response data;
and the response data returning module 404 is configured to return the second response data to the application terminal.
Further, the response data processing module 403 may include:
the searching frequency acquisition unit is used for acquiring the historical searching frequency of the first response data in the language type;
the searching frequency judging unit is used for judging whether the historical searching frequency is larger than a preset frequency threshold value or not;
the first cache searching unit is used for searching second response data which corresponds to the first response data and is matched with the language type from a preset cache unit if the historical searching times are larger than the preset times threshold;
and the first database searching unit is used for searching second response data which corresponds to the first response data and is matched with the language type from the preset database if the historical searching times are smaller than or equal to the preset times threshold value.
Preferably, the response data processing module 403 may include:
a data type acquisition unit, configured to acquire a data type of the first response data;
the data type judging unit is used for judging whether the data type belongs to a preset data type or not;
the language type judging unit is used for judging whether the language type belongs to a preset language type if the data type belongs to the preset data type;
the second cache searching unit is used for searching second response data which corresponds to the first response data and is matched with the language type from the preset cache unit if the language type belongs to the preset language type;
and the second database searching unit is used for searching second response data which corresponds to the first response data and is matched with the language type from the preset database if the data type does not belong to the preset data type or the language type does not belong to the preset language type.
Optionally, the response data processing module 403 may further include:
an attribute information acquisition unit configured to acquire attribute information of each of the first response data;
and the response data processing unit is used for searching second response data which corresponds to each first response data and is matched with the language type from the preset database according to the attribute information.
Further, the processing apparatus may further include:
the updating data acquisition module is used for acquiring updating data when receiving a data updating request;
and the response data updating module is used for updating corresponding second response data in the preset database according to the updating data or updating corresponding second response data in the preset database and corresponding second response data in the preset cache unit according to the updating data.
Fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 5, the terminal device 5 of this embodiment includes: a processor 50, a memory 51, and computer readable instructions 52, such as a processing program responsive to data, stored in the memory 51 and executable on the processor 50. The processor 50, when executing the computer readable instructions 52, implements the steps of the above-described embodiments of the method for processing response data, such as steps S101 to S104 shown in fig. 1. Alternatively, the processor 50, when executing the computer readable instructions 52, performs the functions of the modules/units of the apparatus embodiments described above, such as the functions of modules 401 through 404 shown in fig. 4.
Illustratively, the computer readable instructions 52 may be partitioned into one or more modules/units that are stored in the memory 51 and executed by the processor 50 to accomplish the present invention. The one or more modules/units may be a series of computer readable instruction segments capable of performing specific functions describing the execution of the computer readable instructions 52 in the terminal device 5.
The terminal device 5 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The terminal device may include, but is not limited to, a processor 50, a memory 51. It will be appreciated by those skilled in the art that fig. 5 is merely an example of the terminal device 5 and does not constitute a limitation of the terminal device 5, and may include more or less components than illustrated, or may combine certain components, or different components, e.g., the terminal device may further include an input-output device, a network access device, a bus, etc.
The processor 50 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. The memory 51 may be an external storage device of the terminal device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal device 5. The memory 51 is used for storing the computer readable instructions and other programs and data required by the terminal device 5. The memory 51 may also be used to temporarily store data that has been output or is to be output.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (5)

1. A method of processing response data, comprising:
receiving an access request of an application terminal, and determining a language type requested by the application terminal according to the access request, wherein the access request of the application terminal is received through gateway;
analyzing the access request, sending the analyzed access request to each micro-service, so that each micro-service responds to the received access request and returns corresponding first response data;
acquiring first response data returned by each micro service before the first response data returned by each micro service reaches gateway, and searching second response data which corresponds to each first response data and is matched with the language type from a preset database, wherein the second response data of each language type corresponding to each first response data is configured in the preset database;
returning the second response data to the application terminal;
the searching the second response data corresponding to each first response data and matched with the language type from the preset database comprises the following steps:
acquiring the data type of the first response data;
judging whether the data type belongs to a preset data type or not;
if the data type belongs to a preset data type, judging whether the language type belongs to a preset language type or not;
if the language type belongs to a preset language type, searching second response data which corresponds to the first response data and is matched with the language type from a preset cache unit;
if the data type does not belong to a preset data type or the language type does not belong to a preset language type, searching second response data which corresponds to the first response data and is matched with the language type from the preset database;
the searching the second response data which corresponds to the first response data and is matched with the language type from a preset buffer unit comprises the following steps:
acquiring attribute information of each piece of first response data;
searching second response data which correspond to the first response data and are matched with the language types from the preset cache unit according to the attribute information, wherein the second response data of the language types are classified and stored in the preset cache unit according to the attribute information of the first response data;
the searching the second response data corresponding to each first response data and matched with the language type from the preset database comprises the following steps:
acquiring attribute information of each piece of first response data;
and searching second response data which corresponds to each first response data and is matched with the language type from the preset database according to the attribute information, wherein the second response data of each language type is classified and stored in the preset database according to the attribute information of the first response data.
2. The method for processing response data according to claim 1, characterized in that the method for processing response data further comprises:
when a data update request is received, acquiring update data;
and updating the corresponding second response data in the preset database according to the updating data, or updating the corresponding second response data in the preset database and the corresponding second response data in the preset cache unit according to the updating data.
3. A response data processing apparatus, comprising:
the access request receiving module is used for receiving an access request of the application terminal and determining the language type requested by the application terminal according to the access request, wherein the access request of the application terminal is received through gateway;
the access request response module is used for analyzing the access request and sending the analyzed access request to each micro service so that each micro service responds to the received access request and returns corresponding first response data;
the response data processing module is used for acquiring the first response data returned by each micro service before the first response data returned by each micro service reaches gateway, and searching second response data which corresponds to each first response data and is matched with the language type from a preset database, wherein the second response data of each language type corresponding to each first response data is configured in the preset database;
the response data return module is used for returning the second response data to the application terminal;
the response data processing module comprises:
a data type acquisition unit, configured to acquire a data type of the first response data;
the data type judging unit is used for judging whether the data type belongs to a preset data type or not;
the language type judging unit is used for judging whether the language type belongs to a preset language type if the data type belongs to the preset data type;
the second cache searching unit is used for searching second response data which corresponds to the first response data and is matched with the language type from the preset cache unit if the language type belongs to the preset language type;
a second database searching unit, configured to search, if the data type does not belong to a preset data type or the language type does not belong to a preset language type, second response data corresponding to the first response data and matched with the language type from the preset database;
an attribute information acquisition unit configured to acquire attribute information of each of the first response data;
and the response data processing unit is used for searching second response data which corresponds to each first response data and is matched with the language type from the preset database according to the attribute information, wherein the second response data of each language type is classified and stored in the preset database according to the attribute information of the first response data.
4. A computer readable storage medium storing computer readable instructions which, when executed by a processor, implement the steps of the method of processing response data according to claim 1 or 2.
5. A terminal device comprising a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, wherein the processor, when executing the computer readable instructions, performs the steps of:
receiving an access request of an application terminal, and determining a language type requested by the application terminal according to the access request, wherein the access request of the application terminal is received through gateway;
analyzing the access request, sending the analyzed access request to each micro-service, so that each micro-service responds to the received access request and returns corresponding first response data;
acquiring first response data returned by each micro service before the first response data returned by each micro service reaches gateway, and searching second response data which corresponds to each first response data and is matched with the language type from a preset database, wherein the second response data of each language type corresponding to each first response data is configured in the preset database;
returning the second response data to the application terminal;
the searching the second response data corresponding to each first response data and matched with the language type from the preset database comprises the following steps:
acquiring the data type of the first response data;
judging whether the data type belongs to a preset data type or not;
if the data type belongs to a preset data type, judging whether the language type belongs to a preset language type or not;
if the language type belongs to a preset language type, searching second response data which corresponds to the first response data and is matched with the language type from a preset cache unit;
if the data type does not belong to a preset data type or the language type does not belong to a preset language type, searching second response data which corresponds to the first response data and is matched with the language type from the preset database;
the searching the second response data which corresponds to the first response data and is matched with the language type from a preset buffer unit comprises the following steps:
acquiring attribute information of each piece of first response data;
searching second response data which correspond to the first response data and are matched with the language types from the preset cache unit according to the attribute information, wherein the second response data of the language types are classified and stored in the preset cache unit according to the attribute information of the first response data;
the searching the second response data corresponding to each first response data and matched with the language type from the preset database comprises the following steps:
acquiring attribute information of each piece of first response data;
and searching second response data which corresponds to each first response data and is matched with the language type from the preset database according to the attribute information, wherein the second response data of each language type is classified and stored in the preset database according to the attribute information of the first response data.
CN201910042833.7A 2019-01-17 2019-01-17 Response data processing method and device, storage medium and terminal equipment Active CN109871251B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910042833.7A CN109871251B (en) 2019-01-17 2019-01-17 Response data processing method and device, storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910042833.7A CN109871251B (en) 2019-01-17 2019-01-17 Response data processing method and device, storage medium and terminal equipment

Publications (2)

Publication Number Publication Date
CN109871251A CN109871251A (en) 2019-06-11
CN109871251B true CN109871251B (en) 2023-12-29

Family

ID=66917812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910042833.7A Active CN109871251B (en) 2019-01-17 2019-01-17 Response data processing method and device, storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN109871251B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502696A (en) * 2019-08-05 2019-11-26 上海掌门科技有限公司 A kind of method and apparatus of information stream distribution
CN110825459B (en) * 2019-11-08 2023-11-03 深圳前海环融联易信息科技服务有限公司 Enumeration constant hot loading method, device, computer equipment and storage medium
CN111651221B (en) * 2020-07-14 2022-09-20 迈普通信技术股份有限公司 Annotation internationalization method and device, storage medium and electronic equipment
CN112579235B (en) * 2020-12-16 2024-05-21 平安银行股份有限公司 Method, transcoding center, client, device and medium for internationalization of response data
CN113467308A (en) * 2021-07-05 2021-10-01 浙江大云物联科技有限公司 Edge calculation controller and data processing method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106156128A (en) * 2015-04-08 2016-11-23 阿里巴巴集团控股有限公司 A kind of realize website multi-lingual mention multiple domain name service method and device
CN108491450A (en) * 2018-02-26 2018-09-04 平安普惠企业管理有限公司 Data cache method, device, server and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5960421A (en) * 1997-08-20 1999-09-28 Bea Systems, Inc. Service interface repository internationalization
US20180052573A1 (en) * 2016-08-17 2018-02-22 Microsoft Technology Licensing, Llc Interaction with a file storage service through a messaging bot
CN108289060B (en) * 2017-01-09 2020-11-06 腾讯科技(深圳)有限公司 Data processing method and device based on RPC service
CN108540521A (en) * 2018-02-02 2018-09-14 捷开通讯(深圳)有限公司 A kind of method of synchronizing information, terminal device and server
CN108848000B (en) * 2018-05-07 2021-05-11 深圳壹账通智能科技有限公司 Network request testing method and device, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106156128A (en) * 2015-04-08 2016-11-23 阿里巴巴集团控股有限公司 A kind of realize website multi-lingual mention multiple domain name service method and device
CN108491450A (en) * 2018-02-26 2018-09-04 平安普惠企业管理有限公司 Data cache method, device, server and storage medium

Also Published As

Publication number Publication date
CN109871251A (en) 2019-06-11

Similar Documents

Publication Publication Date Title
CN109871251B (en) Response data processing method and device, storage medium and terminal equipment
CN108427705B (en) Electronic device, distributed system log query method and storage medium
CN107679081B (en) Information modification method and device, computer equipment and computer readable storage medium
US11086962B2 (en) Webpage loading method, client and server
CN108449316B (en) Anti-crawler method, server and client
JP2015036945A (en) Question answering control program, question answering control server, and question answering control method
CN109977233B (en) Idiom knowledge graph construction method and device
CN111737564B (en) Information query method, device, equipment and medium
CN117076719B (en) Database joint query method, device and equipment based on large language model
CN114900546B (en) Data processing method, device and equipment and readable storage medium
CN113132267B (en) Distributed system, data aggregation method and computer readable storage medium
CN111858581B (en) Paging query method and device, storage medium and electronic equipment
CN111078697B (en) Data storage method and device, storage medium and electronic equipment
CN110059243B (en) Data engine optimization method, device, equipment and computer readable storage medium
CN110990701A (en) Book searching method, computing device and computer storage medium
CN111444208A (en) Data updating method and related equipment
CN114818716A (en) Risk subject identification method and device, storage medium and equipment
CN113656538A (en) Method and device for generating regular expression, computing equipment and storage medium
CN113312540A (en) Information processing method, device, equipment, system and readable storage medium
CN112988391B (en) Data processing method, device, equipment and storage medium
CN111159229A (en) Data query method and device
CN110427391B (en) Method, apparatus and computer program product for determining duplicate data
CN116418767A (en) Instant messaging retrieval method and device
CN112905569A (en) Data caching method and device, electronic equipment and storage medium
CN114417117A (en) Special column filing method and device and cloud server

Legal Events

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