Data processing method and device and electronic equipment

By using reference pointers to proxy classes and language version index paths in a multi-language environment, the problem of inefficient data loading is solved, and efficient data loading and switching is achieved.

CN119621145AActive Publication Date: 2025-03-14NETEASE (HANGZHOU) NETWORK CO LTD

Patent Information

Application Number
CN202411471589.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-03-14
Estimated Expiration
2044-10-21

AI Technical Summary

Technical Problem

In multi-language environments, it is difficult for the prior art to realize instant hot loading and unloading large amounts of data without affecting performance and user experience, resulting in inefficient data loading.

Method used

In the data processing method, the proxy class is used to construct abstract data levels, read local language parameters, establish a reference pointer to the language version index path, and load the data content of the required language version from the pre-generated target single data file.

Benefits of technology

It realizes the correct loading of data corresponding to the local local environment in a multi-language environment, and at the same time improves data loading efficiency, avoiding the full operation of unloading old languages ​​and loading new languages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621145A_ABST
    Figure CN119621145A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: responding to a first data loading request of first attribute information in a first application, and calling a first proxy class corresponding to the first attribute information; acquiring a local corresponding first language parameter; a first reference pointer pointing to a first index path is established in the first proxy class, the first index path is an index path of the first attribute information of the first language version, and the first language is a language represented by the first language parameter; and based on the reference pointer, loading data content of the first attribute information of the first language version from a pre-generated target single data file corresponding to the first attribute information. According to the scheme provided by the invention, the data loading efficiency can be improved while the data corresponding to the local language environment can be correctly loaded in the multi-language environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method, device, electronic device and computer-readable storage medium. Background Art

[0002] With the development of information globalization, software products need to be able to adapt to different countries and regions, which involves the internationalization and localization of software. Internationalization refers to the process of designing and developing software products that are universal to various cultures in the world, while localization is the process of adjusting these software products to adapt to the language and cultural habits of specific regions. In order to attract users from different regional markets, the localized data displayed to users in software products needs to be adapted to the local language, while non-localized data (such as game values ​​and parameter constants in game applications) needs to remain consistent.

[0003] In the related art, a common practice is to make data files into independent data modules, so that all data in each language are exported as independent data modules, and when the program is started, the data module of the corresponding language is loaded according to the local language parameters.

[0004] However, when the user switches the language parameters in the local system, the data modules corresponding to the old language in the memory need to be fully unloaded and the data modules corresponding to the new language need to be fully loaded. The number of data modules is usually large, which makes it difficult to instantly hot load and unload a large amount of data, which will affect the performance of the program and the user experience. Therefore, how to correctly load the data corresponding to the local language environment in a multi-language environment while improving the data loading efficiency has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The present application provides a data processing method, device, electronic device and computer-readable storage medium, which can correctly load data corresponding to the local language environment in a multi-language environment while improving the data loading efficiency. The specific scheme is as follows:

[0006] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:

[0007] In response to a first data loading request for first attribute information in a first application, calling a first proxy class corresponding to the first attribute information;

[0008] Get the first language parameters corresponding to the locale;

[0009] Establishing a first reference pointer pointing to a first index path in the first proxy class, wherein the first index path is an index path of the first attribute information of a first language version, and the first language is a language represented by the first language parameter;

[0010] Based on the first reference pointer, data content of the first attribute information of the first language version is loaded from a pre-generated target single data file corresponding to the first attribute information.

[0011] In a second aspect, an embodiment of the present application provides a data processing method, the method comprising:

[0012] Determine first structure data corresponding to each language version configured for the first attribute information in the first application;

[0013] Generate a target single data file and a target data information description file corresponding to the first attribute information according to each of the first structure data;

[0014] The target single data file stores data contents of the first attribute information of each language version, and the target data information description file includes index paths of the first attribute information of each language version in the target single data file.

[0015] In a third aspect, an embodiment of the present application provides a data processing device, the device comprising:

[0016] A calling unit, configured to call a first proxy class corresponding to the first attribute information in response to a first data loading request of the first attribute information in the first application;

[0017] An acquisition unit, used to acquire a first language parameter corresponding to the local area;

[0018] an establishing unit, configured to establish, in the first proxy class, a first reference pointer pointing to a first index path, wherein the first index path is an index path of the first attribute information of a first language version, and the first language is a language represented by the first language parameter;

[0019] A loading unit is used to load the data content of the first attribute information of the first language version from a pre-generated target single data file corresponding to the first attribute information based on the first reference pointer.

[0020] In a fourth aspect, an embodiment of the present application provides a data processing device, the device comprising:

[0021] A determination unit, configured to determine first structure data corresponding to respective language versions configured for the first attribute information in the first application;

[0022] A generating unit, configured to generate a target single data file and a target data information description file corresponding to the first attribute information according to each of the first structure data;

[0023] The target single data file stores data contents of the first attribute information of each language version, and the target data information description file includes index paths of the first attribute information of each language version in the target single data file.

[0024] In a fifth aspect, the present application further provides an electronic device, including:

[0025] Processor; and

[0026] The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method described in the first aspect or the second aspect is executed.

[0027] In a sixth aspect, an embodiment of the present application further provides a computer-readable storage medium storing a data processing program, which is executed by a processor to perform the method described in the first aspect or the second aspect.

[0028] Compared with the prior art, this application has the following advantages:

[0029] The data processing method provided by the embodiment of the present application includes the following steps: in response to a first data loading request for first attribute information in a first application, calling a first proxy class corresponding to the first attribute information; obtaining a first language parameter corresponding locally; establishing a first reference pointer pointing to a first index path in the first proxy class, wherein the first index path is an index path of the first attribute information of a first language version, and the first language is a language represented by the first language parameter; based on the first reference pointer, loading the data content of the first attribute information of the first language version from a pre-generated target single data file corresponding to the first attribute information.

[0030] It can be seen that the data processing method provided by the embodiment of the present application, when receiving the first data loading request of the first attribute information and making a data interface call, constructs an abstract data hierarchy by calling the first proxy class of the first attribute information, and by reading the local first language parameter, the first proxy class can create a reference pointer to the index path of the first language version corresponding to the first language parameter, thereby caching the data content of the first attribute information of the first language version and returning it through the interface, thereby achieving the correct loading of the data content of the current language. Compared with the prior art, the data processing method provided by the embodiment of the present application does not need to uninstall all the data modules of the old language and load all the data modules of the new language, and can improve the data loading efficiency while correctly loading the data corresponding to the local language environment in a multi-language environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1is a data processing system diagram for implementing a data processing method provided in an embodiment of the present application;

[0032] Figure 2 is a flow chart of a data processing method provided in the first embodiment of the present application;

[0033] Figure 3 It is a schematic diagram of an example of loading data in the prior art;

[0034] Figure 4 is a schematic diagram of an example of loading data in the data processing method provided in the first embodiment of the present application;

[0035] Figure 5 It is a logical flow diagram of loading data in the data processing method provided in the first embodiment of the present application;

[0036] Figure 6 is a flow chart of an example after the local language parameter is changed in the data processing method provided in the first embodiment of the present application;

[0037] Figure 7 This is a flow chart of data loading before and after code hot update in the data processing method provided in the first embodiment of the present application;

[0038] Figure 8 It is a schematic diagram of an example of storing data in the form of data slices in the data processing method provided in the first embodiment of the present application;

[0039] Fig. 9 As shown, the second embodiment of the present application provides a data processing method;

[0040] Fig.10 It is a flow chart of generating a single data file and a data information description file for each attribute information in the data processing method provided in the second embodiment of the present application;

[0041] Fig.11 is a structural block diagram of an example of a data processing device provided in the third embodiment of the present application;

[0042] Fig.12 is a structural block diagram of an example of a data processing device provided in the fourth embodiment of the present application;

[0043] Fig.13 This is a structural block diagram of an example of an electronic device provided in the fifth embodiment of the present application. DETAILED DESCRIPTION

[0044] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0045] It should be noted that the terms "first", "second", "third", etc. in the claims, description and drawings of the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. The data used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including", "having" and their variants are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0046] It should be understood that in the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" is merely a way to describe the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "Including A, B and / or C" means including any one, any two, or any three of A, B, and C.

[0047] It should be understood that in the embodiments of the present application, "B corresponding to A", "B corresponding to A", "A corresponds to B", or "B corresponds to A" means that B is associated with A, and B can be determined according to A. Determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.

[0048] Before describing the implementation methods of the present application in detail, the prior art will be further described first.

[0049] With the development of globalization, it is extremely important for software products to be able to adapt to different regional languages. For example, a game may initially only support English, but in order to enter the Chinese market, it needs to provide a Chinese interface and related localization functions. Software products include localized data (such as interface text, prompt information, etc.) and non-localized data (underlying parameters, etc.). Currently, the following two methods are commonly used to separate the localized data and non-localized data of software products:

[0050] Method 1: For a software product, create a separate configuration file for each language to separate localized data from non-localized data. When the user selects the required language, the program only needs to load the configuration file corresponding to the selected language to load the corresponding localized data.

