Enumeration data processing method and device, electronic equipment and storage medium

By storing enumeration data as a global variable on the client side, the problem of high resource consumption and low efficiency in loading enumeration data is solved, enabling efficient retrieval and updating of enumeration data, thus improving user experience and system performance.

CN120179942BActive Publication Date: 2025-11-04ZHONGJINKE INFORMATION TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510656070.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2025-11-04
Estimated Expiration
2045-05-21

AI Technical Summary

Technical Problem

In existing technologies, the process of loading enumeration data consumes a lot of resources and is inefficient. Especially when the data volume is large or the network environment is poor, frequent retrieval of enumeration data from the server leads to waste of network resources and reduced efficiency.

Method used

On the client side, the enumeration data file is stored as a global variable. The enumeration data for the target application scenario is obtained by accessing the enumeration object file, reducing the frequency of fetching from the server. Preset tags and scheduled tasks are used to update the enumeration data.

Benefits of technology

It improves the processing efficiency of enumerated data, saves network resources, reduces server load, and enhances user experience and data consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120179942B_ABST
    Figure CN120179942B_ABST
Patent Text Reader

Abstract

The application discloses a processing method and device of enumeration data, electronic equipment and storage medium. The method is applied to a client, and comprises the following steps: in response to receiving an acquisition request of enumeration data input by a user, obtaining an enumeration data file from a web server, wherein the enumeration data file contains enumeration data corresponding to at least one application scenario; storing the enumeration data file into a global variable to obtain an enumeration object file, wherein different enumeration objects in the enumeration object file are used to access enumeration data corresponding to different application scenarios; based on a target application scenario corresponding to the acquisition request, accessing an enumeration object corresponding to the target application scenario in the enumeration object file to acquire enumeration data corresponding to the target application scenario. The application solves the technical problems of large resource consumption and low processing efficiency in the related art when processing enumeration data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of Internet technology and data processing, and more specifically, to a method, apparatus, electronic device, and storage medium for processing enumerated data. Background Technology

[0002] In modern web applications, enumerated data is widely used in dropdown menus, radio buttons, and other scenarios in web interfaces to provide predefined lists of options, thereby improving user convenience. Efficient loading and display of enumerated data is a crucial factor in ensuring user interface responsiveness and data consistency.

[0003] In existing technologies, when loading enumeration data, the client needs to retrieve it from the server. This process consumes network bandwidth, especially when the amount of enumeration data is large or the network environment is poor, which increases the server's processing burden. Furthermore, when frequently accessing the same network interface within a short period of time, repeatedly retrieving duplicate enumeration data from the server leads to reduced retrieval efficiency and wastes network resources.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] The present invention provides a method, apparatus, electronic device and storage medium for processing enumeration data, so as to at least solve the technical problems of high resource consumption and low processing efficiency when processing enumeration data in related technologies.

[0006] According to one aspect of the present invention, a method for processing enumeration data is provided, applied to a client, comprising: in response to receiving a user-input request for obtaining enumeration data, obtaining an enumeration data file from a web server, wherein the enumeration data file contains enumeration data corresponding to at least one application scenario; storing the enumeration data file in a global variable to obtain an enumeration object file, wherein different enumeration objects in the enumeration object file are used to access enumeration data corresponding to different application scenarios; and based on the target application scenario corresponding to the request, accessing the enumeration object in the enumeration object file corresponding to the target application scenario to obtain the enumeration data corresponding to the target application scenario.

[0007] Optionally, in response to receiving a request to retrieve enumeration data from a user, retrieving the enumeration data file from the web server includes: retrieving the enumeration data file from the local directory of the web server using a preset tag based on the retrieval request.

[0008] Optionally, the above method further includes: in response to a change in the enumeration data, sending a file retrieval request to a web server, wherein the file retrieval request carries a preset field; receiving a response returned by the web server based on the preset field, wherein the response contains the updated enumeration data file; and storing the updated enumeration data file in a global variable.

[0009] Optionally, the updated enumeration data file is generated by the generation server based on the updated enumeration data, and the updated enumeration data is obtained by the update server updating the enumeration data.

[0010] Optionally, the enumeration data file is retrieved from the file server by the web server based on a preset scheduled task and stored in the local directory of the web server.

[0011] Optionally, the enumeration data file is generated by the production server and sent to the file server based on a preset protocol.

