Enumerated data processing method and device, electronic equipment and storage medium
By storing enumeration data files in the client and generating enumeration object files, the problems of low efficiency of enumeration data processing and high resource consumption in the prior art are solved, and the effect of efficient acquisition of enumeration data and saving network resources is achieved.
Patent Information
- Application Number
- CN202510656070.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-05-21
AI Technical Summary
The prior art uses large resources and low processing efficiency when processing enumerated data, especially when the enumerated data is large or the network environment is poor, it will increase the burden on the server and lead to waste of network resources.
By storing the enumeration data file as a global variable in the client, an enumeration object file is generated, and enumeration object file is used to quickly access the enumeration data, reducing the need for frequent acquisition from the server.
It realizes efficient acquisition of enumeration data, improves the efficiency of processing enumeration data, saves network resources, and solves the problems of large resource consumption and low processing efficiency.
Smart Images

Figure CN120179942A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology and data processing, and in particular, to a method, apparatus, electronic device, and storage medium for processing enumerated data. Background Art
[0002] In modern network applications, enumerated data is widely used in scenarios such as dropdown boxes and radio buttons in network interfaces to provide a predefined list of options, which can improve the convenience of user operations. The efficient loading and display of enumerated data are important factors to ensure the response speed and data consistency of the user interface.
[0003] In the prior art, when loading enumerated data, the client needs to obtain it from the server. This process will consume a certain amount of network bandwidth. Especially when the amount of enumerated data is large or the network environment is poor, it will increase the processing burden on the server. And in the case of frequently accessing the same network interface within a short period of time, repeatedly obtaining the same enumerated data from the server will lead to a decrease in acquisition efficiency and also cause waste of network resources.
[0004] In view of the above problems, no effective solution has been proposed yet. Summary of the Invention
[0005] Embodiments of the present invention provide a method, apparatus, electronic device, and storage medium for processing enumerated data, so as to at least solve the technical problems of large resource consumption and low processing efficiency in processing enumerated data in the related art.
[0006] According to one aspect of the embodiments of the present invention, a method for processing enumerated data is provided, which is applied to a client and includes: in response to receiving a request for obtaining enumerated data input by a user, obtaining an enumerated data file from a web server, where the enumerated data file includes enumerated data corresponding to at least one application scenario; storing the enumerated data file in a global variable to obtain an enumerated object file, where different enumerated objects in the enumerated object file are used to access enumerated data corresponding to different application scenarios; based on the target application scenario corresponding to the acquisition request, accessing the enumerated object corresponding to the target application scenario in the enumerated object file to obtain the enumerated data corresponding to the target application scenario.
[0007] Optionally, in response to receiving a request for obtaining enumerated data input by a user, obtaining an enumerated data file from a web server includes: based on the acquisition request, obtaining the enumerated data file from the local directory of the web server through a preset tag.
[0008] Optionally, the above method further includes: in response to a change in the enumerated data, sending a file acquisition request to the web server, where the file acquisition request carries a preset field; receiving a response returned by the web server based on the preset field, where the response includes an updated enumerated data file; and storing the updated enumerated data file in a global variable.
[0009] Optionally, the updated enumerated data file is generated by a generation server according to the updated enumerated data, and the updated enumerated data is obtained by an update server updating the enumerated data.
[0010] Optionally, the enumerated data file is obtained by the web server from the file server based on a preset scheduled task and stored in a local directory of the web server.
[0011] Optionally, the enumerated data file is generated by a production server and sent to the file server based on a preset protocol.
[0012] According to another aspect of the embodiments of the present invention, there is also provided a processing device for enumerated data, including: a first acquisition module, configured to acquire an enumerated data file from a web server in response to receiving an acquisition request for the enumerated data input by a user, where the enumerated data file includes enumerated data corresponding to at least one application scenario; a storage module, configured to store the enumerated data file in a global variable to obtain an enumerated object file, where different enumerated objects in the enumerated object file are used to access the enumerated data corresponding to different application scenarios; and a second acquisition module, configured to access the enumerated object corresponding to the target application scenario in the enumerated object file based on the target application scenario corresponding to the acquisition request to acquire the enumerated data corresponding to the target application scenario.
[0013] According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including: a memory storing an executable program; and a processor configured to run the program, where when the program runs, it executes the methods in the various embodiments of the present invention.
[0014] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where the computer-readable storage medium includes a stored executable program, and when the executable program runs, it controls the device where the computer-readable storage medium is located to execute the methods in the various embodiments of the present invention.
[0015] According to another aspect of the embodiments of the present invention, there is also provided a computer program product, including a computer program that implements the methods in the various embodiments of the present invention when executed by a processor.
[0016] According to another aspect of the embodiments of the present invention, there is also provided a computer program product, including a non-volatile computer-readable storage medium storing a computer program, where the computer program, when executed by a processor, implements the methods in various embodiments of the present invention.
[0017] According to another aspect of the embodiments of the present invention, there is also provided a computer program, where the computer program, when executed by a processor, implements the methods in various embodiments of the present invention.
[0018] In the embodiments of the present invention, in response to receiving a request for obtaining enumerated data input by a user, an enumerated data file is obtained from a web server, where the enumerated data file includes enumerated data corresponding to at least one application scenario; the enumerated data file is stored in a global variable to obtain an enumerated object file, where different enumerated objects in the enumerated object file are used to access the enumerated data corresponding to different application scenarios; based on the target application scenario corresponding to the acquisition request, the enumerated object corresponding to the target application scenario in the enumerated object file is accessed to obtain the enumerated data corresponding to the target application scenario. It is easy to note that by storing the enumerated data file as a global variable and pre-storing the enumerated object file, when obtaining enumerated data, the enumerated data can be quickly accessed by accessing the enumerated object file, without frequently obtaining it from the server, achieving the purpose of efficiently obtaining enumerated data, thereby realizing the technical effect of improving the efficiency of processing enumerated data and saving network resources, and further solving the technical problem of large resource consumption and low processing efficiency in processing enumerated data in the related art. Description of the Drawings
[0019] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0020] Figure 1 is a flowchart of a method for processing enumerated data according to an embodiment of the present invention;
[0021] Figure 2 is a schematic diagram of an optional system for processing enumerated data according to an embodiment of the present invention;
[0022] Figure 3 is a schematic diagram of a device for processing enumerated data according to an embodiment of the present invention. Detailed Embodiments
[0023] To enable those skilled in the art to better understand the solution of the present invention, the following will clearly and completely describe the technical solution in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order different from those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[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 of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.
[0026] Figure 1 is a flowchart of a method for processing enumerated data according to an embodiment of the present invention. As Figure 1 shown, the method includes the following steps:
[0027] Step S102, in response to receiving a request for obtaining enumerated data input by a user, obtain an enumerated data file from a web server.
[0028] Among them, the enumerated data file contains enumerated data corresponding to at least one application scenario.
[0029] The above-mentioned enumerated data can be a set of preset option values in a web page. 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. Here, the type of the enumerated data type is not limited and can be determined according to needs. In a web page, the enumerated data is usually fixed and does not change with page refresh. Therefore, the enumerated data can be pre-loaded to save the time of page refresh and improve the user experience. By using the enumerated data, the consistency and correctness of data used in web applications can be ensured, and incorrect or non-standard data input can be avoided. By using the enumerated data, options can also be provided in the front-end interface to simplify user input and at the same time provide a clear list of options. By using the enumerated data, the conditional judgment in the back-end processing logic can also be simplified, improving the readability and maintainability of the code.
[0030] The above-mentioned acquisition request can be used to represent an instruction to obtain enumerated data. The acquisition request can include, but is not limited to: network address, web page, query parameter, type identifier, etc. Here, the acquisition request is not limited and can be determined according to needs. In a web application, the acquisition request can be initiated by the client to the web server. After receiving the acquisition request, the web server can return the enumerated data or the enumerated data file to the client and store the enumerated data file in a global variable. When the enumerated data is needed, accessing this global variable is sufficient, without repeatedly returning the enumerated data, reducing resource overhead. After the enumerated data changes, the acquisition request can be used to request and obtain the updated part of the enumerated data, reducing resource occupancy, reducing network latency and server resource consumption, while maintaining the real-time nature and accuracy of the client data.
[0031] The above-mentioned web server can be used to process requests from the client and return the enumerated data file. The web server can cache and return static resources, such as enumerated data files, web pages, cascading style sheets, etc., to reduce requests to the file server, thereby improving the response speed and reducing network latency. The web server can also process dynamic content. For example, it can generate a dynamic response through interaction with the back-end application server, or it can also generate a dynamic response through scripts. By caching the enumerated data file on the web server, the client can obtain the enumerated data more quickly when needed.
[0032] The above-mentioned enumerated data file may contain enumerated data corresponding to at least one application scenario. The application scenario may be a drop-down list or a selector, and the application scenario may also be a multi-page application. The enumerated data file may contain the type of enumerated data and the corresponding enumerated values, and the content of the enumerated data file is not limited here and can be determined according to needs. Through the enumerated data file, it is beneficial to the effective utilization of the enumerated data, and it can be quickly and efficiently provided to the front end without directly accessing the database. Through the enumerated data file, the enumerated data can also be persisted on the client side, avoiding sending requests to the web server every time the page is loaded, thereby improving the page loading speed and reducing the burden on the web server and network traffic. Through the enumerated data file, it is also convenient to uniformly update and record the enumerated data.
[0033] In an alternative embodiment, after the acquisition request is monitored by a listener, the acquisition request can be triggered. After the client receives the acquisition request for the enumerated data input by the user, it can initiate an asynchronous request to the API interface of the web server to request the acquisition of the enumerated data file.
[0034] In another alternative embodiment, after the client receives the acquisition request, it can connect to the web server through the Hypertext Transfer Protocol or the File Transfer Protocol to obtain the enumerated data file from the web server.
[0035] In yet another alternative embodiment, after the client receives the acquisition request, the client and the web server can be connected through a network socket to forward the acquisition request to the web server. After the web server parses the acquisition request, it returns the enumerated data file, thereby obtaining the enumerated data file.
[0036] Step S104, store the enumerated data file into a global variable to obtain an enumerated object file.
[0037] Among them, different enumerated objects in the enumerated object file are used to access the enumerated data corresponding to different application scenarios.
[0038] The above-mentioned global variable may be a variable that can be shared and accessed by different pages, components, or scripts. The global variable can be defined in the top-level scope. Through the global variable, the enumerated data file can be stored uniformly and accessed, without repeated requests in each page or component, accelerating the page loading speed and enhancing the user experience. Through the global variable, it is also possible to simplify the process of obtaining enumerated data, avoiding repeated writing of code for obtaining enumerated data, which is beneficial to code maintenance and extension.
[0039] The above-mentioned enumerated object file is a global file, which can be obtained by storing the enumerated data file into a global variable, avoiding frequent network requests and the consumption of data loading time. The enumerated object file can be a static data file for storing and distributing enumerated data, which can reduce the number of interactions and communication volume between the client and the web server, improving application performance and response speed.
[0040] In an alternative embodiment, the enumerated data file can be assigned to a global variable to obtain the enumerated object file. Or, a global dictionary can also be used to store the enumerated data file to achieve key-value storage, which is also convenient for accessing the required enumerated data from the enumerated object file subsequently. Or, a global list can also be used to store the enumerated data file. Or, through a global class, the enumerated data file can be stored through class attributes.
[0041] Step S106, based on the target application scenario corresponding to the acquisition request, access the enumerated object corresponding to the target application scenario in the enumerated object file to obtain the enumerated data corresponding to the target application scenario.
[0042] The above-mentioned target application scenario can be a scenario that requires the use of enumerated data. For example, the target application scenario can be an enumerated selector, enumerated value translation, etc. There is no limitation on the target application scenario here and it can be determined according to needs. Using enumerated data in the target application scenario can improve the friendliness of the user interface, the standardization of data, and system performance, and also simplifies the interface with the server, reducing the maintenance workload.
[0043] In an alternative embodiment, the target application scenario can be determined by the scenario identifier carried in the acquisition request, and the corresponding enumerated object can be queried from the enumerated object file based on the scenario identifier. Then, the enumerated data accessed through the attributes of this enumerated object is the enumerated data corresponding to the target application scenario.
[0044] In another alternative embodiment, the enumerated data can be obtained through an enumerated data acquisition module in the web server. The enumerated data acquisition module can include a status management library. This enumerated data acquisition module can be used to access the enumerated object file, and then compare the target application scenario with the application scenarios in the enumerated object file, and obtain the enumerated data from the enumerated object corresponding to the application scenario that passes the comparison, which is the enumerated data corresponding to the target application scenario.
[0045] In yet another alternative embodiment, the target application scenario events can be listened for through an event-driven or reactive programming framework, thereby triggering the acquisition of an enumeration object corresponding to the target application scenario. Through listening, the user's acquisition request can be quickly responded to, especially in application scenarios where enumeration data needs to be frequently accessed, such as product classification on an e-commerce website, course classification on an online education platform, etc. This can improve the processing speed of enumeration data and optimize the user experience.
[0046] In an embodiment of the present invention, in response to receiving a request for acquiring enumeration data input by a user, an enumeration data file is acquired from a web server, where 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, where 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, the enumeration object corresponding to the target application scenario in the enumeration object file is accessed to acquire the enumeration data corresponding to the target application scenario. It is easy to note that by storing the enumeration data file as a global variable and pre-storing the enumeration object file, when acquiring enumeration data, the enumeration data can be quickly accessed by accessing the enumeration object file without frequently acquiring it from the server, achieving the purpose of efficiently acquiring enumeration data, thereby realizing the technical effect of improving the efficiency of processing enumeration data and saving network resources, and further solving the technical problem of high resource consumption and low processing efficiency in processing enumeration data in related technologies.
[0047] Optionally, in response to receiving a request for acquiring enumeration data input by a user, acquiring an enumeration data file from a web server includes: based on the acquisition request, acquiring the enumeration data file from the local directory of the web server through a preset tag.
[0048] The above-mentioned preset tag can be used to acquire the enumeration data file. The preset tag can be a tag for acquiring a file. The preset tag can be a script tag, a link tag, etc. There is no limitation on the preset tag here and it can be determined according to needs. Through the preset tag, the enumeration data file can be acquired more precisely, reducing unnecessary data transmission and further improving the data processing efficiency. Resources can also be pre-loaded through the preset tag to avoid blocking page rendering or parsing.
[0049] In an alternative embodiment, based on the type identifier in the acquisition request, the enumeration data file corresponding to the type identifier can be queried from the local directory of the web server through a preset tag. Or, the preset tag can also be used to asynchronously load the enumeration data file.
[0050] Optionally, the above method further includes: in response to a change in the enumerated data, sending a file acquisition request to the web server, where the file acquisition request carries a preset field; receiving a response returned by the web server based on the preset field, where the response includes an updated enumerated data file; and storing the updated enumerated data file in a global variable.
[0051] Through the preset field, it can be ensured that the client can receive timely notifications of changes in the enumerated data, which is applicable to scenarios that require real-time data synchronization, such as status updates in social networks, leaderboard updates in online games, etc., ensuring the consistency of data between the client and the web server.
[0052] When it is detected that the enumerated data has changed, it is necessary to update the enumerated data file to ensure that the enumerated data is updated synchronously.
[0053] In an optional embodiment, after polling at regular intervals or listening for an event of change in the enumerated data, a file acquisition request can be triggered and sent to the web server. Using the file acquisition request, an updated enumerated data file can be obtained.
[0054] To save network resources, a preset field can be added to the file acquisition request. The preset field can be generated based on an entity tag or a timestamp. For example, the preset field can be If-None-Match or If-Modified-Since. Here, the preset field is not limited and can be determined according to needs. The change in the enumerated data is characterized by the preset field. The web server can determine whether to return an updated enumerated data file based on the timestamp, status code, etc. of the preset field. And in the case of a change in the enumerated data, an updated enumerated data file is returned so that the client stores the updated enumerated data file in a global variable. Optionally, a global dictionary, global list, or global class property can be used to store the updated enumerated data file.
[0055] Optionally, the updated enumerated data file is generated by a generation server based on the updated enumerated data, and the updated enumerated data is obtained by an update server updating the enumerated data.
[0056] Through the generation server and the update server, the process of updating the enumerated data is made more efficient, especially in scenarios where the enumerated data is large in volume and updated frequently, such as big data analysis, real-time advertising recommendation systems, etc., which can effectively reduce the load on the generation server and improve the timeliness and accuracy of updating the enumerated data.
[0057] In an alternative embodiment, the enumeration data can be updated by an update server. Optionally, the update server can update the enumeration data through an update request, or alternatively, it can also send an update event to a message queue, which includes the updated enumeration data, so that when the generation server receives the update message, it extracts the updated enumeration data from the message queue and further generates an updated enumeration data file. Or, real-time update of the enumeration data can also be performed through a network callback mechanism.
[0058] Furthermore, in an alternative embodiment, the generation server can write the updated enumeration data into an enumeration data file through a pre-set scripting language to obtain an updated enumeration data file. Or, alternatively, the updated enumeration data can be rendered into a template file through a template engine and further an enumeration data file can be output based on the template file. Or, the generation server can also connect to a cloud platform and utilize the cloud platform to process and generate an enumeration data file.
[0059] Optionally, the enumeration data file is obtained by a web server from a file server based on a pre-set scheduled task and stored in the local directory of the web server.
[0060] Through the setting of the pre-set scheduled task, the regular update of the enumeration data is ensured, which is applicable to application scenarios with a fixed update cycle of enumeration data, such as the hot update of news websites, the sports data synchronization of health applications, etc., ensuring the timeliness and reliability of the enumeration data.
[0061] In an alternative embodiment, a pre-set scheduled task can be created on the cloud platform to execute the pre-set scheduled task through the cloud platform, so that the web server can store the enumeration data file after obtaining it. Or, an update function can be run based on the pre-set scheduled task through a pre-configured scheduling library in the web server to obtain the enumeration data file from the file server.
[0062] Optionally, the enumeration data file is generated by a production server and sent to the file server based on a pre-set protocol.
[0063] Through the production server, the process of generating enumeration data is made more efficient, especially in scenarios with a large amount of enumeration data, such as big data analysis systems, which can improve the timeliness and accuracy of generating enumeration data.
[0064] In an alternative embodiment, the production server can write the enumeration data into an enumeration data file through a pre-set scripting language. Or, alternatively, the enumeration data can be rendered into a template file through a template engine and further an enumeration data file can be output based on the template file. Or, the production server can also connect to a cloud platform and utilize the cloud platform to process and generate an enumeration data file.
[0065] Furthermore, after generating the enumerated data file, the production server can connect to the file server via the File Transfer Protocol (FTP), Hypertext Transfer Protocol (HTTP), or Secure File Transfer Protocol (SFTP) to transfer the enumerated data file. By using the preset protocol, the security and stability of the transfer of the enumerated data file are ensured. Especially in scenarios involving sensitive information, it can effectively prevent the leakage and tampering of the enumerated data file during the transfer process, thus guaranteeing the security of the enumerated data file.
[0066] Figure 2 is a schematic diagram of a processing system for enumerated data according to an embodiment of the present invention, as Figure 2 shown. The system includes: a front end, a web server, a file server, and a back end.
[0067] Among them, the front end is used to send a request for obtaining enumerated data input by the user to the web server.
[0068] The web server is used to receive the obtaining request sent by the front end and is also used to send a file obtaining request for obtaining the enumerated data file to the file server based on the obtaining request.
[0069] The back end is used to perform changes to the enumerated data, generate an enumerated data file after the changes to the enumerated data, and is also used to send the enumerated data file to the file server.
[0070] According to another aspect of the embodiments of the present invention, there is also provided a processing device for enumerated data. This device can execute the processing method for enumerated data provided in the above embodiments. The specific implementation manner and preferred application scenarios are the same as those in the above embodiments and will not be elaborated here.
[0071] Figure 3 is a schematic diagram of a processing device for enumerated data according to an embodiment of the present invention, as Figure 3 shown. The device includes:
[0072] A first obtaining module 32, configured to obtain an enumerated data file from a web server in response to receiving a request for obtaining enumerated data input by a user, where the enumerated data file includes enumerated data corresponding to at least one application scenario;
[0073] A storage module 34, configured to store the enumerated data file in a global variable to obtain an enumerated object file, where different enumerated objects in the enumerated object file are used to access enumerated data corresponding to different application scenarios;
[0074] A second obtaining module 36, configured to access an enumerated object corresponding to a target application scenario in the enumerated object file based on the target application scenario corresponding to the obtaining request, so as to obtain the enumerated data corresponding to the target application scenario.
[0075] Optionally, the first acquisition module is further configured to obtain an enumerated data file from the local directory of the web server based on the acquisition request through a preset tag.
[0076] Optionally, the above device further includes an update module. The update module is configured to, in response to a change in the enumerated data, send a file acquisition request to the web server, where the file acquisition request carries a preset field; receive a response returned by the web server based on the preset field, where the response includes the updated enumerated data file; and store the updated enumerated data file in a global variable.
[0077] Optionally, the updated enumerated data file is generated by a generation server according to the updated enumerated data, and the updated enumerated data is obtained by an update server updating the enumerated data.
[0078] Optionally, the enumerated data file is obtained by the web server from a file server based on a preset scheduled task and stored in the local directory of the web server.
[0079] Optionally, the enumerated data file is generated by a production server and sent to the file server based on a preset protocol.
[0080] An embodiment of the present application further provides an electronic device, including: a memory storing an executable program; a processor configured to run the program, where when the program runs, it executes the methods in the various embodiments of the present invention.
[0081] An embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored executable program, and when the executable program runs, it controls the device where the computer-readable storage medium is located to execute the methods in the various embodiments of the present invention.
[0082] An embodiment of the present application further provides a computer program product, including a computer program, where when the computer program is executed by a processor, it implements the methods in the various embodiments of the present invention.
[0083] An embodiment of the present application further provides a computer program product, including a non-volatile computer-readable storage medium for storing a computer program, where when the computer program is executed by a processor, it implements the methods in the various embodiments of the present invention.
[0084] An embodiment of the present application further provides a computer program, where when the computer program is executed by a processor, it implements the methods in the various embodiments of the present invention described above.
[0085] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0086] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own focuses. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0087] In several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the units or modules can be in an electrical or other form.
[0088] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0089] In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0090] If the above-mentioned integrated unit is implemented in the form of 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 this 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 enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. And the aforementioned storage medium includes: USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs and other various media that can store program codes.
[0091] The above is only the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A method for processing enumeration data, characterized in that: Applied to the client, including: In response to receiving an enumeration data acquisition request input by a user, acquiring an enumeration data file from a web page server, wherein the enumeration data file includes 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, 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, the enumeration object corresponding to the target application scenario in the enumeration object file is accessed to obtain the enumeration data corresponding to the target application scenario.
2. The method according to claim 1, characterized in that In response to receiving an enumeration data acquisition request input by a user, acquiring an enumeration data file from a web page server, including: Based on the acquisition request, the enumeration data file is acquired from a local directory of the web server through a preset tag.
3. The method according to claim 1, characterized in that The method further comprises: In response to a change in the enumerated data, sending a file acquisition request to the web server, wherein the file acquisition request carries a preset field; receiving a response returned by the webpage server based on the preset field, wherein the response includes an updated enumeration data file; The updated enumeration data file is stored in the global variable.
4. The method according to claim 3, characterized in that The updated enumeration data file is generated by a generation server according to the updated enumeration data, and the updated enumeration data is obtained by updating the enumeration data by an update server.
5. The method according to any one of claims 1 to 4, characterized in that: The enumeration data file is obtained by the web page server from a file server based on a preset timing task and is stored in a local directory of the web page server.
6. The method according to any one of claims 1 to 4, characterized in that: The enumeration data file is generated by a production server and sent to a file server based on a preset protocol.
7. A device for processing enumeration data, characterized in that: include: A first acquisition module, configured to acquire an enumeration data file from a web page server in response to receiving an acquisition request for enumeration data input by a user, wherein the enumeration data file includes enumeration data corresponding to at least one application scenario; A storage module, used for 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; The second acquisition module is used to access the enumeration object corresponding to the target application scenario in the enumeration object file based on the target application scenario corresponding to the acquisition request, so as to acquire the enumeration data corresponding to the target application scenario.
8. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 6 when running.
9. 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, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
A method and apparatus for enumerating data access
CN109683870A
Enumeration type design method and device
CN111367524A
Business data display method and device, electronic equipment and storage medium
CN115203199A
Detection method for MMSESION type malicious codes
CN115495743A
Automatic testing method, device and equipment and computer readable medium
CN115794637A