[0051] For example, for a game application product, the "health value" in the English version is "HP", and the "health value" in the Chinese version is "blood volume". The texts of "HP" and "blood volume" are stored in a configuration file independent of the core logic of the game. When the player selects Chinese, the program loads the configuration file containing the "blood volume" text. When the player selects English, the program loads the configuration file containing the "HP" text.

[0052] Method 2: For a software product, all data of each language are made into independent language modules. When the program starts, the corresponding language module is loaded according to the regional parameters. In addition, the data files under different language modules have the same reference name, so that the correct data file can be called.

[0053] However, although the method of completely separating data in the above method 1 can achieve complete separation of localized data and non-localized data, it is very difficult to implement in traditional single display language software projects with thousands of data files. These projects often have complex architectures and highly coupled modules, so it takes a lot of work to completely separate data and may introduce new errors. Moreover, in the field of game development, the design of complete data separation requires strict implementation by all participants in the whole process, which increases the learning cost of functional personnel such as project planners, artists and UI designers.

[0054] Although the above-mentioned method 2 reduces the transformation cost, it has the following problems: First, in a dynamic language runtime environment, it is difficult to instantly hot load and unload a large amount of data, which will affect the performance of the program and the user experience, and the efficiency of loading and unloading is extremely low; Second, the data of each language version is a complete copy, resulting in high data redundancy, increasing storage pressure and the complexity of data synchronization; Third, when releasing a new version, it is necessary to repackage the data of all language modules, resulting in a long publishing process, especially when the amount of data is large, this disadvantage is extremely obvious; Fourth, the data is stored in the form of language modules in a dynamic language runtime environment. Once a language module is loaded into memory, it is usually not automatically unloaded, which means that if the data in the language module needs to be updated, the language module must be reloaded. However, frequent reloading of language modules may cause performance problems and it is difficult to achieve real-time online hot updates.

[0055] In summary, although completely separating data and using independent data modules are both effective localization strategies, they have certain limitations and challenges. Therefore, how to load data in the corresponding language on demand in a multilingual environment with minimal changes to the application and improve data loading efficiency has become a technical problem that needs to be solved urgently.

[0056] Based on the above reasons, in order to correctly load the data corresponding to the local language environment in a multilingual environment while improving data loading, the first embodiment of the present application provides a data processing method, which is applied to an electronic device. The electronic device can be a desktop computer, a laptop computer, a mobile phone, a tablet computer, an electronic watch, etc., or other electronic devices capable of data processing, which is not specifically limited in the embodiments of the present application.

[0057] For example, Figure 1 A data processing system 100 for implementing a data processing method provided by an embodiment of the present application is shown, and the data processing system 100 may include at least one terminal 101, at least one server 102, and a network 103. The terminal 101 may be connected to different servers 102 via a network. The terminal is any device with computing hardware that can support and execute software application tools corresponding to a game.

[0058] In the above data processing system 100, the terminal 101 is used to install and run the first application. In some cases, the first application may not be installed in advance in the terminal 101, and the user may directly access the first application through a client such as a browser. When the user logs in to the first application, the terminal 101 will send a login request to the server 102, and the server 102 will verify the login account used by the user, and return a login success notification to the terminal 101 after the verification. During the user's login to the first application, data can be exchanged between the terminal 101 and the server 102. The terminal 101 sends various information to the server 102. The server 102 determines the display data of the terminal 101 based on the stored application mechanism and the received information, and sends the display data to the terminal 101, so that the display data sent by the server 102 can be displayed to the user through the terminal 101.

[0059] In a possible application scenario, different terminals 101 may be served by different servers 102 , and the server 102 corresponding to different terminals 101 may be the same server.

[0060] In addition, when the data processing system 100 includes multiple terminals, multiple servers, and multiple networks, different terminals can be interconnected with different servers through different networks.

[0061] Among them, the terminal 101 can have one or more multi-touch screens for sensing and obtaining the input of the user through touch or sliding operations performed at multiple points on one or more touch display screens. The terminal 101 can also be connected to a keyboard and / or a mouse and / or a game controller, so that the user can perform interface operations through the keyboard and / or mouse and / or a game controller.

[0062] The network may be a wireless network or a wired network, such as a wireless network such as a wireless local area network (WLAN), a local area network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, etc. In addition, different terminals may also use their own Bluetooth network or hotspot network to connect to other terminals or to a server, etc. In addition, the system 100 may include multiple databases, which are coupled to different servers, and store information related to the first application in the databases.

[0063] It should be noted that Figure 1 The data processing system diagram shown is merely an example. The data processing system 100 described in the embodiment of the present application is intended to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided in the embodiment of the present application.

[0064] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0065] The following, combined Figure 2 to Figure 8 The data processing method provided in the embodiment of the present application is introduced.

[0066] like Figure 2 , which is a flow chart of a data processing method provided in an embodiment of the present application, including the following steps S101 to S104:

[0067] Step S101: In response to a first data loading request for first attribute information in a first application, a first proxy class corresponding to the first attribute information is called.

[0068] The first application may include but is not limited to any of the following software products: game applications, instant messaging applications, and online shopping applications. In order to more clearly introduce the data processing method provided in the embodiment of the present application, in the embodiment of the present application, the first application is described as a game application, which does not constitute a limitation on the present application.

[0069] It can be understood that game applications refer to applications developed according to the needs of game applications, and the types of games may include but are not limited to at least one of the following: two-dimensional (Two Dimension) game applications, three-dimensional (Three Dimension) game applications, virtual reality (Virtual Reality, VR) game applications, augmented reality (Augmented Reality, AR) game applications, and mixed reality (Mixed Reality, MR) game applications.

[0070] The above-mentioned first attribute information refers to information corresponding to an entity in the first application. For example, in a game application, the first attribute information may be one of prop information, character information, skill information, etc.

[0071] In the embodiment of the present application, in response to the first data loading request of the first attribute information in the first application, the first proxy class corresponding to the first attribute information can be called. It should be noted that one attribute information can correspond to one proxy class, for example, prop information corresponds to proxy class 1, character information corresponds to proxy class 2, and skill information corresponds to proxy class 3. The proxy class of data is an abstract class, which does not store data, but is used to indirectly access the actual storage location of the data.

[0072] In an optional implementation, a proxy class may declare a data identifier with corresponding attribute information, and the data identifier may include at least one of a data table name and a dimension variable. For example, for prop information, the data table name may be a prop information list, and the dimension variable may include at least one of a prop name, a prop type, a prop level, etc.; for character information, the data table name may be a character name list, and the dimension variable may be at least one of a character name, a character's occupation, a character's skills, etc.

[0073] In this way, based on the target data identifier of the first attribute information, the first proxy class corresponding to the first attribute information can be called.

[0074] Step S102: Obtain the first language parameter corresponding to the local area.

[0075] The user can manually set the first language parameter in the local user space, and the first language represented by the first language parameter can be one of Chinese, English, Japanese, Russian, French, etc. It should be noted that, usually, the application can be provided with logic for loading the language parameter from the local user space, and the set first language parameter can be read from the local user space through the logic if the user allows it.

[0076] Step S103: establishing a first reference pointer pointing to a first index path in the first proxy class, wherein the first index path is an index path of the first attribute information of a first language version, and the first language is a language represented by the first language parameter.

[0077] It should be noted that the first proxy class called in step S101 may have loading information, and a first reference pointer pointing to the first index path may be established in the first proxy class according to the loading information.

[0078] In an optional implementation, the loading information of the first proxy class may include the first index path of the first attribute information of the first language version corresponding to the first language parameter, so that a first reference pointer may be established in the first proxy class based on the first index path in the loading information of the first proxy class. That is, the above step of "establishing a first reference pointer pointing to the first index path in the first proxy class" may be implemented by the following steps:

[0079] Obtain the index path loaded by the first proxy class;

[0080] If the index paths loaded by the first proxy class include the first index path, a first reference pointer pointing to the first index path is established in the first proxy class.

[0081] In the embodiment of the present application, after the first proxy class is created and initialized, it can load the index path of the current language (on-demand loading) or load the index paths of all languages ​​(full loading) from the corresponding data information description file. In this way, when the first proxy class is subsequently called, the loading information of the first proxy class, that is, the loaded index path, can be obtained. When the index path loaded by the first proxy class includes the first index path of the first language version (that is, the first proxy class is created and initialized to load the index paths of all languages ​​in full), a pointer to the first index path can be established in the first proxy class based on the loading information of the first proxy class.

[0082] In another optional implementation, the loading information of the first proxy class does not include the first index path of the first attribute information of the first language version corresponding to the first language parameter. In this case, the above step of "establishing a first reference pointer pointing to the first index path in the first proxy class" can be implemented by the following steps:

[0083] If the index path loaded by the first proxy class does not include the first index path, loading the first index path recorded in the target data information description file corresponding to the first proxy class;

[0084] A first reference pointer pointing to the first index path is established in the first proxy class.

[0085] In an embodiment of the present application, if the first index path of the first language version does not exist in the loading information corresponding to the first proxy class (the index path loaded by the first proxy class), the target data information description file corresponding to the first attribute information can be loaded first, and the first index path of the first language version can be obtained therefrom, thereby establishing a pointer to the first index path in the first proxy class.