[0012] According to another aspect of the present invention, an enumeration data processing apparatus is also provided, comprising: a first acquisition module, configured to acquire an enumeration data file from a web server in response to receiving an enumeration data acquisition request input by a user, wherein the enumeration data file contains enumeration data corresponding to at least one application scenario; a storage module, configured to store the enumeration data file in a global variable to obtain an enumeration object file, wherein different enumeration objects in the enumeration object file are used to access enumeration data corresponding to different application scenarios; and a second acquisition module, configured to access the enumeration object in the enumeration object file corresponding to the target application scenario based on the target application scenario corresponding to the acquisition request, to acquire the enumeration data corresponding to the target application scenario.

[0013] According to another aspect of the present invention, an electronic device is also provided, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods of various embodiments of the present invention during runtime.

[0014] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is executed, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of the present invention.

[0015] According to another aspect of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements the methods of various embodiments of the present invention.

[0016] According to another aspect of the present invention, a computer program product is also provided, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods of various embodiments of the present invention.

[0017] According to another aspect of the present invention, a computer program is also provided, which, when executed by a processor, implements the methods of the various embodiments of the present invention.

[0018] In this embodiment of the invention, in response to receiving a user-input request to retrieve enumeration data, an enumeration data file is retrieved from a web server. The enumeration data file contains enumeration data corresponding to at least one application scenario. The enumeration data file is stored in a global variable to obtain an enumeration object file. Different enumeration objects in the enumeration object file are used to access enumeration data corresponding to different application scenarios. Based on the target application scenario corresponding to the retrieval request, the enumeration object in the enumeration object file corresponding to the target application scenario is accessed to retrieve the enumeration data corresponding to the target application scenario. It is noteworthy that by storing the enumeration data file as a global variable, and by pre-storing the enumeration object file, enumeration data can be quickly accessed by accessing the enumeration object file, eliminating the need for frequent retrieval from the server. This achieves the goal of efficiently retrieving enumeration data, thereby improving the efficiency of processing enumeration data and saving network resources. This solves the technical problems of high resource consumption and low processing efficiency when processing enumeration data in related technologies. Attached Figure Description

[0019] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0020] Figure 1 This is a flowchart of a method for processing enumerated data according to an embodiment of the present invention;

[0021] Figure 2 This is a schematic diagram of an optional enumeration data processing system according to an embodiment of the present invention;

[0022] Figure 3 This is a schematic diagram of an enumeration data processing device according to an embodiment of the present invention. Detailed Implementation

[0023] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0025] According to an embodiment of the present invention, an embodiment of a method for processing enumerated data is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0026] Figure 1 This is a flowchart of a method for processing enumerated data according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:

[0027] Step S102: In response to receiving a request from the user to obtain enumeration data, obtain the enumeration data file from the web server.

[0028] The enumeration data file contains enumeration data corresponding to at least one application scenario.

[0029] The enumerated data mentioned above can be a set of preset option values ​​in a webpage. In web applications, enumerated data is often used in user interface elements such as dropdown menus and option boxes to provide clear and limited options for users to choose from. The enumerated data type can be gender, province, age, etc.; the type of enumerated data is not limited here and can be determined as needed. In web pages, enumerated data is usually fixed and does not change with page refreshes, so it can be pre-loaded to save page refresh time and improve the user experience. Using enumerated data can ensure the consistency and correctness of data used in web applications, avoiding input errors or non-standard data. Enumerated data can also provide options on the front-end interface, simplifying user input and providing a clear list of options. Furthermore, enumerated data can simplify conditional judgments in back-end processing logic, improving code readability and maintainability.

[0030] The aforementioned retrieval request can be used to represent an instruction to retrieve enumeration data. Retrieval requests can include, but are not limited to, network addresses, web pages, query parameters, type identifiers, etc. There are no restrictions on the retrieval request here; it can be determined as needed. In network applications, the retrieval request can be initiated by the client to the web server. After receiving the retrieval request, the web server can return enumeration data or an enumeration data file to the client and store the enumeration data file in a global variable. When enumeration data is needed, this global variable can be accessed directly, eliminating the need to repeatedly return enumeration data and reducing resource overhead. After the enumeration data changes, the retrieval request can be used to request the updated enumeration data, reducing resource consumption, lowering network latency and server resource consumption, while maintaining the real-time nature and accuracy of the client's data.

