Message detail field translation method and device, computer equipment and storage medium
By pre-configuring and annotating the enumeration configuration table of the message detail list, using memory for enumeration translation, it solves the performance problems caused by hard coding and high-frequency queries, and achieves efficient translation of message detail fields.
Patent Information
- Application Number
- CN202410747379.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-09-27
AI Technical Summary
There are hard-coding problems in the enumeration and translation of detailed fields in report messages in the existing technology, resulting in inflexible maintenance and poor scalability. In addition, high-frequency queries lead to an increase in database performance load, and there are risks of query timeout and memory overflow.
By pre-configuring the enumeration configuration table of the message detail list, annotating the target fields, and using the enumeration configuration table in memory for matching and updating, the number of database queries is reduced and translation performance is improved.
It achieves comprehensive, efficient and accurate translation of detailed fields in the message, reduces maintenance costs and database load, and improves enumeration translation performance.
Smart Images

Figure CN118709702A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to a method, device, computer equipment and non-volatile computer-readable storage medium for translating message detail fields. Background Art
[0002] At present, with the development of computer technology, more and more technologies are applied in the financial field. The traditional financial industry is gradually transforming to financial technology (Fintech), and field translation technology is no exception. However, due to the security and real-time requirements of the financial industry, higher requirements are also placed on field translation technology.
[0003] At present, in the regulatory reporting work of financial institutions, in order to meet the daily data analysis and data verification work, there is a large demand for Excel export of report details in the regulatory reporting business system. The field types of report details are usually divided into the following categories, namely, numerical type, plain text type, Boolean type, and enumeration type; currently, in order to more clearly explain the data content of report details, and also because the content of the fields of numerical type, plain text type, and Boolean type is clear enough, usually only the enumeration type in the report detail field type is translated.
[0004] However, in the prior art, the current implementation method of enumerating and translating message details fields has the following defects and deficiencies:
[0005] 1) Hard-coded field translation is generally considered to be a processing method that is easy to maintain but inflexible and has poor scalability. With the iteration of functions, hard-coded translation logic has code redundancy problems, so this implementation method should be avoided as much as possible;
[0006] 2) The number of enumeration fields in a single message detail is generally more than ten. In some special messages, the number of enumeration fields in the message details is as high as hundreds. This results in the conditional query of the ENUN_TYPE field in the database enumeration query SQL being very redundant each time the message details are exported. For example, if there are 10 fields that need to be enumerated and translated in the current message details, 10 values need to be written in the SQL IN condition. If there are 100 fields that need to be enumerated and translated, 100 values need to be written in the SQL IN condition. The workload is huge, the SQL statement is lengthy, it is difficult to understand, and the subsequent maintenance cost is high.
[0007] 3) For frequently used messages, the CPU resources and memory resources of the database are very scarce. Each time the Excel export of message details is performed, the corresponding enumeration configuration needs to be queried in the database. When there are many fields in the message details that need to be enumerated and translated or many configuration items of the same enumeration type, high-frequency queries will undoubtedly increase the performance load of the database server, and there are risks such as database query timeout, slow SQL alarm or memory overflow.
[0008] In summary, how to provide a message detail field translation method, apparatus, computer device and non-volatile computer-readable storage medium that can achieve comprehensive, efficient and accurate translation of the target fields that need to be enumerated and translated in the message detail list is a problem that needs to be urgently solved by technical personnel in this field. Summary of the invention
[0009] In view of the above-mentioned deficiencies in the prior art, the object of the present invention is to provide a message detail field translation method, apparatus, computer equipment and non-volatile computer-readable storage medium that can be used in financial technology or other related fields, which can achieve comprehensive, efficient and accurate translation of target fields that need to be enumerated and translated in a message detail list.
[0010] In order to achieve the above object, the present invention adopts the following technical solutions:
[0011] A method for translating message detail fields, comprising:
[0012] An enumeration configuration table for pre-configuring a message detail list; wherein the message detail list is composed of a plurality of entity objects, and each of the entity objects is composed of a plurality of fields;
[0013] Annotate the target fields that need to be enumerated and translated in the corresponding entity object;
[0014] Obtain all the annotated target fields and their corresponding field values in the entity object;
[0015] According to the enumeration configuration table, the corresponding enumeration meaning is matched for each annotated target field in turn and its field value is updated.
[0016] In a further technical solution, the message detail field translation method, wherein the enumeration configuration table of the pre-configured message detail list includes:
[0017] Pre-configure the enumeration configuration table of the message detail list and save it.
[0018] In a further technical solution, the method for translating message detail fields, wherein the step of annotating the target fields that need to be enumerated and translated in the corresponding entity object, comprises:
[0019] Annotate the target field that needs enumeration translation in the corresponding entity object and define the corresponding enumeration type identifier for it.
[0020] In a further technical solution, the method for translating message detail fields, wherein the step of obtaining all the annotated target fields and their corresponding field values in the corresponding entity object, includes:
[0021] Obtain all the target fields corresponding to the entity object that define corresponding enumeration type identifiers and their corresponding field values.
[0022] In a further technical solution, the method for translating message detail fields, wherein, according to the enumeration configuration table, sequentially matching the corresponding enumeration meaning for each annotated target field and updating its field value, comprises:
[0023] According to the pre-configured enumeration configuration table, the target fields for which corresponding enumeration type identifiers are defined are matched with corresponding enumeration meanings in turn and their field values are updated.
[0024] In a further technical solution, the method for translating message detail fields, wherein, after matching the corresponding enumeration meaning for each annotated target field in turn and updating its field value according to the enumeration configuration table, further comprises:
[0025] Poll each of the entity objects until the target field that needs to be enumerated and translated does not exist in each of the entity objects in the message detail list.
[0026] A message detail field translation device, comprising:
[0027] A configuration module, used to pre-configure an enumeration configuration table of a message detail list; wherein the message detail list is composed of a plurality of entity objects, and each of the entity objects is composed of a plurality of fields;
[0028] An annotation module, used for annotating the target fields that need to be enumerated and translated in the corresponding entity object;
[0029] An acquisition module, used for acquiring all the annotated target fields and their corresponding field values in the corresponding entity object;
[0030] The matching and updating module is used to match the corresponding enumeration meaning for each annotated target field in turn and update its field value according to the enumeration configuration table.
[0031] In a further technical solution, the message detail field translation device further includes:
[0032] The polling module is used to poll each of the entity objects until the target field that needs to be enumerated and translated does not exist in each of the entity objects in the message detail list.
[0033] A computer device, wherein the computer device comprises at least one processor; and
[0034] a memory communicatively connected to the at least one processor; wherein,
[0035] The memory stores a computer program executable by the at least one processor. When the computer program is executed by the at least one processor, the method for translating message detail fields as described in any one of the above items can be implemented.
[0036] A non-volatile computer-readable storage medium stores a computer program, wherein the computer program, when executed by at least one processor, can implement any of the above-mentioned message detail field translation methods.
[0037] Compared with the prior art, the present invention provides a method, device, computer equipment and non-volatile computer-readable storage medium for translating message detail fields, wherein the method includes: pre-configuring an enumeration configuration table of a message detail list; wherein the message detail list is composed of a plurality of entity objects, each of which is composed of a plurality of fields; annotating the target fields that need to be enumerated and translated in the corresponding entity objects; obtaining all the annotated target fields and their corresponding field values in the corresponding entity objects; and matching the corresponding enumeration meanings for each annotated target field and updating its field value in turn according to the enumeration configuration table. In this way, the method of the present invention can achieve comprehensive, efficient and accurate translation of the target fields that need to be enumerated and translated in the message detail list. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A flowchart of a method for translating message detail fields provided by an embodiment of the present invention.
[0040] Figure 2 Another flowchart of a method for translating message detail fields provided by an embodiment of the present invention is provided.
[0041] Figure 3 A schematic diagram of functional modules of a message detail field translation device provided by an embodiment of the present invention.
[0042] Figure 4 A schematic diagram of another functional module of a message detail field translation device provided by an embodiment of the present invention.
[0043] Figure 5 A schematic diagram of the hardware structure of a computer device provided in an embodiment of the present invention.
[0044] Figure 6 A schematic diagram of the enumeration configuration table provided in an embodiment of the present invention.
[0045] Figure 7 for Figure 1 A schematic framework diagram of the general process corresponding to the method embodiment is provided. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0047] In the description of the present invention, the terms "include", "including", "have", "contain", etc. are all open terms, which mean including but not limited to. The descriptions with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", etc. mean that the specific features, structures or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. The order of steps involved in each embodiment is used to schematically illustrate the implementation of the present application, and the order of steps therein is not limited and can be appropriately adjusted as needed.
[0048] Various non-limiting embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.
[0049] At present, in the regulatory reporting work of financial institutions, in order to meet the daily data analysis and data verification work, there is a large demand for Excel export of report details in the regulatory reporting business system. The field types of report details are usually divided into the following categories, namely, numerical type, plain text type, Boolean type, and enumeration type; currently, in order to more clearly explain the data content of report details, and also because the content of the fields of numerical type, plain text type, and Boolean type is clear enough, usually only the enumeration type in the report detail field type is translated.
[0050] However, in the prior art, the current implementation method of enumerating and translating message details fields has the following defects and deficiencies:
[0051] 1) Hard-coded field translation is generally considered to be a processing method that is easy to maintain but inflexible and has poor scalability. With the iteration of functions, hard-coded translation logic has code redundancy problems, so this implementation method should be avoided as much as possible;
[0052] 2) The number of enumeration fields in a single message detail is generally more than ten. In some special messages, the number of enumeration fields in the message details is as high as hundreds. This results in the conditional query of the ENUN_TYPE field in the database enumeration query SQL being very redundant each time the message details are exported. For example, if there are 10 fields that need to be enumerated and translated in the current message details, 10 values need to be written in the SQL IN condition. If there are 100 fields that need to be enumerated and translated, 100 values need to be written in the SQL IN condition. The workload is huge, the SQL statement is lengthy, it is difficult to understand, and the subsequent maintenance cost is high.
[0053] 3) For frequently used messages, the CPU resources and memory resources of the database are very scarce. Each time the Excel export of message details is performed, the corresponding enumeration configuration needs to be queried in the database. When there are many fields in the message details that need to be enumerated and translated or many configuration items of the same enumeration type, high-frequency queries will undoubtedly increase the performance load of the database server, and there are risks such as database query timeout, slow SQL alarm or memory overflow.
[0054] In summary, how to provide a message detail field translation method, apparatus, computer device and non-volatile computer-readable storage medium that can achieve comprehensive, efficient and accurate translation of the target fields that need to be enumerated and translated in the message detail list is a problem that needs to be urgently solved by technical personnel in this field.
[0055] To solve the above problems, see Figure 1 The embodiment of the present invention provides a method for translating message detail fields, wherein the method comprises the steps of:
[0056] S100, pre-configuring an enumeration configuration table of a message detail list; wherein the message detail list is composed of a plurality of entity objects, and each of the entity objects is composed of a plurality of fields;
[0057] S200, annotating the target fields that need to be enumerated and translated in the corresponding entity object;
[0058] S300, obtaining all the annotated target fields and their corresponding field values in the entity object;
[0059] S400: According to the enumeration configuration table, the corresponding enumeration meaning is matched for each annotated target field in turn and its field value is updated.
[0060] Furthermore, in the method for translating message detail fields, the enumeration configuration table for pre-configuring the message detail list includes:
[0061] Pre-configure the enumeration configuration table of the message detail list and save it.
[0062] In specific implementation, in this embodiment, before enumerating and translating the message detail fields, it is necessary to pre-configure an enumeration configuration table of the message detail list, such as Figure 6 As shown, the enumeration configuration table is stored in the memory; wherein the message detail list is composed of a plurality of entity objects, and each of the entity objects is composed of a plurality of fields.
[0063] Furthermore, in the message detail field translation method, the step of annotating the target field that needs to be enumerated and translated in the corresponding entity object includes:
[0064] Annotate the target field that needs enumeration translation in the corresponding entity object and define the corresponding enumeration type identifier for it.
[0065] In the specific implementation, in this embodiment, after the enumeration configuration table of the message detail list is pre-configured and saved, the target fields (field A, field B, field C) that need to be enumerated and translated in the corresponding entity object are annotated to define the corresponding enumeration type identifier, such as Figure 7 As shown, there are enumeration fields A, B, and C in the entity object that need to be translated. Through annotation, the enumeration type identifier of field A is a, the enumeration type identifier of field B is b, and the enumeration type identifier of field C is c.
[0066] Furthermore, in the message detail field translation method, the step of obtaining all the annotated target fields and their corresponding field values in the corresponding entity object includes:
[0067] Obtain all the target fields corresponding to the entity object that define corresponding enumeration type identifiers and their corresponding field values.
[0068] In the specific implementation, in this embodiment, after annotating the target field that needs enumeration translation in the corresponding entity object and defining the corresponding enumeration type identifier for it, all the target fields in the corresponding entity object that have defined the corresponding enumeration type identifier and their corresponding field values are obtained.
[0069] Furthermore, the method for translating message detail fields, wherein, according to the enumeration configuration table, sequentially matching the corresponding enumeration meaning for each annotated target field and updating its field value, comprises:
[0070] According to the pre-configured enumeration configuration table, the target fields for which corresponding enumeration type identifiers are defined are matched with corresponding enumeration meanings in turn and their field values are updated.
[0071] In the specific implementation, in this embodiment, after obtaining the target fields and their corresponding field values corresponding to all the target fields in the entity object that define the corresponding enumeration type identifier, according to the pre-configured enumeration configuration table in the memory, the corresponding enumeration meaning is matched for each target field that defines the corresponding enumeration type identifier in turn, and its field value is updated to the corresponding enumeration meaning, such as Figure 7 As shown, the enumeration type of field A in the entity object is a, and the field value is a1. By matching the enumeration configuration table, the corresponding enumeration meaning can be obtained as "a1 meaning". Finally, the field value of field A is updated to "a1 meaning", and the same applies to fields B and C.
[0072] For further information, see Figure 2 , the method for translating message details fields, wherein, after the step S400, according to the enumeration configuration table, sequentially matching the corresponding enumeration meaning for each annotated target field and updating its field value, further comprises the steps of:
[0073] S500: poll each of the entity objects until the target field that needs to be enumerated and translated does not exist in each of the entity objects in the message detail list.
[0074] In the specific implementation, in this embodiment, after matching the corresponding enumeration meaning for each annotated target field in the corresponding entity object and updating its field value in turn according to the enumeration configuration table, each other entity object is polled in turn until there is no target field that needs to be enumerated and translated in each entity object in the message detail list.
[0075] It can be seen from the above method embodiments that the message detail field translation method provided by the present invention includes: pre-configuring an enumeration configuration table of a message detail list and saving it, wherein the message detail list is composed of a number of entity objects, and each of the entity objects is composed of a number of fields; annotating the target field that needs to be enumerated and translated in the corresponding entity object, and defining a corresponding enumeration type identifier for it; obtaining all the target fields and their corresponding field values that define the corresponding enumeration type identifier in the corresponding entity object; according to the pre-configured enumeration configuration table, matching the corresponding enumeration meaning and updating its field value for each target field that defines the corresponding enumeration type identifier in turn; polling each of the entity objects until the target field that needs to be enumerated and translated does not exist in each of the entity objects in the message detail list. In this way, the method of the present invention can achieve comprehensive, efficient and accurate translation for the target fields that need to be enumerated and translated in the message detail list.
[0076] At the same time, the message detail field translation method of the present invention has the following advantages:
[0077] 1) It solves the pain points of inflexible implementation of hard-coded field translation and redundant code;
[0078] 2) Compared with the high-frequency and inefficient enumeration configuration in the query database in the current situation, the present invention marks the corresponding enumeration type identifier for all fields of the entity object that need to be enumerated in the form of annotations, takes advantage of the high-speed reading and writing of the memory, combines the enumeration configuration table stored in the memory, matches the corresponding field enumeration meaning, greatly improves the enumeration translation performance of the message detail field, and greatly reduces the workload of writing the query enumeration configuration SQL, and also reduces the cost of later maintenance;
[0079] 3) The enumeration configuration table is stored in memory, so that all subsequent message detail field enumeration translations are matched from the enumeration configuration table in the current memory according to the corresponding field enumeration type identifier and field value, without the need to query the enumeration configuration table in the database for matching, reducing the number and frequency of enumeration configuration queries in the database and reducing the resource load of the database.
[0080] It should be understood that, although the present application provides method operation steps as described in the embodiments or flowcharts, more or less operation steps may be included based on conventional or non-creative labor, and these operation steps are not necessarily performed in sequence according to the embodiment or flowchart. The order of steps listed in the embodiment or flowchart is only one way of executing the order of many steps, and does not represent the only execution order. It should be noted that there is not necessarily a certain order between the above steps. A person of ordinary skill in the art can understand from the description of the embodiment of the present invention that in different embodiments, the above steps may have different execution orders, that is, they may be executed in parallel, or they may be executed in exchange, etc. Moreover, at least a part of the steps in the embodiment or flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but may be executed in turn, alternately or synchronously with other steps or at least a part of the sub-steps or stages of other steps.
[0081] Based on the above examples, please refer to Figure 3 Another embodiment of the present invention further provides a message detail field translation device, wherein the device comprises:
[0082] Configuration module 11, used for pre-configuring an enumeration configuration table of a message detail list; wherein the message detail list is composed of a plurality of entity objects, and each of the entity objects is composed of a plurality of fields;
[0083] An annotation module 12, used for annotating the target fields that need to be enumerated and translated in the corresponding entity object;
[0084] The acquisition module 13 is used to acquire all the annotated target fields and their corresponding field values in the corresponding entity object;
[0085] The matching and updating module 14 is used to match the corresponding enumeration meaning for each annotated target field in turn and update its field value according to the enumeration configuration table.
[0086] For further information, see Figure 4 , the message detail field translation device, wherein the device further comprises:
[0087] The polling module 15 is used to poll each of the entity objects until the target field that needs to be enumerated and translated does not exist in each of the entity objects in the message detail list.
[0088] The specific implementation method is shown in the above method embodiment, which will not be described again here.
[0089] Based on the above examples, please refer to Figure 5 Another embodiment of the present invention further provides a computer device, wherein the computer device 10 includes:
[0090] memory 120 and one or more processors 110, Figure 5 A processor 110 is used as an example for description. The processor 110 and the memory 120 may be connected via a communication bus or other means. Figure 5 The example of connecting via a communication bus is taken as an example.
[0091] The processor 110 is used to complete various control logics of the computer device 10. It can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of these components. In addition, the processor 110 can also be any traditional processor, microprocessor or state machine. The processor 110 can also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP core, or any other such configuration.
[0092] The memory 120 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as the computer program corresponding to the message detail field translation method in the embodiment of the present invention. The processor 110 executes various functional applications and data processing of the computer device 10 by running the non-volatile software programs, instructions and units stored in the memory 120, that is, implements the message detail field translation method in the above method embodiment.
[0093] The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store an application required for operating the device or at least one function; the data storage area may store data created according to the use of the computer device 10, etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 120 may optionally include a memory remotely arranged relative to the processor 110, and these remote memories may be connected to the computer device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0094] One or more units are stored in the memory 120, and when executed by one or more processors 110, the method for translating message details fields in any of the above method embodiments can be implemented, for example, the method described above can be implemented. Figure 1 The method comprises steps S100 to S400.
[0095] Those skilled in the art will understand that Figure 5 The hardware structure diagram shown in the figure is only a schematic diagram of a partial structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0096] Based on the above embodiments, the present invention further provides a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by at least one processor, the method for translating message details fields in any of the above method embodiments can be implemented, for example, the method described above can be implemented. Figure 1 The method comprises steps S100 to S400.
[0097] As an example, non-volatile storage media can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) as external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms such as synchronous RAM (SRAM), dynamic RAM, (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The disclosed memory components or memories of the operating environment described herein are intended to include one or more of these and / or any other suitable types of memory.
[0098] Another embodiment of the present invention provides a computer program product, the computer program product includes a computer program stored on a non-volatile computer-readable storage medium, the computer program includes program instructions, when the program instructions are executed by a processor, the message detail field translation method in any of the above method embodiments can be implemented, for example, the above described method can be implemented Figure 1 The method comprises steps S100 to S400.
[0099] The embodiments described above are merely illustrative, in which the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0100] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can exist in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0101] Conditional language such as "can," "can," "might," or "may," unless specifically stated otherwise or otherwise understood within the context as used, is generally intended to convey, among other things, that a particular embodiment can include (while other embodiments do not) a particular feature, element, and / or operation. Thus, such conditional language is also generally intended to imply that a feature, element, and / or operation is required for one or more embodiments anyway or that one or more embodiments must include logic for determining, with or without input or prompting, whether such features, elements, and / or operations are included or will be performed in any particular embodiment.
[0102] The content described in this specification and the accompanying drawings herein includes an example that a method, device, computer equipment and non-volatile computer-readable storage medium for translating message details fields can be provided. Of course, it is not possible to describe every conceivable combination of elements and / or methods for the purpose of describing the various features of the present disclosure, but it can be recognized that many other combinations and permutations of the disclosed features are possible. Therefore, it is obvious that various modifications can be made to the present disclosure without departing from the scope or spirit of the present disclosure, but all these various modifications should belong to the protection scope of the claims attached to the present invention. In addition, or in an alternative, other embodiments of the present disclosure may be obvious from consideration of the present specification and the accompanying drawings and the practice of the present disclosure as presented herein. It is intended that the examples proposed in the present specification and the accompanying drawings are considered to be illustrative and non-restrictive in all respects. Although specific terms are adopted in this article, they are used in a general and descriptive sense and are not used for the purpose of limitation.
Claims
1. A method for translating message detail fields, characterized in that: include: An enumeration configuration table for pre-configuring a message detail list; wherein the message detail list is composed of a plurality of entity objects, and each of the entity objects is composed of a plurality of fields; Annotate the target fields that need to be enumerated and translated in the corresponding entity object; Obtain all the annotated target fields and their corresponding field values in the entity object; According to the enumeration configuration table, the corresponding enumeration meaning is matched for each annotated target field in turn and its field value is updated.
2. The method for translating message details according to claim 1, characterized in that: The enumeration configuration table of the pre-configured message detail list includes: Pre-configure the enumeration configuration table of the message detail list and save it.
3. The method for translating message details according to claim 2, characterized in that: The annotating the target field that needs to be enumerated and translated in the corresponding entity object includes: Annotate the target field that needs enumeration translation in the corresponding entity object and define the corresponding enumeration type identifier for it.
4. The method for translating message details according to claim 3, characterized in that: The acquiring of all the annotated target fields and their corresponding field values in the corresponding entity object includes: Obtain all the target fields corresponding to the entity object that define corresponding enumeration type identifiers and their corresponding field values.
5. The method for translating message details according to claim 4, characterized in that: According to the enumeration configuration table, matching the corresponding enumeration meaning for each annotated target field in turn and updating its field value includes: According to the pre-configured enumeration configuration table, the target fields for which corresponding enumeration type identifiers are defined are matched with corresponding enumeration meanings in turn and their field values are updated.
6. The method for translating message detail fields according to any one of claims 1 to 5, characterized in that: After matching the corresponding enumeration meaning for each annotated target field in turn and updating its field value according to the enumeration configuration table, the method further includes: Poll each of the entity objects until the target field that needs to be enumerated and translated does not exist in each of the entity objects in the message detail list.
7. A message detail field translation device, characterized in that: include: A configuration module, used to pre-configure an enumeration configuration table of a message detail list; wherein the message detail list is composed of a plurality of entity objects, and each of the entity objects is composed of a plurality of fields; An annotation module, used for annotating the target fields that need to be enumerated and translated in the corresponding entity object; An acquisition module, used for acquiring all the annotated target fields and their corresponding field values in the corresponding entity object; The matching and updating module is used to match the corresponding enumeration meaning for each annotated target field in turn and update its field value according to the enumeration configuration table.
8. The message detail field translation device according to claim 7, characterized in that: Also includes: The polling module is used to poll each of the entity objects until the target field that needs to be enumerated and translated does not exist in each of the entity objects in the message detail list.
9. A computer device, characterized in that: The computer device comprises at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor. When the computer program is executed by the at least one processor, the method for translating message detail fields according to any one of claims 1 to 6 can be implemented.
10. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by at least one processor, the method for translating message detail fields according to any one of claims 1 to 6 can be implemented.