[0086] It should be noted that for one attribute information, a corresponding single data file and a data information description file can be generated in advance, the single data file is used to store the data content of the attribute information of each language version, and the data information description file can at least include each index path of the attribute information of each language version in the single data file. In this way, the first index path of the first language version can be obtained from the target data information description file corresponding to the first attribute information.

[0087] Table 1.

[0088]

[0089]

[0090] As shown in Table 1, it is an example table of establishing a first reference pointer in the data processing method provided in the embodiment of the present application. Among them, the first attribute information is prop information, and the target data information description file pre-generated for the prop information includes the index path of the prop information in each language version, specifically the index path 1 of the prop information in the English version, the index path 2 of the prop information in the Chinese version, and the index path 3 of the prop information in the Japanese version. When creating the first proxy class corresponding to the prop information, when the local language is configured as English, if the loading configuration is to load the path of all languages ​​in full, then the index path loaded when the first proxy class is created is the index path 1 corresponding to English, the index path 2 corresponding to Chinese, and the index path 3 corresponding to Japanese. If the loading configuration is to load the path of the current language on demand, then the index path loaded when the first proxy class is created is the index path 1 corresponding to English. When the first data loading request for prop information is received and the first proxy class is called, after the local language is switched from English to Chinese, if the index paths loaded when the first proxy class is created are index path 1 corresponding to English, index path 2 corresponding to Chinese, and index path 3 corresponding to Japanese (i.e., index paths for all languages), a first reference pointer pointing to index path 2 corresponding to Chinese can be established based on the loading information of the first proxy class. If the index path loaded when the first proxy class is created is index path 1 corresponding to English, index path 2 corresponding to Chinese can be loaded from the target data information description file to establish a first reference pointer pointing to index path 2.

[0091] Afterwards, the program may pass the query parameter corresponding to the first data loading request into the first proxy class, and the corresponding data may be indexed through the first reference pointer established in the first proxy class.

[0092] Step S104: Based on the first reference pointer, load the data content of the first attribute information of the first language version from a pre-generated target single data file corresponding to the first attribute information.

[0093] In the embodiment of the present application, for one piece of attribute information, a corresponding single data file can be generated in advance, and the single data file is used to store the data content of the attribute information in each language version.

[0094] It should be noted that, when the data content of the attribute information in each language version is consistent, that is, the data of the attribute information in each language version is non-localized data, the single data file may be a file (hereinafter referred to as common_data) storing common data (that is, non-localized data); when the data content of the attribute information in each language version is inconsistent, that is, the data of the attribute information in each language version contains differentiated localized data, the single data file may be a file storing the data content of the attribute information in each language version with different language variables.

[0095] Table 2.

[0096]

[0097] As shown in Table 2, it is an example table of a single data file for prop information in the data processing method provided by the embodiment of the present application. A single data file is pre-generated for the English version of prop information (en_data) and the Japanese version of prop information (jp_data). If the English version of prop information is consistent with the Japanese version of prop information (i.e., en_data=jp_data), a single data file of common_data is generated. In this way, when the first language is English, the proxy class corresponding to the prop information needs to load the English version of the data class (i.e., en_data), and the first reference pointer can represent the pointing relationship of en_data→common_data; if the English version of prop information is inconsistent with the Japanese version of prop information (i.e., en_data≠jp_data), a single data file containing en_data and jp_data is generated. In this way, when the first language is English, the proxy class corresponding to the prop information needs to load the English version of the data class (i.e., en_data), and the first reference pointer can represent the pointing relationship of the single data file→en_data.

[0098] In step S104, the storage location of the first attribute information of the first language version can be accessed through the first reference pointer established in the first proxy class, so as to correctly load the data content of the first attribute information of the first language version.

[0099] Among them, the above-mentioned target single data file includes the first data content or the second data content, the above-mentioned first data content is the common data content when the first attribute information of each language version is consistent, and the above-mentioned second data content is the differentiated data content stored when the first attribute information of each language version is inconsistent.

[0100] When the above-mentioned target single data file includes the first data content, "loading the data content of the first attribute information of the first language version" specifically refers to: loading the common data content in the target single data file; when the above-mentioned target single data file includes the second data content, "loading the data content of the first attribute information of the first language version" specifically refers to: loading the differentiated data content corresponding to the first language in the target single data file.

[0101] The data processing method provided by the embodiment of the present application includes the following steps: in response to a first data loading request for first attribute information in a first application, calling a first proxy class corresponding to the first attribute information; obtaining a first language parameter corresponding locally; establishing a first reference pointer pointing to a first index path in the first proxy class, wherein the first index path is an index path of the first attribute information of a first language version, and the first language is a language represented by the first language parameter; based on the first reference pointer, loading the data content of the first attribute information of the first language version from a pre-generated target single data file corresponding to the first attribute information.

[0102] It can be seen that the data processing method provided by the embodiment of the present application, when receiving the first data loading request of the first attribute information and making a data interface call, constructs an abstract data hierarchy by calling the first proxy class of the first attribute information, and by reading the local first language parameter, the first proxy class can create a reference pointer to the index path of the first language version corresponding to the first language parameter, thereby caching the data content of the first attribute information of the first language version and returning it through the interface, thereby achieving the correct loading of the data content of the current language. Compared with the prior art, the data processing method provided by the embodiment of the present application does not need to uninstall all the data modules of the old language and load all the data modules of the new language, and can improve the data loading efficiency while correctly loading the data corresponding to the local language environment in a multi-language environment.

[0103] The following combination Figure 3 and Figure 4 The data processing method provided in the embodiment of the present application is compared with the prior art in detail:

[0104] like Figure 3 The figure is a schematic diagram of an example of loading data in the prior art, including steps S201 to S203. Step S201: the client script calls the data interface; Step S202: the native module loads a specific data file in the data module; Step S203: the data dictionary is returned, and the content of a specific field is queried through the data dictionary index.

[0105] It can be seen that in the prior art, a specific data file in a data module is loaded through a native module reference mechanism to query the content of a specific field. After the data module is successfully loaded, it will not be reloaded unless it is manually unloaded. Therefore, the returned data dictionary can only be used to retrieve the content of the loaded data segment, and the loaded data file cannot be dynamically adjusted according to the local language parameters. Therefore, in the prior art, it is impossible to dynamically load files of the corresponding language through local language parameters.

[0106] like Figure 4 , which is a schematic diagram of an example of loading data in the data processing method provided by the embodiment of the present application, including steps S301 to S303. Step S301: the client script calls the data interface; Step S302: indexing the specific field content of the current language in a single data file through the corresponding proxy class; Step S303: returning the specific field content.

[0107] It can be seen that the data processing method provided in the embodiment of the present application can index the specific field content of the current language in a single data file based on the proxy class corresponding to the data to be loaded when loading data. Therefore, the data processing method provided in the embodiment of the present application can switch languages ​​without modifying the code, thereby realizing on-demand loading of data content in the corresponding language. In addition, the data processing method provided in the embodiment of the present application does not modify the code. When new language support needs to be added, it is usually only necessary to modify the corresponding single data file and data information description file, thereby improving the scalability and maintainability of the code.

[0108] In an optional implementation, the "calling the first proxy class corresponding to the first attribute information" in the above step S101 can be implemented by the following steps S1011 and S1012:

[0109] Step S1011: Detect whether a first proxy class corresponding to the first attribute information has been generated in the first application, and obtain a detection result;

[0110] Step S1012: If the detection result is that the first proxy class has been generated in the first application, the first proxy class is called.

[0111] It should be noted that the proxy class generated in the first application is at the module level. In the Python environment, a module is usually loaded into the memory after it is imported, and the module will not be loaded again during the same program running. In this way, when calling the first proxy class corresponding to the first attribute information, it can be detected whether the first proxy class has been generated. If the first proxy class has been generated, the instance of the first proxy class loaded into the memory can be directly called.

[0112] In the embodiment of the present application, the proxy class in the first application exists as a module level and runs in singleton mode. During the life cycle of the entire first application, there will be only one instance of a proxy class, and a global access point is provided to access this instance. Moreover, after the instance is first created, it is cached. In this way, during the continuous operation of the program, when the proxy class is subsequently loaded, there is no need to re-execute the code of the module where the proxy class is located, and the cached instance can be directly used. In other words, a proxy class only needs to be initialized once during the execution of the program.

[0113] Since the proxy class exists in singleton mode, when the same proxy class is called multiple times, the same object reference will be obtained, ensuring the uniqueness of the proxy class in the global scope. On the one hand, it avoids the waste of resources caused by multiple instantiations of the same proxy class, and on the other hand, it effectively reduces space occupancy.

[0114] Optionally, the first application may include a generated second proxy class. As can be seen from the above introduction, the second proxy class declares a data identifier of the corresponding attribute information, and the data identifier may include at least one of a data table name and a dimension variable. The above step S1011 may be performed by the following steps:

[0115] From the second proxy class, searching whether there is a first proxy class that declares a target data identifier corresponding to the first attribute information, where the target data identifier includes at least one of a target data table name and a target dimension variable;

[0116] If so, a detection result is obtained indicating that the first proxy class has been generated in the first application.

[0117] In a specific implementation, it is possible to search from the second proxy class generated by the first application whether there is a first proxy class that declares a target data identifier corresponding to the first attribute information. In the case where the above data identifier includes a data table name and a dimension variable, it is possible to search whether there is a first proxy class that declares a target data table name and a target dimension variable corresponding to the first attribute information.