[0031] The aforementioned web server can handle client requests and return enumeration data files. The web server can cache and return static resources, such as enumeration data files, web pages, and cascading style sheets, to reduce requests to the file server, thereby improving response speed and reducing network latency. The web server can also handle dynamic content; for example, it can generate dynamic responses through interaction with the backend application server or through scripts. Caching the enumeration data file on the web server allows clients to retrieve the enumeration data more quickly when needed.

[0032] The aforementioned enumeration data file can contain enumeration data corresponding to at least one application scenario. The application scenario can be a dropdown list or selector, or it can be a multi-page application. The enumeration data file can contain the type of enumeration data and its corresponding enumeration values; the content of the enumeration data file is not limited here and can be determined as needed. Using enumeration data files facilitates the effective use of enumeration data and allows for quick and efficient provision to the front-end without direct database access. Enumeration data files also allow for the persistence of enumeration data on the client side, avoiding requests to the web server every time a page loads, thereby improving page loading speed and reducing the burden on the web server and network traffic. Furthermore, enumeration data files facilitate unified updating and recording of enumeration data.

[0033] In one alternative embodiment, a listener can detect and trigger a request to retrieve the enumeration data. After receiving the user's input request to retrieve the enumeration data, the client can initiate an asynchronous request to the web server's API interface to request the enumeration data file.

[0034] In another alternative embodiment, after receiving the request, the client can connect to the web server via Hypertext Transfer Protocol or File Transfer Protocol to obtain the enumeration data file from the web server.

[0035] In another alternative embodiment, after receiving the retrieval request, the client can connect to the web server via a network socket and forward the retrieval request to the web server. The web server parses the retrieval request and returns the enumeration data file, thereby obtaining the enumeration data file.

[0036] Step S104: Store the enumeration data file in a global variable to obtain the enumeration object file.

[0037] Among them, different enumeration objects in the enumeration object file are used to access enumeration data corresponding to different application scenarios.

[0038] The global variables mentioned above can be variables that can be shared and accessed by different pages, components, or scripts. Global variables can be defined in the top-level scope. Using global variables, enumeration data files can be stored and accessed uniformly, eliminating the need for repeated requests in various pages or components, thus speeding up page loading and improving user experience. Global variables also simplify the process of retrieving enumeration data, avoiding the need to repeatedly write code to retrieve enumeration data, which is beneficial for code maintenance and expansion.

[0039] The enumeration object file mentioned above is a global file, which can be obtained by storing the enumeration data file into global variables, avoiding the consumption of frequent network requests and data loading time. The enumeration object file can be used to store and distribute static data files of enumeration data, which can reduce the number of interactions and communication volume between the client and the web server, and improve application performance and response speed.

[0040] In one alternative embodiment, the enumeration data file can be assigned to a global variable to obtain an enumeration object file. Alternatively, a global dictionary can be used to store the enumeration data file, implementing key-value storage and facilitating subsequent access to the required enumeration data from the enumeration object file. Alternatively, a global list can be used to store the enumeration data file. Alternatively, the enumeration data file can be stored through a global class, via a class attribute.

[0041] Step S106: Based on the target application scenario corresponding to the acquisition request, access the enumeration object in the enumeration object file that corresponds to the target application scenario to obtain the enumeration data corresponding to the target application scenario.

[0042] The target application scenarios mentioned above can be any scenarios that require the use of enumerated data. For example, target application scenarios could include enumeration selectors, enumeration value translation, etc. There are no limitations on the target application scenarios here; they can be determined as needed. Using enumerated data in target application scenarios can improve the user interface's friendliness, data standardization, and system performance, while also simplifying the interface with the server and reducing maintenance workload.

[0043] In one optional embodiment, the target application scenario can be determined by obtaining the scenario identifier carried in the request, and the corresponding enumeration object can be queried from the enumeration object file based on the scenario identifier. The enumeration data accessed through the attributes of the enumeration object is the enumeration data corresponding to the target application scenario.

[0044] In another alternative embodiment, enumeration data can be obtained through an enumeration data acquisition module in a web server. The enumeration data acquisition module may include a state management library. This module can access an enumeration object file, compare the target application scenario with the application scenarios in the enumeration object file, and obtain the enumeration data corresponding to the successful comparison application scenario from the corresponding enumeration object; this is the enumeration data corresponding to the target application scenario.

