CN116049114A - Processing method, processor and storage medium for internationalization log - Google Patents

Processing method, processor and storage medium for internationalization log Download PDF

Info

Publication number
CN116049114A
CN116049114A CN202211564309.4A CN202211564309A CN116049114A CN 116049114 A CN116049114 A CN 116049114A CN 202211564309 A CN202211564309 A CN 202211564309A CN 116049114 A CN116049114 A CN 116049114A
Authority
CN
China
Prior art keywords
log
data
translation
target
log data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211564309.4A
Other languages
Chinese (zh)
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.)
Zhongke Yungu Technology Co Ltd
Original Assignee
Zhongke Yungu Technology 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 Zhongke Yungu Technology Co Ltd filed Critical Zhongke Yungu Technology Co Ltd
Priority to CN202211564309.4A priority Critical patent/CN116049114A/en
Publication of CN116049114A publication Critical patent/CN116049114A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/173Customisation support for file systems, e.g. localisation, multi-language support, personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/156Query results presentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present disclosure relates to the field of computer technologies, and in particular, to a processing method, a processor, and a storage medium for internationalization logs. The method comprises the following steps: the processing method is applied to a log query system and comprises the following steps: acquiring a viewing request for log data, wherein the log data comprises a database table name, a plurality of field names and field values corresponding to each field name; determining a target language of a terminal sending a viewing request; determining a translation task according to a target field and a target language in a plurality of field names contained in the log data; invoking a target translation model corresponding to the translation task to execute the translation task through the target translation model so as to translate the log data; replacing corresponding data in the log data with translation data corresponding to the target language to obtain translated log data; and displaying the translated log data according to the viewing request.

Description