[0118] Exemplarily, the generated second proxy class includes proxy class a, proxy class b, and proxy class c. The data table name declared by proxy class a is prop information, and the declared dimension variables are prop name, prop type, and prop level; the data table name declared by proxy class b is role information, and the declared dimension variables are role name, role occupation, and role skills; the data table name declared by proxy class c is skill information, and the declared dimension variables are skill release conditions, skill cooling time, and skill damage. When the first attribute information is prop information, it can be found whether there is a proxy class in the generated second proxy class whose declared data table name is prop information and whose declared dimension variables are prop name, prop type, and prop level. In this way, the second proxy class can be found.

[0119] In an optional implementation, the first proxy class corresponding to the first attribute information may not be created. Before the above step S102, the data processing method provided in the embodiment of the present application may further include the following steps:

[0120] If the first proxy class is not called, a first proxy class corresponding to the first attribute information is generated according to a pre-generated target data information description file corresponding to the first attribute information.

[0121] In an embodiment of the present application, when the first proxy class corresponding to the first attribute information is not generated, the target data information description file corresponding to the first attribute information can be loaded first, and then the first proxy class corresponding to the first attribute information can be created based on the information in the target data information description file.

[0122] In an optional specific implementation, the above step of "generating a first proxy class corresponding to the first attribute information according to a pre-generated target data information description file corresponding to the first attribute information" can be implemented by the following steps:

[0123] Loading a pre-generated target data information description file corresponding to the first attribute information, wherein the target data information description file includes a target data identifier and index paths of the first attribute information of each language version in the target single data file, and the target data identifier includes at least one of a target data table name and a target dimension variable;

[0124] According to the target data identifier, creating a first proxy class corresponding to the first attribute information, wherein the first proxy class declares the target data identifier;

[0125] According to each of the index paths, an index path at least including the first index path is loaded in the first proxy class to obtain the first proxy class having loading information.

[0126] It should be noted that when creating the first proxy class corresponding to the first attribute information, first, the target data information description file corresponding to the first attribute information can be loaded. As can be seen from the above introduction, for one attribute information, its corresponding data information description file includes the index paths of the attribute information of each language version in the corresponding single data file. In addition, a data information description file can also include the data identifier of the corresponding attribute information. Therefore, the target data information description file includes the index paths of the first attribute information of each language version in the target single data file, and the target data identifier.

[0127] After the target data information description file is loaded, the first proxy class corresponding to the first attribute information can be created based on the target data identifier included in the target data information description file, and the created first proxy class declares the target data identifier. It should be noted that when creating the first proxy class, a one-to-one mapping relationship between the first proxy class and the first attribute information is achieved by registering the target data identifier, so that when a subsequent request is made to load the data of the first attribute information, the corresponding first proxy class can be called based on the mapping relationship.

[0128] After the first proxy class is created, the index path including at least the first index path can be loaded in the first proxy class according to the index paths of the first attribute information of each language version included in the target data information description file. As known in the above introduction, the loading of index paths when the proxy class is created can be configured to load all the index paths of all language versions, or can be configured to load the index path of the current language on demand. Therefore, the index path including at least the first index path loaded in the first proxy class here includes: the first index path of the first attribute information of the first language version, or the index paths of the first attribute information of each language version.

[0129] In an optional implementation, the above step of "loading an index path including at least the first index path in the first proxy class" may include the following steps:

[0130] Get loading configuration parameters;

[0131] If the loading configuration parameter is a first parameter indicating an index path for loading the current local language, loading the first index path of the first attribute information of the first language version in the first proxy class;

[0132] If the loading configuration parameter is a second parameter indicating to load index paths of all languages, each of the index paths is loaded in the first proxy class.

[0133] In a specific implementation, a loading configuration parameter may be obtained first, and then, based on the loading configuration parameter, a corresponding index path including at least the first index path may be loaded in the first proxy class. Specifically, when the loading configuration parameter is a first parameter indicating loading the index path of the current local language, the first index path of the first attribute information of the first language version may be loaded from the loaded data information description file, and when the loading configuration parameter is a second parameter indicating loading the index path of all languages, each index path of the first attribute information of each language version may be loaded from the loaded data information description file.

[0134] In this way, a first proxy class with loading information can be created. Afterwards, a first reference pointer pointing to the first index path can be established in the first proxy class based on the loading information of the first proxy class, so as to correctly load the corresponding data content based on the first reference pointer.

[0135] like Figure 5 FIG. 4 is a schematic diagram of a logic flow of loading data in a data processing method provided in an embodiment of the present application, including the following steps S401 to S407:

[0136] Step S401: receiving a first data loading request for first attribute information;

[0137] Step S402: determining whether the first proxy class of the first attribute information has been generated;

[0138] If the judgment result of step S402 is yes, then execute step S403 ; if the judgment result of step S402 is no, then jump to step S406 .

[0139] Step S403: loading the target data information description file corresponding to the target attribute data;

[0140] Step S404: creating a first proxy class corresponding to the first attribute information;

[0141] Step S405: Loading the first index path corresponding to the current local language in the first proxy class;

[0142] Step S406: Create a first reference pointer pointing to the first index path;

[0143] Step S407: Based on the first reference pointer, data is read and the data result is returned.

[0144] It can be seen that in the data processing method provided by the embodiment of the present application, when the first data loading request of the first attribute information is received, it is first determined whether the first proxy class of the first attribute information is generated; if the first proxy class has been generated, a first application pointer pointing to the first index path is directly established in the first proxy class; if the first proxy class has not been generated, the target data information description file corresponding to the first attribute information is first loaded, and the target data information description file includes a target data identifier and each index path of the first attribute information of each language version; in this way, based on the target data identifier, a first proxy class declared with the target data identifier can be created; and based on each index path of the first attribute information of each language version, at least the first index path corresponding to the current local language is loaded; thereby a first reference pointer pointing to the first index path is established in the first proxy class; in this way, based on the first reference pointer established in the first proxy class, the corresponding data content can be read in the target single data file corresponding to the first attribute information, thereby returning the correct data content.

[0145] like Figure 6 FIG. 1 is a flow chart of an example of a data processing method provided in an embodiment of the present application after the local language parameter is changed. Figure 6 Detailed introduction:

[0146] In an optional implementation, before the above step S102, the data processing method provided in the embodiment of the present application may further include: Figure 6 Step S501 and step S502 in:

[0147] Step S501: in response to a language switching instruction, updating the local corresponding second language parameters to the first language parameters;

[0148] Step S502: persisting the first language parameter so that a local application is configured using the first language represented by the first language parameter.

[0149] In a specific implementation, the user can set the local language in the graphical user interface. Specifically, the user can click to enter the local language setting interface and change the second language currently used to the first language. In this way, a language switching instruction can be generated, thereby triggering the second language parameters corresponding to the second language stored in the memory to be updated to the first language parameters corresponding to the first language.

[0150] For example, the user can enter the local language setting interface and switch the current language from Chinese to English. In this way, the language parameter indicating that the current language is Chinese stored in the memory will be changed to a language parameter indicating that the current language is English.

[0151] After the language parameter is updated from the second language parameter to the first language parameter, the first language parameter can be persisted. In this way, when the application is restarted or the system is restarted, it can be ensured that the local language is still the first language represented by the first language parameter without having to be manually set again, thereby supporting local applications to be configured using the first language represented by the first language parameter.

[0152] In an optional implementation, the data processing method provided in the embodiment of the present application may also include: Figure 6 Step S503 and step S504 in:

[0153] Determine a generated second proxy class corresponding to the first application;

[0154] A reference pointer pointing to an index path corresponding to a second language established in the second proxy class is cleared, wherein the second language is a language represented by the second language parameter.

[0155] In an embodiment of the present application, in response to the above-mentioned language switching instruction, for the above-mentioned first application, all second proxy classes generated in the first application can also be traversed, and the reference pointer pointing to the index path corresponding to the second language (old language) established in the second proxy class can be cleared.

[0156] Furthermore, when the language parameter is switched, the reference pointer pointing to the index path corresponding to the second language established in the second proxy class is cleared, and the index path corresponding to the second language loaded in the second proxy class can also be cleared.

[0157] Exemplarily, the second proxy class currently generated in the first application includes: proxy class 1 corresponding to prop information, proxy class 2 corresponding to character information, and proxy class 3 corresponding to skill information. The local language before switching is Chinese, and the local language after switching is English. Then, the reference pointer of the index path pointing to the Chinese version of the prop information established in proxy class 1 can be cleared, and the index path of the loaded Chinese version of the prop information can be cleared; the reference pointer of the index path pointing to the Chinese version of the character information established in proxy class 2 can be cleared, and the index path of the loaded Chinese version of the character information can be cleared; the reference pointer of the index path pointing to the Chinese version of the skill information established in proxy class 3 can be cleared, and the index path of the loaded Chinese version of the skill information can be cleared.

[0158] It should be noted that, by clearing the reference pointer pointing to the index path corresponding to the second language established in the second proxy class and clearing the index path corresponding to the second language loaded in the second proxy class, the mapping relationship between the second proxy class and the index path corresponding to the second language can be released. In this way, when a first data loading request is received during the operation of the first application, the language version error caused by directly loading the data content in the index path corresponding to the old language is avoided, and the corresponding data content is loaded based on the index path of the new language currently set locally.