[0045] In another alternative embodiment, an event-driven or reactive programming framework can be used to listen for events in the target application scenario, thereby triggering the retrieval of the enumeration object corresponding to that target application scenario. By listening, user retrieval requests can be responded to quickly, especially in application scenarios that require frequent access to enumeration data, such as product categorization on e-commerce websites and course categorization on online education platforms, which can improve the processing speed of enumeration data and optimize the user experience.

[0046] In this embodiment of the invention, in response to receiving a user-input request to retrieve enumeration data, an enumeration data file is retrieved from a web server. The enumeration data file contains enumeration data corresponding to at least one application scenario. The enumeration data file is stored in a global variable to obtain an enumeration object file. Different enumeration objects in the enumeration object file are used to access enumeration data corresponding to different application scenarios. Based on the target application scenario corresponding to the retrieval request, the enumeration object in the enumeration object file corresponding to the target application scenario is accessed to retrieve the enumeration data corresponding to the target application scenario. It is noteworthy that by storing the enumeration data file as a global variable, and by pre-storing the enumeration object file, enumeration data can be quickly accessed by accessing the enumeration object file, eliminating the need for frequent retrieval from the server. This achieves the goal of efficiently retrieving enumeration data, thereby improving the efficiency of processing enumeration data and saving network resources. This solves the technical problems of high resource consumption and low processing efficiency when processing enumeration data in related technologies.

[0047] Optionally, in response to receiving a request to retrieve enumeration data from a user, retrieving the enumeration data file from the web server includes: retrieving the enumeration data file from the local directory of the web server using a preset tag based on the retrieval request.

[0048] The aforementioned preset tags can be used to retrieve enumeration data files. These preset tags can be anything used to retrieve files. They can be script tags, link tags, etc.; there are no restrictions on the preset tags, and they can be determined as needed. Using preset tags allows for more accurate retrieval of enumeration data files, reducing unnecessary data transfer and further improving data processing efficiency. Preset tags can also be used to preload resources, avoiding blocking page rendering or parsing.

[0049] In one alternative embodiment, the enumeration data file corresponding to the type identifier can be obtained by querying the local directory of the web server using preset tags, based on the type identifier in the retrieval request. Alternatively, the enumeration data file can be loaded asynchronously using preset tags.

[0050] Optionally, the above method further includes: in response to a change in the enumeration data, sending a file retrieval request to a web server, wherein the file retrieval request carries a preset field; receiving a response returned by the web server based on the preset field, wherein the response contains the updated enumeration data file; and storing the updated enumeration data file in a global variable.

[0051] By using preset fields, it can be ensured that the client can receive notifications of enumerated data changes in a timely manner. This is suitable for scenarios that require real-time data synchronization, such as social network status updates and online game leaderboard updates, thus ensuring data consistency between the client and the web server.

[0052] If a change is detected in the enumeration data, the enumeration data file needs to be updated to ensure that the enumeration data is updated synchronously.

[0053] In one alternative embodiment, a file retrieval request can be triggered and sent to the web server by periodically polling or listening for enumeration data change events. The updated enumeration data file is then retrieved using the file retrieval request.

[0054] To conserve network resources, preset fields can be added to the file retrieval request. These preset fields can be generated based on entity tags or timestamps; for example, they could be `If-None-Match` or `If-Modified-Since`. The preset fields are not limited here and can be determined as needed. These preset fields indicate whether the enumeration data has changed. The web server can use the timestamp, status code, etc., of the preset fields to determine whether to return the updated enumeration data file. If the enumeration data has changed, the updated enumeration data file is returned, allowing the client to store it in a global variable. Optionally, a global dictionary, global list, or global class attribute can be used to store the updated enumeration data file.

[0055] Optionally, the updated enumeration data file is generated by the generation server based on the updated enumeration data, and the updated enumeration data is obtained by the update server updating the enumeration data.

[0056] By using a generation server and an update server, the enumeration data update process becomes more efficient, especially in scenarios with large amounts of enumerated data and frequent updates, such as big data analysis and real-time advertising recommendation systems. This can effectively reduce the load on the generation server and improve the timeliness and accuracy of enumeration data updates.

[0057] In one optional embodiment, the enumeration data can be updated via an update server. Optionally, the update server can update the enumeration data via an update request, or it can update the data by sending an update event to a message queue containing the updated enumeration data, so that the generation server, upon receiving an update message, retrieves the updated enumeration data from the message queue and further generates an updated enumeration data file. Alternatively, the enumeration data can be updated in real time via a network callback mechanism.