Processing method, processor and storage medium for internationalization log
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a processing method, a processor, and a storage medium for internationalization logs.
Background
When a user obtains a log generated by a computer system, a specific log collection system is generally adopted to collect and analyze the log, and a visualized log file is generated and displayed to the user.
In the prior art, the acquired log files are mostly single-language log information, and when a user does not master the language of the log acquisition system, the user can be hard to acquire effective information from the acquired log files, and the user experience is poor. Therefore, the log collection system of single language cannot meet the requirements of all users, and the log collection system is difficult to internationalize.
Disclosure of Invention
An object of an embodiment of the application is to provide a processing method, a processor and a storage medium for internationalization logs.
In order to achieve the above object, a first aspect of the present application provides a processing method for internationalization logs, applied to a log query system, the processing method including:
acquiring a viewing request for log data, wherein the log data comprises a database table name, a plurality of field names and field values corresponding to each field name;
determining a target language of a terminal sending a viewing request;
determining a translation task according to a target field and a target language in a plurality of field names contained in the log data;
invoking a target translation model corresponding to the translation task to execute the translation task through the target translation model so as to translate the log data;
replacing corresponding data in the log data with translation data corresponding to the target language to obtain translated log data;
and displaying the translated log data according to the viewing request.
In an embodiment of the present application, the processing method further includes: before acquiring a viewing request for log data, sending a log acquisition instruction to a log acquisition service according to a pre-configured log acquisition task, wherein the log acquisition instruction carries a configuration table identifier; under the condition that new log information exists in a message queue of the log acquisition service, acquiring a configuration table identifier carried in the log information and log data corresponding to the log information; determining a target configuration table corresponding to the configuration table identifier; and analyzing and processing the log data according to the target configuration table to obtain the processed log data.
In an embodiment of the present application, the processing method further includes: acquiring task information configured by a user through a task configuration interface; determining a log acquisition task according to the task information; and determining a configuration table and a configuration table identification corresponding to the task information in the plurality of configuration tables.
In an embodiment of the present application, the processing method further includes: after determining a target language of the terminal sending the viewing request, matching the target language with a currently used language of the log data; in the case that the target language is inconsistent with the currently used language, determining a target translation model according to the target field and the target language in the plurality of field names contained in the log data.
In the embodiment of the application, the target field at least includes an application identifier, a database identifier, and a data table name.
In the embodiment of the application, determining the translation task according to the target field and the target language in the field names contained in the log data includes: and generating a plurality of translation tasks according to the application identifier, the database identifier and the data table name, wherein the number of target languages corresponding to each translation task is one or more, and at least one of the application identifier, the database identifier and the data table name corresponding to each translation task is different.
In the embodiment of the application, invoking the target translation model corresponding to the translation task to execute the translation task through the target translation model to translate the log data includes: determining a target language corresponding to each translation task, and calling a target translation model corresponding to the target language; and translating the plurality of field names, the data table names and the special values corresponding to the application identifiers, the database identifiers and the field names in the translation task into a target language through a target translation model.
In the embodiment of the present application, replacing the corresponding data in the log data with the translation data corresponding to the target language to obtain the translated log data includes: replacing the table names in the log data with the corresponding table names in the translation data; replacing the field names in the log data with the corresponding field names in the translation data; and replacing the special value corresponding to the field name in the log data with the special value corresponding to the translation data.
A second aspect of the present application provides a processor configured to perform the above-described processing method for internationalization logs.
A third aspect of the present application provides a machine-readable storage medium having instructions stored thereon that, when executed by a processor, cause the processor to be configured to perform the above-described processing method for internationalized logging.
According to the technical scheme, the translation task can be determined according to the target field in the log data and the target language of the checking request terminal, the log data is translated through the specific quota translation model, so that the translated log data is obtained, and the translated log data is displayed. When a user uses the log inquiry system to inquire log information, log data of own languages can be obtained, and the working efficiency of the user is improved. In addition, through the translation of the log data, the log query system can meet the requirements of more internationalized scenes.
Additional features and advantages of embodiments of the present application will be set forth in the detailed description that follows.
Drawings
The accompanying drawings are included to provide a further understanding of embodiments of the present application and are incorporated in and constitute a part of this specification, illustrate embodiments of the present application and together with the description serve to explain, without limitation, the embodiments of the present application. In the drawings:
FIG. 1 schematically illustrates a flow diagram of a processing method for internationalization logs according to an embodiment of the present application;
FIG. 2 schematically illustrates a node level diagram comprised by log data according to a first embodiment of the present application;
FIG. 3 schematically illustrates a node level diagram comprised by log data according to a second embodiment of the present application;
FIG. 4 schematically illustrates a node level diagram of log data inclusion according to a third embodiment of the present application;
fig. 5 schematically shows an internal structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the specific implementations described herein are only for illustrating and explaining the embodiments of the present application, and are not intended to limit the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
Fig. 1 schematically shows a flow diagram of a processing method for internationalization logs according to an embodiment of the present application. As shown in fig. 1, in an embodiment of the present application, there is provided a processing method for internationalization logs, including the steps of:
s102, acquiring a viewing request for log data, wherein the log data comprises a database table name, a plurality of field names and field values corresponding to each field name.
S104, determining a target language of the terminal sending the viewing request.
S106, determining a translation task according to a target field and a target language in a plurality of field names contained in the log data.
S108, calling a target translation model corresponding to the translation task to execute the translation task through the target translation model so as to translate the log data.
S110, replacing corresponding data in the log data with translation data corresponding to the target language to obtain translated log data.
S112, displaying the translated log data according to the viewing request.
Under the condition that a user obtains log data through a log system, only log languages corresponding to the log system can be obtained generally, and the identification requirements of different users cannot be met. Therefore, the translation task of the log data is determined according to the target field in the log data and the target language of the user terminal, and the obtained log data is translated into the target language so as to display the log data of the target language for the user.
First, the processor may obtain a view request for log data, where the log data may include a database table name, a plurality of field names, and a field value corresponding to each field. The processor may determine a target language of the terminal that sent the viewing request, and may be multiple languages according to the target language of the viewing terminal. And then, the processor can determine the log data to be translated according to a plurality of fields contained in the log data, determine the target language of translation according to the target language of the viewing request terminal, and further determine the translation task. The processor may invoke a target translation model corresponding to the translation task to perform the translation task through the target translation model to translate the log data. After the translation is completed, translated log data is obtained, and the processor can replace the data corresponding to the log data with the translated data corresponding to the target language to obtain the translated log data. The processor may present the translated log data in accordance with the view request.
In a specific embodiment, the processor first obtains a view request for log data, determines that the target language of the terminal sending the view request is french and chinese, and determines that the target field in the plurality of field names in the log is the log data to be translated. The processor calls a target translation model corresponding to French and Chinese, translates the target field into French log data and Chinese log data, and replaces the translated log data with the log data to be translated. And the processor displays the translated log data to the user through a display device of the log query system according to the viewing request.
By the method, the translation task can be determined according to the target field in the log data and the target language of the checking request terminal, the log data is translated through a specific quota translation model, so that the translated log data is obtained, and the translated log data is displayed. When a user uses the log inquiry system to inquire log information, log data of own languages can be obtained, and the working efficiency of the user is improved. In addition, through the translation of the log data, the log query system can meet the requirements of more internationalized scenes.
In one embodiment, the processing method further comprises: before acquiring a viewing request for log data, sending a log acquisition instruction to a log acquisition service according to a pre-configured log acquisition task, wherein the log acquisition instruction carries a configuration table identifier; under the condition that new log information exists in a message queue of the log acquisition service, acquiring a configuration table identifier carried in the log information and log data corresponding to the log information; determining a target configuration table corresponding to the configuration table identifier; and analyzing and processing the log data according to the target configuration table to obtain the processed log data. The processor may send a log collection instruction to the log collection service according to a pre-configured log collection task before obtaining a viewing request of log data, where the log collection instruction carries a configuration table identifier. The log collection service can collect specific log data according to the log collection instruction and store the specific log data in the message queue to generate log messages. The stored log data carries a configuration table identifier corresponding to the log data. When the processor monitors that the newly added log message exists in the message queue, the processor can acquire the configuration table identifier carried in the log message and log data corresponding to the log message. The processor can determine a target configuration table corresponding to the configuration table identifier in the log message, and then analyze and process the log data in the log message according to the target configuration table to obtain processed log data.
In one embodiment, the processing method further comprises: acquiring task information configured by a user through a task configuration interface; determining a log acquisition task according to the task information; and determining a configuration table and a configuration table identification corresponding to the task information in the plurality of configuration tables. The processor can also acquire task information configured by a user through a task configuration interface, the processor can determine a log acquisition task through the task information, and then the processor can determine a configuration table and a configuration table identifier corresponding to the task information in a plurality of configuration tables in a database.
In one embodiment, the processing method further comprises: the processor acquires task information configured by a user through a task configuration interface, and determines a log acquisition task according to the task information. The processor may determine a configuration table and a configuration table identification corresponding to the task information from a plurality of configuration tables in the database. The processor sends a log acquisition instruction to a log acquisition service according to a pre-configured log acquisition task, and the log acquisition service can acquire logs aiming at a database, wherein the log acquisition instruction carries a configuration table identifier. And under the condition that the processor monitors that a new log message exists in the message queue of the log acquisition service, acquiring a configuration table identifier carried in the log message and log data corresponding to the log message. The processor determines a target configuration table corresponding to the configuration table identifier, analyzes and processes the log data according to the target configuration table, and obtains the processed log data. The processor obtains a view request for log data, the log data including a database table name, a plurality of field names, and a field value corresponding to each field name, and determines a target language of a terminal that sent the view request. The processor may determine the translation task based on a target field and a target language of a plurality of field names contained in the log data. Further, the processor may invoke a target translation model corresponding to the translation task to perform the translation task through the target translation model to translate the log data. And finally, replacing the corresponding data in the log data with the translation data corresponding to the target language to obtain translated log data, and displaying the translated log data according to the viewing request.
By the method, when the user needs to acquire the information in the database, the user can acquire corresponding log data by configuring task information through the configuration task interface, and the log data which are not acquired aiming at other invalid log data are not acquired, so that the efficiency of reading the log data by the user is improved. According to the target voice translation, the language of the log information acquired by the user is the language which can be read by the user, so that the user experience is improved, and the internationalization requirement is met.
In one embodiment, the processing method further comprises: after determining a target language of the terminal sending the viewing request, matching the target language with a currently used language of the log data; in the case that the target language is inconsistent with the currently used language, determining a target translation model according to the target field and the target language in the plurality of field names contained in the log data. The processor can acquire the current use language and the target language of the log data, and under the condition that the current use language and the target language of the acquired log data are inconsistent, the user can cause difficulty in translation when reading the log data. Thus, the processor may determine a target translation model based on the target field and the target language of the plurality of field names contained in the log data to translate the log data.
In one embodiment, the destination field includes at least an application identification, a database identification, and a data table name.
In one embodiment, determining the translation task from the target field and the target language of the plurality of field names contained in the log data comprises: and generating a plurality of translation tasks according to the application identifier, the database identifier and the data table name, wherein the number of target languages corresponding to each translation task is one or more, and at least one of the application identifier, the database identifier and the data table name corresponding to each translation task is different. Under the condition that the application identifier, the database identifier and the data table name in the target field are different, the corresponding log data are also different, so that the processor can generate a plurality of translation tasks according to the application identifier, the database identifier and the data table name, and then the processor can select different translation models according to the translation tasks and the target language to translate the log data so as to generate the log data of the target language.
In one embodiment, the destination field includes an application identification, a database identification, and a data table name. The processor generates a plurality of translation tasks according to the application identifier, the database identifier and the data table name, and invokes a translation model according to the translation tasks and the target language to translate each translation task. For example, fig. 2 schematically illustrates a node hierarchy diagram included in log data according to the first embodiment of the present application, as shown in fig. 2, a target field multiple application identifier, appId, dataBase identifier, and data table name, where the data table name includes tableName1, tableName2, and tableName3, and the target languages are chinese, english, spanish, and japanese. Therefore, three translation tasks can be generated according to the application identifier appId, the dataBase identifier dataBase and the data table name tableName, and the processor calls a corresponding translation model to translate the log data corresponding to each translation task into Chinese, english, spanish and Japanese.
In one embodiment, the target field includes an application identifier, a database identifier, a data table name, and a field name, and the processor may generate a plurality of translation tasks according to the application identifier, the database identifier, the data table name, and the field name, where a target language corresponding to each translation task is one or more, and at least one of the application identifier, the database identifier, the data table name, and the field name corresponding to each translation task is different. For example, fig. 3 schematically illustrates a node hierarchy diagram included in log data according to a second embodiment of the present application, as shown in fig. 3, a target field multiple application identifier, appId, dataBase identifier, data table name, and field name, clonum, where the data table name includes table name3, the field names include clonum1 and clonum2, and the target languages are chinese, english, spanish, and japanese. Therefore, according to the application identifier appId, the dataBase identifier dataBase, the data table name tableName and the field name clonum, two translation tasks can be generated, and the processor calls a corresponding translation model to translate the log data corresponding to each translation task into Chinese, english, spanish and Japanese.
In one embodiment, the target field includes an application identifier, a database identifier, a data table name, a field name, and a special value corresponding to the field name, and the processor may generate a plurality of translation tasks according to the application identifier, the database identifier, the data table name, the field name, and the special value corresponding to the field name, where the target language corresponding to each translation task is one or more, and at least one of the application identifier, the database identifier, the data table name, the field name, and the special value corresponding to the field name corresponding to each translation task is different. For example, fig. 4 schematically illustrates a node hierarchy diagram included in log data according to a third embodiment of the present application, as shown in fig. 4, a target field multiple application identifier appId, a dataBase identifier dataBase, a data table name, a field name clonum, and a special value corresponding to the field name, where the data table name includes table name3, the field name includes clonum1, the special value corresponding to the field name clonum1 includes special class container 1 and special class container 2, and the target language is chinese, english, spanish, and japanese. Therefore, according to the application identifier appId, the dataBase identifier dataBase, the data table name tableName3, the field name clonum1 and the special value corresponding to the field name, two translation tasks can be generated, and the processor calls the corresponding translation model to translate the log data corresponding to each translation task into Chinese, english, spanish and Japanese.
In one embodiment, invoking the target translation model corresponding to the translation task to perform the translation task through the target translation model to translate the log data includes: determining a target language corresponding to each translation task, and calling a target translation model corresponding to the target language; and translating the plurality of field names, the data table names and the special values corresponding to the application identifiers, the database identifiers and the field names in the translation task into a target language through a target translation model.
In one embodiment, replacing corresponding data in the log data with translation data corresponding to the target language to obtain translated log data includes: replacing the table names in the log data with the corresponding table names in the translation data; replacing the field names in the log data with the corresponding field names in the translation data; and replacing the special value corresponding to the field name in the log data with the special value corresponding to the translation data. For example, the corresponding data in the log data includes: the processor replaces the special values corresponding to the data table names, the field names and the field names in the log data with the special values corresponding to the data table names, the field names and the field names in the French so as to display the special values to the user.
In a specific embodiment, the processing method further comprises: the processor acquires task information configured by a user through a task configuration interface, and determines a log acquisition task according to the task information. The processor may determine a configuration table and a configuration table identification corresponding to the task information from a plurality of configuration tables in the database. The processor sends a log acquisition instruction to a log acquisition service according to a pre-configured log acquisition task, and the log acquisition service can acquire logs aiming at a database, wherein the log acquisition instruction carries a configuration table identifier. And under the condition that the processor monitors that a new log message exists in the message queue of the log acquisition service, acquiring a configuration table identifier carried in the log message and log data corresponding to the log message. The processor determines a target configuration table corresponding to the configuration table identifier, analyzes and processes the log data according to the target configuration table, and obtains the processed log data. The processor obtains a view request for log data, the log data including a database table name, a plurality of field names, and a field value corresponding to each field name. The processor determines a target language for the terminal that sent the view request, wherein the target speech may include a plurality of. The processor generates a plurality of translation tasks according to the application identifier, the database identifier and the data table name, wherein the target language corresponding to each translation task is one or more, and at least one of the application identifier, the database identifier and the data table name corresponding to each translation task is different. And, the target field includes at least an application identification, a database identification, and a data table name. Then, the processor determines a target language corresponding to the translation task according to each translation task, and invokes a target translation model corresponding to the target language; and translating the plurality of field names, the data table names and the special values corresponding to the application identifiers, the database identifiers and the field names in the translation task into a target language through a target translation model. Further, the processor replaces the table names in the log data with the corresponding table names in the translation data; replacing the field names in the log data with the corresponding field names in the translation data; and replacing the special value corresponding to the field name in the log data with the special value corresponding to the translation data. Finally, the processor may present the translated log data in accordance with the view request.
By the method, the translation task can be determined according to the target field in the log data and the target language of the checking request terminal, the log data is translated through the specific quota translation model, so that the translated log data is obtained, and the translated log data is displayed to a user. When a user uses the log inquiry system to inquire log information, log data of own languages can be obtained, and the working efficiency of the user is improved. In addition, through the translation of the log data, the log query system can meet the requirements of more internationalized scenes. When the user needs to acquire the information in the database, the user can acquire corresponding log data by configuring task information through a configuration task interface, and the user does not acquire other invalid log data, so that the efficiency of reading the log data by the user is improved.
FIG. 1 is a flow diagram of a method for internationalization log processing in one embodiment. It should be understood that, although the steps in the flowchart of fig. 1 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of other steps or sub-steps of other steps.
The embodiment of the application provides a storage medium, on which a program is stored, which when executed by a processor, implements the above-described processing method for internationalization logs.
The embodiment of the application provides a processor, which is used for running a program, wherein the processing method for internationalization logs is executed when the program runs.
In one embodiment, a processing system for internationalization logs is provided, comprising a processor as described above.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one, and the processing method for internationalization logs is realized by adjusting kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 5. The computer apparatus includes a processor a01, a network interface a02, a display screen a04, an input device a05, and a memory (not shown in the figure) which are connected through a system bus. Wherein the processor a01 of the computer device is adapted to provide computing and control capabilities. The memory of the computer device includes an internal memory a03 and a nonvolatile storage medium a06. The nonvolatile storage medium a06 stores an operating system B01 and a computer program B02. The internal memory a03 provides an environment for the operation of the operating system B01 and the computer program B02 in the nonvolatile storage medium a06. The network interface a02 of the computer device is used for communication with an external terminal through a network connection. The computer program, when executed by the processor a01, implements a processing method for internationalization logs. The display screen a04 of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device a05 of the computer device may be a touch layer covered on the display screen, or may be a key, a track ball or a touch pad arranged on a casing of the computer device, or may be an external keyboard, a touch pad or a mouse.
It will be appreciated by those skilled in the art that the structure shown in fig. 5 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
The embodiment of the application provides equipment, which comprises a processor, a memory and a program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the following steps: acquiring a viewing request for log data, wherein the log data comprises a database table name, a plurality of field names and field values corresponding to each field name; determining a target language of a terminal sending a viewing request; determining a translation task according to a target field and a target language in a plurality of field names contained in the log data; invoking a target translation model corresponding to the translation task to execute the translation task through the target translation model so as to translate the log data; replacing corresponding data in the log data with translation data corresponding to the target language to obtain translated log data; and displaying the translated log data according to the viewing request.
In one embodiment, the processing method further comprises: before acquiring a viewing request for log data, sending a log acquisition instruction to a log acquisition service according to a pre-configured log acquisition task, wherein the log acquisition instruction carries a configuration table identifier; under the condition that new log information exists in a message queue of the log acquisition service, acquiring a configuration table identifier carried in the log information and log data corresponding to the log information; determining a target configuration table corresponding to the configuration table identifier; and analyzing and processing the log data according to the target configuration table to obtain the processed log data.
In one embodiment, the processing method further comprises: acquiring task information configured by a user through a task configuration interface; determining a log acquisition task according to the task information; and determining a configuration table and a configuration table identification corresponding to the task information in the plurality of configuration tables.
In one embodiment, the processing method further comprises: after determining a target language of the terminal sending the viewing request, matching the target language with a currently used language of the log data; in the case that the target language is inconsistent with the currently used language, determining a target translation model according to the target field and the target language in the plurality of field names contained in the log data.
In one embodiment, the destination field includes at least an application identification, a database identification, and a data table name.
In one embodiment, determining the translation task from the target field and the target language of the plurality of field names contained in the log data comprises: and generating a plurality of translation tasks according to the application identifier, the database identifier and the data table name, wherein the number of target languages corresponding to each translation task is one or more, and at least one of the application identifier, the database identifier and the data table name corresponding to each translation task is different.
In one embodiment, invoking the target translation model corresponding to the translation task to perform the translation task through the target translation model to translate the log data includes: determining a target language corresponding to each translation task, and calling a target translation model corresponding to the target language; and translating the plurality of field names, the data table names and the special values corresponding to the application identifiers, the database identifiers and the field names in the translation task into a target language through a target translation model.
In one embodiment, replacing corresponding data in the log data with translation data corresponding to the target language to obtain translated log data includes: replacing the table names in the log data with the corresponding table names in the translation data; replacing the field names in the log data with the corresponding field names in the translation data; and replacing the special value corresponding to the field name in the log data with the special value corresponding to the translation data.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. A processing method for internationalization logs, characterized by being applied to a log query system, the processing method comprising:
acquiring a viewing request for log data, wherein the log data comprises a database table name, a plurality of field names and field values corresponding to each field name;
determining a target language of a terminal sending the viewing request;
determining a translation task according to a target field in a plurality of field names contained in the log data and the target language;
invoking a target translation model corresponding to the translation task to execute the translation task through the target translation model so as to translate the log data;
replacing corresponding data in the log data with translation data corresponding to the target language to obtain translated log data;
and displaying the translated log data according to the viewing request.
2. The processing method for internationalization logs according to claim 1, further comprising:
before acquiring a viewing request for log data, sending a log acquisition instruction to a log acquisition service according to a pre-configured log acquisition task, wherein the log acquisition instruction carries a configuration table identifier;
under the condition that new log information exists in the information queue of the log acquisition service, acquiring a configuration table identifier carried in the log information and log data corresponding to the log information;
determining a target configuration table corresponding to the configuration table identifier;
and analyzing and processing the log data according to the target configuration table to obtain the processed log data.
3. The processing method for internationalization logs according to claim 2, further comprising:
acquiring task information configured by a user through a task configuration interface;
determining the log acquisition task according to the task information;
and determining a configuration table and a configuration table identification corresponding to the task information in the plurality of configuration tables.
4. The processing method for internationalization logs according to claim 1, further comprising:
after the target language of the terminal sending the viewing request is determined, matching the target language with the current use language of the log data;
and under the condition that the target language is inconsistent with the current used language, determining a target translation model according to a target field in a plurality of field names contained in the log data and the target language.
5. The method of claim 1, wherein the destination field includes at least an application identifier, a database identifier, and a data table name.
6. The processing method for internationalization journal according to claim 5, wherein determining a translation task from a target field among a plurality of field names included in the journal data and the target language comprises:
generating a plurality of translation tasks according to the application identifier, the database identifier and the data table name, wherein the number of target languages corresponding to each translation task is one or more, and at least one of the application identifier, the database identifier and the data table name corresponding to each translation task is different.
7. The method of processing an internationalized log of claim 6, wherein invoking a target translation model corresponding to the translation task to perform the translation task through the target translation model to translate the log data comprises:
determining a target language corresponding to each translation task, and calling a target translation model corresponding to the target language;
and translating a plurality of field names, the data table names and special values corresponding to application identifiers, database identifiers and field names in the translation task into the target language through the target translation model.
8. The processing method for internationalization journal according to claim 7, wherein replacing the translation data corresponding to the target language with the corresponding data in the journal data to obtain the translated journal data comprises:
replacing the table names in the log data with the corresponding table names in the translation data;
replacing the field names in the log data with the corresponding field names in the translation data;
and replacing the special value corresponding to the field name in the log data with the special value corresponding to the translation data.
9. A processor configured to perform the processing method for internationalization logs according to any of claims 1 to 8.
10. A machine-readable storage medium having instructions stored thereon, which when executed by a processor cause the processor to be configured to perform the processing method for internationalization logs according to any of claims 1 to 8.
CN202211564309.4A 2022-12-07 2022-12-07 Processing method, processor and storage medium for internationalization log Pending CN116049114A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211564309.4A CN116049114A (en) 2022-12-07 2022-12-07 Processing method, processor and storage medium for internationalization log

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211564309.4A CN116049114A (en) 2022-12-07 2022-12-07 Processing method, processor and storage medium for internationalization log