[0159] Specifically, after clearing the index path corresponding to the second language loaded in the second proxy class and clearing the reference pointer pointing to the index path corresponding to the second language established in the second proxy class, when a data call occurs in the first application and data of a certain attribute information needs to be loaded, Figure 6 Step S505: When there is a need to load certain attribute information in the first application, it is implemented through the above steps S101 to S104. Steps S101 to S104 have been introduced in detail above and will not be repeated here.

[0160] In an optional implementation manner, the data content of the first attribute information of the first language version is the first code content in the target single data file; the data processing method provided in the embodiment of the present application may further include the following steps:

[0161] During the running of the first application, in response to the first code content corresponding to the first attribute information being updated to the second code content, if the second code content is non-localized content, loading the target single data file corresponding to the first attribute information to obtain a copy file;

[0162] Updating the first code content in the data content corresponding to each language in the copy file to the second code content;

[0163] In response to a second data loading request of the first attribute information, the second code content is loaded from the copy file through the first proxy class.

[0164] It should be noted that in many applications, hot update is a common technical means for updating code or data without stopping the application. Hot update usually involves downloading new code or data to the running application and applying these updates without stopping the application. On the one hand, it avoids the downtime and resource consumption caused by restarting the application. On the other hand, users will not feel that the application has been updated during use, which improves the user experience.

[0165] In Python, hot update usually refers to the act of dynamically modifying or replacing code while the program is running, so as to implement new functions or fix errors without restarting the program. This method usually involves dynamically modifying classes, functions or modules, which is often called "monkey patching" in the industry.

[0166] In an embodiment of the present application, before the code is hot updated, when a request is made to call the data of the first attribute information, the first code content is loaded from the target single data file corresponding to the first attribute information through the first proxy class corresponding to the first attribute information, and the first code content is the data content of the first attribute information of the current local language version.

[0167] If the code in the data content corresponding to the first attribute information is updated at this time, from the first code content to the second code content, then you can first detect whether the second code content is non-localized content, that is, common content in each language. For example, if the updated content is the cooldown time of a skill, it is non-localized content. If the second code content is non-localized content, you can first load the target single data file corresponding to the first attribute information into the memory to obtain a copy file, and then update the first code content in the data content corresponding to each language in the copy file in the memory to the second code content. In this way, whether you are loading the current first language version of the target attribute information or switching the first language to another language locally, you can load the target attribute information including the second code content after the hot update from the memory.

[0168] like Figure 7 , which is a flowchart of data loading before and after code hot update in the data processing method provided in an embodiment of the present application, including steps S601 to S607.

[0169] Among them, step S601 to step S603 are the data loading process before the code hot update:

[0170] Step S601: A user accesses certain data;

[0171] Step S602: the proxy class 201 forwards the corresponding query parameters to a single data file;

[0172] Step S603: Return corresponding data A from the single data file.

[0173] Step S604: In response to the hot update of the code in the program, if the hot update content is non-localized content, load a single data file corresponding to the hot update content into the memory, and update data A in the single data file loaded into the memory to data B.

[0174] Steps S605 to S607 are the data loading process after the code hot update:

[0175] Step S605: the user accesses the same type of data accessed in step S601;

[0176] Step S606: the proxy class 201 forwards the corresponding query parameters to a single data file loaded into the memory;

[0177] Step S607: Return the corresponding data B from the single data file loaded into the memory. In the prior art, when the hot update and language switching processes conflict, the hot update may fail and roll back, resulting in the effect of the hot update being offset. During the hot update process, new data or code is downloaded and applied to the currently running application, for example, updating a text from "old text" to "new text". During the language switching process, the application will uninstall all data in the current language and load new language data. In this way, the data in the current language will be completely uninstalled, so that the most recent hot update data or code is cleared, and the language data reloaded from the storage is the old data before the hot update, resulting in the most recent update being overwritten.

[0178] For example, suppose an application supports two languages, English and Chinese. When the application is currently in English, a hot update occurs, and a prompt text is updated from "old text" to "new text". When the user switches from English to Chinese, the current English data will be uninstalled and the Chinese data will be loaded from the storage. In this way, the prompt text in the loaded Chinese data is still "old text", causing the hot update to fail.

[0179] Compared with the prior art, in the data processing method provided in the embodiment of the present application, when the hot-update content is required by all languages, a single data file can be loaded into the memory first, and the content corresponding to each language in the memory can be replaced with the hot-update content. In this way, when the old language is switched to the new language, the hot-updated content corresponding to the new language can also be loaded from the memory, thereby avoiding the hot-update failure problem caused by switching languages.

[0180] In an optional implementation, the first application includes multiple attribute information, the data contents in the single data file corresponding to different attribute information are respectively stored in different data slices, the data contents in the target single data file are stored in the target data slice, and the first proxy class has a communication connection with the target data slice; the step S104 can be implemented by the following steps:

[0181] The data content corresponding to the first attribute information in the first language is loaded from the data content stored in the target data slice through the first proxy class.

[0182] In an embodiment of the present application, a data shard may only store the data content in a single data file corresponding to one attribute information. For example, the data content in a single data file corresponding to prop information may be stored in data shard 1, the data content in a single data file corresponding to character information may be stored in data shard 2, and the data content in a single data file corresponding to skill information may be stored in data shard 3.

[0183] In a specific implementation, the data content can be divided according to the key value, and the data content with the same key value can be allocated to one data shard. It should be noted that the data content with the same key value has the same data identifier and belongs to the same attribute information. In this way, the data content belonging to the same attribute information can be divided into one data shard, thereby realizing on-demand loading.

[0184] like Figure 8 As shown, it is a schematic diagram of an example of storing data in the form of data shards in the data processing method provided in an embodiment of the present application. It can be seen that the data entry 301 is connected to the proxy class corresponding to each data shard. Specifically, each data shard includes data shard 1, data shard 2 and data shard 3. The proxy class corresponding to data shard 1 is proxy class 1, the proxy class corresponding to data shard 2 is proxy class 2, and the proxy class corresponding to data shard 3 is proxy class 3. Each proxy class is respectively connected to its corresponding data shard. Among them, data shard 1 stores data with a key value of 1, data shard 2 stores data with a key value of 2, and data shard 3 stores data with a key value of 3. For example, Figure 8 Data shard 1 can store data corresponding to item information, data shard 2 can store data corresponding to character information, and data shard 3 can store data corresponding to skill information. In this way, when calling data corresponding to item information, you only need to call proxy class 1 to load data from data shard 1, when calling data corresponding to character information, you only need to call proxy class 2 to load data from data shard 2, and when calling data corresponding to item information, you only need to call proxy class 3 to load data from data shard 3.

[0185] This setting method stores the data content of the same attribute information in one data shard. In this way, when the data of a certain attribute information is frequently loaded in a certain period of time, it is only necessary to load the content in the data shard corresponding to the attribute information, without loading the content in other data shards, thus saving memory space.

[0186] The above is an introduction to the data processing method provided in the first embodiment of the present application.

[0187] like Fig. 9 As shown, the second embodiment of the present application provides a data processing method, including the following steps S701-S702:

[0188] Step S701: determining first structure data corresponding to each language version configured for first attribute information in the first application;

[0189] Step S702: generating a target single data file and a target data information description file corresponding to the first attribute information according to each of the first structure data;

[0190] The target single data file stores data contents of the first attribute information of each language version, and the target data information description file includes index paths of the first attribute information of each language version in the target single data file.

[0191] Optionally, the above step S701 may include the following steps:

[0192] Acquire respective second structure data corresponding to respective language versions configured for the first attribute information;

[0193] According to a preset data conversion rule, each of the second structure data is processed into each of the first structure data.

[0194] The above-mentioned second structure data refers to the configuration data set by the first attribute information for each language version segment, which can be CSV (Comma-Separated Values) table data. CSV is a commonly used file format for storing table data. In a CSV file, each row represents a record, and each column represents an attribute or field of the record. Fields are usually separated by commas (,), and rows are separated by line breaks.

[0195] Among them, the second structure data corresponding to a language version may include localized data and non-localized data. Localized data refers to data customized for different languages ​​and regions, and non-localized data refers to data that does not distinguish between languages. Usually, the non-localized data corresponding to different language versions are the same, and the localized data are different.

[0196] For example, if the first attribute information is prop information, configuration data 1 for Chinese settings, configuration data 2 for English settings, configuration data 3 for Japanese settings, etc., in the first application can be obtained.

[0197] In an embodiment of the present application, each second structure data can be formatted according to a preset data conversion rule, so that each of the second structure data can be processed into each first structure data. In Python, a dictionary is a data structure for storing key-value pairs. Each element in a dictionary has a unique key (Key) corresponding to a value (Value). The corresponding value can be quickly accessed through the key. In this way, the second structure data (configuration data) of each language version supported by the first attribute information can be converted into the corresponding first structure data (dictionary structure data), that is, each first structure data includes the first structure data corresponding to each language version.