[0058] Furthermore, in an optional embodiment, the generation server can write the updated enumeration data into an enumeration data file using a pre-defined scripting language to obtain the updated enumeration data file. Alternatively, it can use a template engine to render the updated enumeration data into a template file and further output the enumeration data file based on the template file. Alternatively, the generation server can also connect to a cloud platform to process and generate the enumeration data file using the cloud platform.

[0059] Optionally, the enumeration data file is retrieved from the file server by the web server based on a preset scheduled task and stored in the local directory of the web server.

[0060] By setting up pre-defined scheduled tasks, the regular updates of enumeration data are ensured. This is suitable for application scenarios where the enumeration data update cycle is fixed, such as hot topic updates on news websites and the synchronization of exercise data in health applications, thus ensuring the timeliness and reliability of the enumeration data.

[0061] In one alternative embodiment, a pre-defined scheduled task can be created on the cloud platform to execute the task, enabling the web server to retrieve and store the enumeration data file. Alternatively, an update function can be run based on the pre-defined scheduled task using a pre-configured scheduling library in the web server to retrieve the enumeration data file from the file server.

[0062] Optionally, the enumeration data file is generated by the production server and sent to the file server based on a preset protocol.

[0063] By using production servers, the enumeration data generation process becomes more efficient, especially in scenarios with large amounts of enumeration data, such as big data analysis systems, where the timeliness and accuracy of enumeration data generation can be improved.

[0064] In one alternative embodiment, the production server can write the enumeration data to an enumeration data file using a pre-built scripting language. Alternatively, it can render the enumeration data into a template file using a template engine and then output the enumeration data file based on the template file. Alternatively, the production server can connect to a cloud platform to process and generate the enumeration data file using the cloud platform.

[0065] Furthermore, after generating the enumeration data file, the production server can connect to the file server via File Transfer Protocol (FTP), Hypertext Transfer Protocol (HTTP), or Secure File Transfer Protocol (SLP) to transfer the enumeration data file. The use of preset protocols ensures the security and stability of the enumeration data file transfer, especially in scenarios involving sensitive information, effectively preventing leakage and tampering during transmission and guaranteeing the security of the enumeration data file.

[0066] Figure 2 This is a schematic diagram of an enumeration data processing system according to an embodiment of the present invention, such as... Figure 2 As shown, the system includes: a front-end, a web server, a file server, and a back-end.

[0067] The front-end is used to send requests for retrieving enumeration data input by the user to the network server.

[0068] The web server is used to receive retrieval requests sent by the front end, and also to send file retrieval requests to the file server to retrieve enumerated data files based on the retrieval requests.

[0069] The background is used to modify the enumeration data, generate an enumeration data file after the enumeration data is modified, and send the enumeration data file to the file server.

[0070] According to another aspect of the present invention, an enumeration data processing apparatus is also provided. This apparatus can execute the enumeration data processing method provided in the above embodiments. The specific implementation and preferred application scenarios are the same as those in the above embodiments, and will not be described in detail here.

[0071] Figure 3 This is a schematic diagram of an enumeration data processing apparatus according to an embodiment of the present invention, such as... Figure 3 As shown, the device includes:

[0072] The first acquisition module 32 is used to acquire an enumeration data file from a web server in response to receiving a user input request for enumeration data, wherein the enumeration data file contains enumeration data corresponding to at least one application scenario.

[0073] Storage module 34 is used to store the enumeration data file into a global variable to obtain an enumeration object file. Different enumeration objects in the enumeration object file are used to access enumeration data corresponding to different application scenarios.

[0074] The second acquisition module 36 is used to access the enumeration object in the enumeration object file corresponding to the target application scenario based on the target application scenario corresponding to the acquisition request, so as to obtain the enumeration data corresponding to the target application scenario.

[0075] Optionally, the first acquisition module is also used to acquire an enumeration data file from the local directory of the web server based on the acquisition request and using preset tags.

[0076] Optionally, the above apparatus further includes an update module. The update module is configured to, in response to a change in the enumeration data, send a file retrieval request to the web server, wherein the file retrieval request carries preset fields; receive a response from the web server based on the preset fields, wherein the response contains the updated enumeration data file; and store the updated enumeration data file in a global variable.