Publications (1)

Publication Number Publication Date
CN116049114A true CN116049114A (en) 2023-05-02

Family

ID=86128484

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211564309.4A Pending CN116049114A (en) 2022-12-07 2022-12-07 Processing method, processor and storage medium for internationalization log

Country Status (1)

Country Link
CN (1) CN116049114A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116974877A (en) * 2023-09-25 2023-10-31 湖南三湘银行股份有限公司 Log collection method under cross-language scene

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116974877A (en) * 2023-09-25 2023-10-31 湖南三湘银行股份有限公司 Log collection method under cross-language scene
CN116974877B (en) * 2023-09-25 2024-01-30 湖南三湘银行股份有限公司 Log collection method under cross-language scene

Similar Documents

Publication Publication Date Title
CN111767143A (en) Transaction data processing method, device, equipment and system
CN107103011B (en) Method and device for realizing terminal data search
KR100845234B1 (en) Apparatus and method for parsing domain profile in software communication architecture
CN111786984B (en) Pod communication connection method and device, electronic equipment and storage medium
US20180307692A1 (en) Software application interface for mediating access to services of a centralized data store
CN109062906B (en) Translation method and device for program language resources
CN109814863A (en) A kind of processing method, device, computer equipment and computer storage medium for requesting returned data
CN111026931A (en) Data query method, device, equipment and medium
CN111818175A (en) Enterprise service bus configuration file generation method, device, equipment and storage medium
CN116049114A (en) Processing method, processor and storage medium for internationalization log
CN112579118A (en) Method, device, system, medium and equipment for updating configuration information of microservice
CN113485909B (en) Test method, test device, computing equipment and medium
CN112491943A (en) Data request method, device, storage medium and electronic equipment
JP2005228183A (en) Program execution method and computer system for executing the program
CN109068286B (en) Information analysis method, medium and equipment
CN110162412B (en) Method and device for performing data operation on client
CN111488286B (en) Method and device for independently developing Android modules
CN114365467B (en) Methods, apparatuses, and computer readable media for determining 3GPP FLUS reception capability
US10628416B2 (en) Enhanced database query processing
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
CN110968580B (en) Method and device for creating data storage structure
CN112465653A (en) Insurance business processing method, device, equipment and storage medium
CN112068953A (en) Cloud resource fine management traceability system and method
US8910183B2 (en) Access to context information in a heterogeneous application environment
CN113051202A (en) Interface adaptation method, device, electronic equipment and computer readable storage medium

Legal Events

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