[0198] It should be noted that the first structure data can be directly read by the program, which is convenient for quick access and operation. The first structure data may include but is not limited to any of the following: taggeddict structure data, ShardDict structure data. Among them, the taggeddict structure refers to a dictionary with additional tags or metadata, which is usually used to store data items with additional information, and the ShardDict structure refers to a data structure that stores data in shards, which is usually used to process large amounts of data or implement distributed storage.

[0199] After obtaining each first structure data, a target single data file and target data information description information corresponding to the first attribute information may be generated according to each first structure data.

[0200] In the embodiment of the present application, each first structure data may be integrated and compressed to obtain an integrated and compressed target single data file, and a target data information description file may be generated accordingly.

[0201] It should be noted that the target data information description file may include the index paths of the first attribute information of each language version in the target single data file, and may also record the languages ​​supported by the target single data file. In this way, the index paths of each language version in the target single data file can be obtained through the target data information description file, thereby obtaining the data corresponding to the first attribute information of each language version from the target single data file.

[0202] The above-mentioned target single data file includes the first data content or the second data content. The above-mentioned first data content is the common data content when the first attribute information of each language version is consistent, and the above-mentioned second data content is the differentiated data content stored when the first attribute information of each language version is inconsistent.

[0203] The data processing method provided in the second embodiment of the present application includes the following steps: determining each first structural data corresponding to each language version configured for the first attribute information in the first application; generating a target single data file and a target data information description file corresponding to the first attribute information according to each first structural data; wherein the target single data file stores the data content of the first attribute information of each language version, and the target data information description file includes each index path of the first attribute information of each language version in the target single data file, and the languages ​​supported by the target single data file.

[0204] It can be seen that the data processing method provided by the second embodiment of the present application, after obtaining the first structural data of each language version set for the first attribute information, integrates the first structural data to obtain a target single data file storing the data content of each language version, and generates a target data information description file including the index paths of the first attribute information of each language version in the target single data file. In this way, by integrating multi-language data content with a small modification to the traditional import process, a target single data file and a target data information description file are obtained. On the one hand, the cost of code transformation in the traditional data separation method is reduced, and on the other hand, redundant data is compressed by generating a target single data file, thereby reducing memory usage. In addition, the index path of the first attribute information of each language version can be obtained through the generated target data information description file, thereby supporting the switching of multiple languages.

[0205] In an optional specific implementation, step S702 may include the following steps S7021 and S7022:

[0206] Step S7021: comparing the first structure data to see if they are consistent, and obtaining a comparison result;

[0207] Step S7022: Generate a target single data file and a target data information description file corresponding to the first attribute information according to the comparison result.

[0208] In the embodiment of the present application, the data contents in each first structure data may be compared to see whether they are consistent. Specifically, the above step S7021 refers to: comparing the first structure data corresponding to each language version and belonging to the first attribute information element by element to obtain a comparison result.

[0209] It should be noted that for the same attribute information, the first structure data corresponding to different language versions may be consistent. For example, a data table of a certain language version is currently localized content. After iteration, the localized content is split and removed, and it will be converted into non-localized content. In this way, the embodiment of the present application can flexibly support the free conversion of localized content and non-localized content, and flexibly generate data content storing the first attribute information of each language version through comparison results.

[0210] Optionally, the above step S7022 may include the following two implementation methods:

[0211] Implementation method 1: if the comparison result is that the first structure data are consistent, a target single data file storing common data and a target data information description file are generated;

[0212] The target data information description file is used to indicate that the first attribute information corresponding to each language is the common data stored in the target single data file.

[0213] When the first structural data of the first attribute information of each language version are consistent, it indicates that the first attribute information of each language version is non-localized data. A common data file (common_data) can be used to store common data (that is, non-localized data). The common data file is the target single data file, and the calling interface of each language for the first attribute information points to the common_data reference.

[0214] When the first data of the first attribute information of each language version are consistent, a single data file for storing common data is generated. In this way, the actual storage, loading and reading of the first attribute information of each language version only uses a single common_data data copy, effectively reducing redundant data storage.

[0215] Implementation method 2: if the comparison result shows that the first structure data are inconsistent, the first structure data corresponding to each language is exported into a target single data file using different language variables, and a target data information description file is generated;

[0216] The target data information description file is used to indicate the storage location of the first attribute information corresponding to each language in the target single data file.

[0217] When the first structural data of the first attribute information of each language version are inconsistent, it indicates that the first attribute information of each language version contains differentiated localized data. The data content corresponding to the first attribute information of each language version can be exported one by one to the target single data file and stored in different language variables. The calling interface of each language for the first attribute information points to the respective language variable in the target single data file.

[0218] When the first structural data of the first attribute information of each language version are inconsistent, a single data file is generated with data contents corresponding to the first attribute information of each language version stored in different language variables. In this way, when data is called, the corresponding data contents can be indexed from the target single data file through the respective language variables.

[0219] In an optional specific implementation, when generating a target single data file corresponding to the first attribute information according to each of the first structural data, the target single data file corresponding to the first attribute information can be generated according to the configured import parameters and each of the first structural data.

[0220] Specifically, the import parameter includes one of a parameter for characterizing a full import and a parameter for characterizing an incremental import. When the import parameter is a parameter characterizing a full import, all the first structural data of each attribute information of each language version are loaded, and all the first structural data of the first attribute information of each language version are screened out, that is, the first structural data of the first attribute information of each language version to be processed, and the first structural data of the first attribute information of each language version are preset; when the import parameter is a parameter characterizing an incremental import, the incremental first structural data of each attribute information of each language version in the current incremental period (such as the last 24 hours, or the last 12 hours) is loaded, and the incremental first structural data of the first attribute information of each language version are screened out, that is, the first structural data of the first attribute information of each language version to be processed, and the first structural data of the first attribute information of each language version are preset.

[0221] The preset processing includes comparing the first structure data to see if they are consistent to obtain the comparison result, and generating the target single data file in different ways under different comparison results (consistent or inconsistent), and generating the corresponding target data information description file accordingly. Here, generating the target single data file in different ways under different comparison results includes the above-mentioned implementation method 1 or implementation method 2.

[0222] like Fig.10, which is a flowchart of generating a single data file and a data information description file for each attribute information in the data processing method provided in an embodiment of the present application, including steps S801 to S809.

[0223] Step S801: Update the code to obtain the latest data;

[0224] Step S802: judging whether to import the entire data according to the import parameters;

[0225] If the full amount is imported in step S802, step S805 is executed: all first structure data of each attribute information of each language version are loaded to obtain data to be processed;

[0226] If step S802 is incremental import, execute step S803 and step S804. Step S803: Scan the incremental first structure data of each attribute information of each language version in the current incremental cycle; Step S804: Load the incremental first structure data of each attribute information of each language version to obtain the data to be processed;

[0227] After step S805 and step S804 are completed, step S806 is executed: for each first structure data in each language of the same attribute information in the data to be processed, it is determined whether each first structure data is consistent;

[0228] If the result of the determination in step S806 is yes, execute step S807: merge all language data into common_data (i.e., a single data file), and each language references the common_data;

[0229] If the determination result of step S806 is no, step S808 is executed: exporting each first structure data of each language into a single data file one by one with different language variables;

[0230] After step S807 and step S808 are completed, step S809 is executed: a single data file of each attribute information is obtained, and a corresponding data information description file is generated.

[0231] It should be noted that for each attribute information in the first application, a corresponding single data file and data information description file can be generated, so that when a certain attribute information is called, the index path corresponding to the current local language can be obtained from the corresponding data information description file through the corresponding proxy class, thereby establishing a reference pointer pointing to the index path corresponding to the current local language, and loading the data content of the corresponding language from the corresponding single data file.

[0232] The data processing method provided in the embodiment of the present application has the following advantages:

[0233] Through the data processing method provided in the second embodiment of the present application, a single data file integrating multi-language data information and a corresponding data information description file can be generated for each attribute information with only a small modification to the traditional import process. In the data reading and loading of the program client, through the data processing method provided in the second embodiment of the present application, the data tables in different languages ​​are indexed and loaded through the underlying conversion into the form of a proxy without modifying the business program called upstream. In addition, when the local language is switched, by clearing the reference pointer pointing to the index path of the old language in the proxy class and re-establishing the reference pointer pointing to the index path of the new language, the mapping relationship of the language can be modified in time, thereby ensuring that the data called when the language is switched can be replaced with the correct data in time, and when the data is hot updated, by calling the updated data from a single data file, the updated data can be guaranteed to take effect in time.

[0234] In addition, the data processing method provided in the embodiment of the present application greatly improves the efficiency of data loading and reduces memory usage. In the second embodiment of the present application, for an attribute information, when the data content in different languages ​​is the same, it will be aggregated into common_data, so that data in multiple languages ​​can share a data storage and reading. In the first embodiment of the present application, the corresponding data is dynamically loaded according to the local language parameters, which can avoid the jamming caused by loading the full amount of data.

[0235] Corresponding to the data processing method provided in the first embodiment of the present application, the third embodiment of the present application further provides a data processing device, such as Fig.11 As shown, the data processing device 1100 includes:

[0236] The calling unit 1101 is configured to call a first proxy class corresponding to the first attribute information in response to a first data loading request of the first attribute information in the first application;

[0237] An acquisition unit 1102 is used to acquire a first language parameter corresponding to the local area;