[0077] Optionally, the updated enumeration data file is generated by the generation server based on the updated enumeration data, and the updated enumeration data is obtained by the update server updating the enumeration data.

[0078] Optionally, the enumeration data file is retrieved from the file server by the web server based on a preset scheduled task and stored in the local directory of the web server.

[0079] Optionally, the enumeration data file is generated by the production server and sent to the file server based on a preset protocol.

[0080] Embodiments of this application also provide an electronic device, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of the present invention during runtime.

[0081] Embodiments of this application also provide a computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of the present invention.

[0082] Embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the methods of various embodiments of the present invention.

[0083] Embodiments of this application also provide a computer program product, including a non-volatile computer-readable storage medium for storing a computer program that, when executed by a processor, implements the methods in various embodiments of the present invention.

[0084] Embodiments of this application also provide a computer program that, when executed by a processor, implements the methods described in the various embodiments of the present invention.

[0085] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0086] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0087] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0088] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0089] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0090] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0091] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for processing enumerated data, characterized in that, Applied to the client side, including: In response to receiving a user's input request to retrieve enumeration data, an enumeration data file is retrieved from a web server using a preset tag. The enumeration data file contains enumeration data corresponding to at least one application scenario. The preset tag is used to identify the retrieval of the enumeration data file. The preset tag is a script tag or a link tag. The application scenario is a drop-down list, a selector, or a multi-page application. The enumeration data file is stored in a global variable to obtain an enumeration object file, wherein different enumeration objects in the enumeration object file are used to access enumeration data corresponding to different application scenarios; Based on the target application scenario corresponding to the acquisition request, access the enumeration object in the enumeration object file that corresponds to the target application scenario to obtain the enumeration data corresponding to the target application scenario, wherein the target application scenario is an enumeration selector or an enumeration value translation. In response to a change in the enumeration data, a file retrieval request is sent to the web server. The file retrieval request carries a preset field, which is used to indicate that the enumeration data has changed. The preset field is generated by an entity tag or a timestamp. Receive the response returned by the web server based on the preset field, wherein the response contains an updated enumeration data file; The updated enumeration data file is stored in the global variable.

2. The method according to claim 1, characterized in that, In response to receiving a request from the user to retrieve enumeration data, the enumeration data file is retrieved from the web server, including: Based on the acquisition request, the enumeration data file is retrieved from the local directory of the web server using a preset tag.

3. The method according to claim 1, characterized in that, The updated enumeration data file is generated by the generation server based on the updated enumeration data, and the updated enumeration data is obtained by the update server updating the enumeration data.

4. The method according to any one of claims 1 to 3, characterized in that, The enumeration data file is obtained by the web server from the file server based on a preset scheduled task and stored in the local directory of the web server.

5. The method according to any one of claims 1 to 3, characterized in that, The enumeration data file is generated by the production server and sent to the file server based on a preset protocol.

6. A data processing apparatus for enumeration, characterized in that, include: The first acquisition module is used to respond to a user input request for acquiring enumeration data, and to acquire an enumeration data file from a web server through a preset tag. The enumeration data file contains enumeration data corresponding to at least one application scenario. The preset tag is used to identify the acquisition of the enumeration data file. The preset tag is a script tag or a link tag. The application scenario is a drop-down list, a selector, or a multi-page application. The storage module is used to store the enumeration data file into a global variable to obtain an enumeration object file, wherein different enumeration objects in the enumeration object file are used to access enumeration data corresponding to different application scenarios; The second acquisition module is used to access the enumeration object in the enumeration object file corresponding to the target application scenario based on the target application scenario corresponding to the acquisition request, so as to obtain the enumeration data corresponding to the target application scenario, wherein the target application scenario is an enumeration selector or an enumeration value translation. The processing device further includes an update module, configured to send a file retrieval request to the web server in response to a change in the enumeration data, wherein the file retrieval request carries a preset field, the preset field being used to characterize the change in the enumeration data, and the preset field being generated by an entity tag or a timestamp; receive a response returned by the web server based on the preset field, wherein the response contains the updated enumeration data file; and store the updated enumeration data file in the global variable.

7. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the storage medium is located to perform the method according to any one of claims 1 to 5.

9. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • A method and apparatus for enumerating data access

    CN109683870A

  • Business data display method and device, electronic equipment and storage medium

    CN115203199A

  • Data environment switching method and device of application program, electronic equipment and medium

    CN116225576A