[0238] An establishing unit 1103 is configured to establish a first reference pointer pointing to a first index path in the first proxy class, wherein the first index path is an index path of the first attribute information of a first language version, and the first language is a language represented by the first language parameter;

[0239] The loading unit 1104 is used to load the data content of the first attribute information of the first language version from a pre-generated target single data file corresponding to the first attribute information based on the first reference pointer.

[0240] Optionally, the calling unit 1101 is specifically used for:

[0241] Detecting whether a first proxy class corresponding to the first attribute information has been generated in the first application, and obtaining a detection result;

[0242] If the detection result is that the first proxy class has been generated in the first application, the first proxy class is called.

[0243] Optionally, the calling unit 1101 is further used for:

[0244] If the first proxy class is not called, a first proxy class corresponding to the first attribute information is generated according to a pre-generated target data information description file corresponding to the first attribute information.

[0245] Optionally, the calling unit 1101 is further specifically configured to:

[0246] Loading a pre-generated target data information description file corresponding to the first attribute information, wherein the target data information description file includes a target data identifier and index paths of the first attribute information of each language version in the target single data file, and the target data identifier includes at least one of a target data table name and a target dimension variable;

[0247] According to the target data identifier, creating a first proxy class corresponding to the first attribute information, wherein the first proxy class declares the target data identifier;

[0248] According to each of the index paths, an index path at least including the first index path is loaded in the first proxy class to obtain the first proxy class having loading information.

[0249] Optionally, the calling unit 1101 is further specifically configured to:

[0250] Get loading configuration parameters;

[0251] If the loading configuration parameter is a first parameter indicating an index path for loading the current local language, loading the first index path of the first attribute information of the first language version in the first proxy class;

[0252] If the loading configuration parameter is a second parameter indicating to load index paths of all languages, each of the index paths is loaded in the first proxy class.

[0253] Optionally, the establishing unit 1103 is specifically configured to:

[0254] Obtain the index path loaded by the first proxy class;

[0255] If the index paths loaded by the first proxy class include the first index path, a first reference pointer pointing to the first index path is established in the first proxy class.

[0256] Optionally, the establishing unit 1103 is further configured to:

[0257] If the index path loaded by the first proxy class does not include the first index path, loading the first index path recorded in the target data information description file corresponding to the first attribute information;

[0258] A first reference pointer pointing to the first index path is established in the first proxy class.

[0259] Optionally, the first application includes a generated second proxy class, the second proxy class declares a data identifier of corresponding attribute information, and the data identifier includes at least one of a data table name and a dimension variable; the calling unit 1101 is further specifically used to:

[0260] From the second proxy class, searching whether there is a first proxy class that declares a target data identifier corresponding to the first attribute information, where the target data identifier includes at least one of a target data table name and a target dimension variable;

[0261] If so, a detection result is obtained indicating that the first proxy class has been generated in the first application.

[0262] Optionally, the data processing device 1100 further includes an updating unit, and the updating unit is configured to:

[0263] In response to the language switching instruction, updating the second language parameters corresponding to the local area to the first language parameters;

[0264] The first language parameter is persisted so that a local application is configured using the first language represented by the first language parameter.

[0265] Optionally, the data processing device 1100 further includes a clearing unit, and the clearing unit is used to:

[0266] Determine a generated second proxy class corresponding to the first application;

[0267] A reference pointer pointing to an index path corresponding to a second language established in the second proxy class is cleared, wherein the second language is a language represented by the second language parameter.

[0268] Optionally, the data content of the first attribute information of the first language version is the first code content in the target single data file; the loading unit 1104 is further used for:

[0269] During the running of the first application, in response to the first code content corresponding to the first attribute information being updated to the second code content, if the second code content is non-localized content, loading the target single data file corresponding to the first attribute information to obtain a copy file;

[0270] Updating the first code content in the data content corresponding to each language in the copy file to the second code content;

[0271] In response to a second data loading request of the first attribute information, the second code content is loaded from the copy file through the first proxy class.

[0272] Optionally, the first application includes multiple attribute information, and single data files corresponding to different attribute information are respectively stored in different data slices, the target single data file is stored in a target data slice, and the first proxy class has a communication connection with the target data slice; the loading unit 1104 is further specifically used for:

[0273] The data content corresponding to the first attribute information in the first language is loaded from the target single data file stored in the target data slice through the first proxy class.

[0274] Corresponding to the data processing method provided in the second embodiment of the present application, the fourth embodiment of the present application further provides a data processing device, such as Fig.12 As shown, the data processing device 1200 includes:

[0275] A determining unit 1201 is used to determine first structure data corresponding to each language version configured for the first attribute information in the first application;

[0276] A generating unit 1202, configured to generate a target single data file and a target data information description file corresponding to the first attribute information according to each of the first structure data;

[0277] The target single data file stores data contents of the first attribute information of each language version, and the target data information description file includes index paths of the first attribute information of each language version in the target single data file.

[0278] Optionally, the determining unit 1201 is specifically configured to:

[0279] Acquire respective second structure data corresponding to respective language versions configured for the first attribute information;

[0280] According to a preset data conversion rule, each of the second structure data is processed into each of the first structure data.

[0281] Optionally, the generating unit 1202 is specifically configured to:

[0282] Comparing whether the first structure data are consistent with each other to obtain a comparison result;

[0283] According to the comparison result, a target single data file and a target data information description file corresponding to the first attribute information are generated.

[0284] Optionally, the generating unit 1202 is specifically configured to:

[0285] If the comparison result is that the first structure data are consistent, generating a target single data file storing common data and a target data information description file;

[0286] The target data information description file is used to indicate that the first attribute information corresponding to each language is the common data stored in the target single data file.

[0287] Optionally, the generating unit 1202 is specifically configured to:

[0288] If the comparison result shows that the first structure data are inconsistent, the first structure data corresponding to each language is exported into a target single data file using different language variables, and a target data information description file is generated;

[0289] The target data information description file is used to indicate the storage location of the first attribute information corresponding to each language in the target single data file.

[0290] Corresponding to the data processing method provided in the first embodiment of the present application or the data processing method provided in the second embodiment of the present application, the fifth embodiment of the present application also provides an electronic device for data processing.

[0291] like Fig.13 , which is a structural block diagram of an example of an electronic device for data processing provided in an embodiment of the present application.

[0292] In this embodiment, an optional hardware structure of the electronic device 1300 can be as follows: Fig.13 As shown, it includes: at least one processor 1301, at least one memory 1302 and at least one communication bus 1305; the memory 1302 contains a program 1303 and data 1304.

[0293] The bus 1305 may be a communication device for transmitting data between components inside the electronic device 1300, such as an internal bus (e.g., a CPU-memory bus, where the processor is a central processing unit, or CPU for short), an external bus (e.g., a universal serial bus port, a peripheral component interconnect express port), etc.

[0294] In addition, the electronic device also includes: at least one network interface 1306, at least one peripheral interface 1307. The network interface 1306 provides wired or wireless communication related to an external network 1308 (for example, the Internet, an intranet, a local area network, a mobile communication network, etc.); in some embodiments, the network interface 1306 may include any number of network interface controllers (NICs), radio frequency (RF) modules, repeaters, transceivers, modems, routers, gateways, any combination of wired network adapters, wireless network adapters, Bluetooth adapters, infrared adapters, near field communication (NFC) adapters, cellular network chips, etc.

[0295] The peripheral interface 1307 is used to connect to the peripheral device, and the peripheral device can be the peripheral device 1 ( Fig.13 1309 in), peripheral 2 ( Fig.13 1310) and peripheral 3 ( Fig.13 1311 in the figure). Peripherals are peripheral devices, which may include but are not limited to cursor control devices (such as mice, touch pads or touch screens), keyboards, displays (such as cathode ray tube displays, liquid crystal displays). Displays or light emitting diode displays, video input devices (such as cameras or communication interfaces coupled to video files), etc.

[0296] The processor 1301 may be a CPU, or an application specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0297] The memory 1302 may include a high-speed RAM (full name: Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.

[0298] The processor 1301 calls the program and data stored in the memory 1302 and executes the following steps:

[0299] In response to a first data loading request for first attribute information in a first application, calling a first proxy class corresponding to the first attribute information;

[0300] Get the first language parameters corresponding to the locale;

[0301] Establishing a first reference pointer pointing to a first index path in the first proxy class, wherein the first index path is an index path of the first attribute information of a first language version, and the first language is a language represented by the first language parameter;

[0302] Based on the first reference pointer, load the data content of the first attribute information of the first language version from a pre-generated target single data file corresponding to the first attribute information; or

[0303] Determine first structure data corresponding to each language version configured for the first attribute information in the first application;

[0304] Generate a target single data file and a target data information description file corresponding to the first attribute information according to each of the first structure data;

[0305] The target single data file stores data contents of the first attribute information of each language version, and the target data information description file includes index paths of the first attribute information of each language version in the target single data file.

[0306] Corresponding to the data processing method provided in the first embodiment of the present application or the data processing method provided in the second embodiment of the present application, the sixth embodiment of the present application provides a computer-readable storage medium, which stores a program of the data processing method provided in the first embodiment of the present application or the data processing method provided in the second embodiment of the present application, and the program is executed by a processor to perform the following steps:

[0307] In response to a first data loading request for first attribute information in a first application, calling a first proxy class corresponding to the first attribute information;

[0308] Get the first language parameters corresponding to the locale;

[0309] Establishing a first reference pointer pointing to a first index path in the first proxy class, wherein the first index path is an index path of the first attribute information of a first language version, and the first language is a language represented by the first language parameter;

[0310] Based on the first reference pointer, load the data content of the first attribute information of the first language version from a pre-generated target single data file corresponding to the first attribute information; or

[0311] Determine first structure data corresponding to each language version configured for the first attribute information in the first application;

[0312] Generate a target single data file and a target data information description file corresponding to the first attribute information according to each of the first structure data;

[0313] The target single data file stores data contents of the first attribute information of each language version, and the target data information description file includes index paths of the first attribute information of each language version in the target single data file.

[0314] It should be noted that for the detailed description of the methods, devices, electronic devices and computer-readable storage media provided in the second, third, fourth, fifth and sixth embodiments of the present application, reference can be made to the relevant description of the first embodiment of the present application and will not be repeated here.

[0315] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

[0316] In a typical configuration, a node device in a blockchain includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0317] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0318] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), random access memory (RAM) of other attributes, read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage media or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0319] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0320] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

Claims

1. A data processing method, characterized in that: The method comprises: In response to a first data loading request for first attribute information in a first application, calling a first proxy class corresponding to the first attribute information; Get the first language parameters corresponding to the locale; Establishing a first reference pointer pointing to a first index path in the first proxy class, wherein the first index path is an index path of the first attribute information of a first language version, and the first language is a language represented by the first language parameter; Based on the first reference pointer, data content of the first attribute information of the first language version is loaded from a pre-generated target single data file corresponding to the first attribute information.

2. The method according to claim 1, characterized in that The calling of the first proxy class corresponding to the first attribute information includes: Detecting whether a first proxy class corresponding to the first attribute information has been generated in the first application, and obtaining a detection result; If the detection result is that the first proxy class has been generated in the first application, the first proxy class is called.

3. The method according to claim 1, characterized in that Before obtaining the first language parameter corresponding to the local area, the method further includes: If the first proxy class is not called, a first proxy class corresponding to the first attribute information is generated according to a pre-generated target data information description file corresponding to the first attribute information.

4. The method according to claim 3, characterized in that: The step of generating a first proxy class corresponding to the first attribute information according to a pre-generated target data information description file corresponding to the first attribute information includes: Loading a pre-generated target data information description file corresponding to the first attribute information, wherein the target data information description file includes a target data identifier and index paths of the first attribute information of each language version in the target single data file, and the target data identifier includes at least one of a target data table name and a target dimension variable; According to the target data identifier, creating a first proxy class corresponding to the first attribute information, wherein the first proxy class declares the target data identifier; According to each of the index paths, an index path at least including the first index path is loaded in the first proxy class to obtain the first proxy class having loading information.

5. The method according to claim 4, characterized in that The loading of the index path including at least the first index path in the first proxy class comprises: Get loading configuration parameters; If the loading configuration parameter is a first parameter indicating an index path for loading the current local language, loading the first index path of the first attribute information of the first language version in the first proxy class; If the loading configuration parameter is a second parameter indicating to load index paths of all languages, each of the index paths is loaded in the first proxy class.

6. The method according to claim 1, characterized in that The step of establishing a first reference pointer pointing to the first index path in the first proxy class includes: Obtain the index path loaded by the first proxy class; If the index paths loaded by the first proxy class include the first index path, a first reference pointer pointing to the first index path is established in the first proxy class.

7. The method according to claim 6, characterized in that The method further comprises: If the index path loaded by the first proxy class does not include the first index path, loading the first index path recorded in the target data information description file corresponding to the first attribute information; A first reference pointer pointing to the first index path is established in the first proxy class.

8. The method according to claim 2, characterized in that: The first application includes a generated second proxy class, the second proxy class declares a data identifier of corresponding attribute information, and the data identifier includes at least one of a data table name and a dimension variable; The detecting whether the first proxy class corresponding to the first attribute information has been generated in the first application to obtain the detection result includes: From the second proxy class, searching whether there is a first proxy class that declares a target data identifier corresponding to the first attribute information, where the target data identifier includes at least one of a target data table name and a target dimension variable; If so, a detection result is obtained indicating that the first proxy class has been generated in the first application.

9. The method according to claim 1, characterized in that: Before obtaining the first language parameter corresponding to the local area, the method further includes: In response to the language switching instruction, updating the second language parameters corresponding to the local area to the first language parameters; The first language parameter is persisted so that a local application is configured using the first language represented by the first language parameter.

10. The method according to claim 9, characterized in that The method further comprises: Determine a generated second proxy class corresponding to the first application; A reference pointer pointing to an index path corresponding to a second language established in the second proxy class is cleared, wherein the second language is a language represented by the second language parameter.

11. The method according to claim 1, characterized in that: The data content of the first attribute information of the first language version is the first code content in the target single data file; The method further comprises: During the running of the first application, in response to the first code content corresponding to the first attribute information being updated to the second code content, if the second code content is non-localized content, loading the target single data file corresponding to the first attribute information to obtain a copy file; Updating the first code content in the data content corresponding to each language in the copy file to the second code content; In response to a second data loading request of the first attribute information, the second code content is loaded from the copy file through the first proxy class.

12. The method according to claim 1, characterized in that The first application includes a plurality of attribute information, and single data files corresponding to different attribute information are respectively stored in different data slices, the target single data file is stored in a target data slice, and the first proxy class has a communication connection with the target data slice; The step of loading the data content corresponding to the first attribute information in the first language from a pre-generated target single data file corresponding to the first attribute information through the first proxy class includes: The data content corresponding to the first attribute information in the first language is loaded from the target single data file stored in the target data slice through the first proxy class.

13. A data processing method, characterized in that: The method comprises: Determine first structure data corresponding to each language version configured for the first attribute information in the first application; Generate a target single data file and a target data information description file corresponding to the first attribute information according to each of the first structure data; The target single data file stores data contents of the first attribute information of each language version, and the target data information description file includes index paths of the first attribute information of each language version in the target single data file.

14. The method according to claim 13, characterized in that The determining of the first structure data corresponding to the language versions configured for the first attribute information in the first application includes: Acquire respective second structure data corresponding to respective language versions configured for the first attribute information; According to a preset data conversion rule, each of the second structure data is processed into each of the first structure data.

15. The method according to claim 13, characterized in that The step of generating a target single data file and a target data information description file corresponding to the first attribute information according to each of the first structure data includes: Comparing whether the first structure data are consistent with each other to obtain a comparison result; According to the comparison result, a target single data file and a target data information description file corresponding to the first attribute information are generated.

16. The method according to claim 15, characterized in that Generating a target single data file and a target data information description file corresponding to the first attribute information according to the comparison result includes: If the comparison result is that the first structure data are consistent, generating a target single data file storing common data and a target data information description file; The target data information description file is used to indicate that the first attribute information corresponding to each language is the common data stored in the target single data file.

17. The method according to claim 15, characterized in that The generating of a target single data file and a target data information description file according to the comparison result includes: If the comparison result shows that the first structure data are inconsistent, the first structure data corresponding to each language is exported into a target single data file using different language variables, and a target data information description file is generated; The target data information description file is used to indicate the storage location of the first attribute information corresponding to each language in the target single data file.

18. A data processing device, characterized in that: The device comprises: A calling unit, configured to call a first proxy class corresponding to the first attribute information in response to a first data loading request of the first attribute information in the first application; An acquisition unit, used to acquire a first language parameter corresponding to the local area; an establishing unit, configured to establish, in the first proxy class, a first reference pointer pointing to a first index path, wherein the first index path is an index path of the first attribute information of a first language version, and the first language is a language represented by the first language parameter; A loading unit is used to load the data content of the first attribute information of the first language version from a pre-generated target single data file corresponding to the first attribute information based on the first reference pointer.

19. A data processing device, characterized in that: The device comprises: A determination unit, configured to determine first structure data corresponding to respective language versions configured for the first attribute information in the first application; A generating unit, configured to generate a target single data file and a target data information description file corresponding to the first attribute information according to each of the first structure data; The target single data file stores data contents of the first attribute information of each language version, and the target data information description file includes index paths of the first attribute information of each language version in the target single data file.

20. An electronic device, characterized in that: include: processor; as well as The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method as described in any one of claims 1-12 or 13-17 is executed.

21. A computer-readable storage medium, characterized in that: A data processing program is stored, and the program is run by a processor to execute the method according to any one of claims 1 to 12 or 13 to 17.

Citation Information

Patent Citations

  • Multi-language information providing method and device, multi-language information configuration method and device, equipment and medium

    CN110597595A

  • Program running method and device, electronic equipment and storage medium

    CN113918214A

  • Multi-language switching method, component, medium and equipment under front-end and back-end separation architecture

    CN114168246A

  • Language information conversion method and device

    CN114416094A

  • Language switching method and device of software, electronic equipment and computer readable medium

    CN115061768A

Cited By

  • Relay protection device interface language switching method and system based on hot loading mechanism

    CN120631324A