CN109683870A - Method and apparatus for enumerating data access - Google Patents

Method and apparatus for enumerating data access Download PDF

Info

Publication number
CN109683870A
CN109683870A CN201710971811.XA CN201710971811A CN109683870A CN 109683870 A CN109683870 A CN 109683870A CN 201710971811 A CN201710971811 A CN 201710971811A CN 109683870 A CN109683870 A CN 109683870A
Authority
CN
China
Prior art keywords
enumerate
class
item
enumerating
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710971811.XA
Other languages
Chinese (zh)
Inventor
李建珍
袁立超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710971811.XA priority Critical patent/CN109683870A/en
Publication of CN109683870A publication Critical patent/CN109683870A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

This application discloses the method and apparatus for enumerating data access.One specific embodiment of method includes: to receive user to the access request of the page of application, wherein the page includes multiple enumerating item;The multiple enumerate is called each in item described to enumerate that item is corresponding to enumerate class according to the access request;Receive according to pre-defined rule to call it is each it is described enumerate that the corresponding return value for enumerating class of item parses enumerate data and show.It enumerates that item is corresponding to be enumerated data and update as the corresponding update for enumerating data of class is enumerated in rear end to realize Web application front end, has saved the cost for enumerating category code synchronous required exploitation and maintenance in Web application front end and Web using rear end.

Description

Method and apparatus for enumerating data access
Technical field
This application involves field of computer technology, and in particular to Internet technical field, more particularly to it is a kind of for enumerating The method and apparatus of data access.
Background technique
In Web application system development, often defines many constants or to enumerate class some changeless to store Data, it is therefore an objective to facilitate other logics call and get well centralized management it is not easy to make mistakes.
Currently, the class of enumerating in the Web application system page needs to synchronize in front-end and back-end.When rear end updates and enumerates, It needs in front end while updating this and enumerating.But when rear end is deleted or the enumerated value of class is enumerated in addition one, if do not had Have in view of this enumerates the use scope of class, will lead in front end while while modifying loses or loses, both waste exploitation in this way Time is also unfavorable for the maintenance of problem investigation and later period.
Summary of the invention
The purpose of the application is to propose a kind of method and apparatus for enumerating data access, to solve background above skill The technical issues of art part is mentioned.
In a first aspect, this application provides a kind of methods for enumerating data access, which comprises receive user To the access request of the page of application, wherein the page includes multiple enumerating item;It is called according to the access request described more A enumerate each in item described enumerates that item is corresponding to enumerate class;Receive the return for enumerating class described in calling according to pre-defined rule What value parsing obtained enumerates data and shows.
In some embodiments, above-mentioned to call the multiple enumerate each in item described to enumerate item point according to the access request It is not corresponding to enumerate class, comprising: to be based on multiple enumerating the respective note of class and from the multiple enumerating class according to the access request In filter out that the page is corresponding multiple to be enumerated class and call.
In some embodiments, above-mentioned to call the multiple enumerate each in item described to enumerate item point according to the access request It is not corresponding to enumerate class, comprising: the multiple enumerate in item respectively is called by Model View Controller according to the access request It is described to enumerate that item is corresponding to enumerate class.
In some embodiments, the multiple piece is called by Model View Controller according to the access request above-mentioned Lift in item it is each it is described enumerate that item is corresponding and enumerate class before, the above method further include: in the Model View Controller It registers and binds and respectively enumerate that item is corresponding to enumerate class.
In some embodiments, above-mentioned reception each described enumerates that item is corresponding to enumerate class to calling according to pre-defined rule Return value parse enumerate data and show, comprising: class enumerated for any one, is received by using loop iteration The return value for enumerating class that method parses corresponding multiple enumerated data and is shown.
Second invention, this application provides a kind of for enumerating the device of data access, and device includes: the first reception list Member is configured to receive user to the access request of the page of application, wherein the page includes multiple enumerating item;It calls single Member is configured to call the multiple enumerate each in item described to enumerate item by Model View Controller according to the access request It is corresponding to enumerate class;Second receiving unit is configured to receive the return for enumerating class described in calling according to pre-defined rule What value parsing obtained enumerates data and shows.
In some embodiments, the call unit is further configured to: being based on multiple pieces according to the access request It lifts class respective explain from the multiple enumerate and filters out that the page is corresponding multiple to be enumerated class and call in class.
In some embodiments, the call unit is further configured to: being regarded according to the access request by model Figure controller calls the multiple enumerate each in item described to enumerate that item is corresponding to enumerate class.
In some embodiments, described device further includes binding unit, and the binding unit is configured in the calling Unit is called by Model View Controller according to the access request and the multiple enumerates that each in item described to enumerate item right respectively Before that answers enumerates class, registers and bind in the Model View Controller and respectively enumerate that item is corresponding to enumerate class.
In some embodiments, second receiving unit is further configured to: being enumerated class for any one, is received By using loop iteration method parses, the return value for enumerating class corresponding multiple enumerated data and is shown.
The third aspect, this application provides a kind of electronic equipment, including one or more processors;Storage device is used for One or more programs are stored, when one or more of programs are executed by one or more of processors, so that described one A or multiple processors realize the method for enumerating data access of first aspect.
Fourth aspect, the application improve a kind of computer readable storage medium, are stored thereon with computer program, the journey The method for enumerating data access such as first aspect is realized when sequence is executed by processor.
Method and apparatus provided by the present application for enumerating data access, by receiving user first to the page of application Access request, wherein the page include it is multiple enumerate item, then according to access request call it is the multiple enumerate in item it is each It is described to enumerate that item is corresponding to enumerate class, it finally receives and enumerates the return value of class described in calling according to pre-defined rule and parse To enumerate data and show.To realize that Web application front end enumerates the corresponding data of enumerating of item as rear end is enumerated in class It enumerates the update of data and updates, saved and enumerated that category code is synchronous required to be opened using rear end in Web application front end and Web The cost of hair and maintenance.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart according to one embodiment of the method for enumerating data access of the application;
Fig. 3 is the schematic diagram according to an application scenarios of the method for enumerating data access of the application;
Fig. 4 is the structural schematic diagram according to one embodiment of the device for enumerating data access of the application;
Fig. 5 is adapted for the structural schematic diagram for the computer system for realizing the electronic equipment of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the application for accessing the method for enumerating data or for accessing the dress for enumerating data The exemplary system architecture 100 for the embodiment set.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, first server 104, second is taken Business device 105 and network 106, network 107.Network 106 is between terminal device 101,102,103 and first server 104 The medium of communication link is provided.Network 107 is to provide communication link between first server 104 and second server 105 Medium.Network 106 and network 107 may include various connection types, such as wired, wireless communication link or fiber optic cables Etc..
User can be used terminal device 101,102,103 and be interacted by network 106 with first server 104, to receive Or send message etc..Various telecommunication customer end applications can be installed, such as shopping class is answered on terminal device 101,102,103 With, searching class application etc..
Terminal device 101,102,103 can be the various electronic equipments with display screen and supported web page browsing, packet Include but be not limited to smart phone, tablet computer, E-book reader, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio level 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio level 4) it is player, on knee portable Computer and desktop computer etc..
First server 104 can be to provide the server of various services, such as show on terminal device 101,102,103 The Web application shown provides the background server of user interface.First server 104 can receive user and be sent by terminal device Accessing page request, the method and data for including to 105 invoking page of second server by network 107;Receive the second clothes The data for the method operation result that device 105 returns and the above-mentioned calling of being engaged in.The result that first server 104 runs the above method User interface is constructed according to indicating template with data, and above-mentioned user interface is returned into above-mentioned terminal device 101,102,103.
Second server 105 can be to provide the background server of various services, such as receive first server 104 to setting The call request for setting the method or data on second server 105 runs the method for calling and by the operation knot to method Fruit is sent to first server 104 by network 107, or the data of calling are sent to first server by network 107 104.In some embodiments, second server can also be connect by network with multiple databases, and second server passes through the Call request of one server to method or data obtains the above method and data from above-mentioned multiple databases.
In application scenes, above-mentioned first server and second server can also be same physical equipment.
It should be noted that for accessing the method for enumerating data generally by first service provided by the embodiment of the present application Device 104 executes, and correspondingly, enumerates the devices of data for accessing and is generally positioned in first server 104.
It should be understood that the terminal device, network and first server and the number of second server in Fig. 1 are only to illustrate Property.According to needs are realized, any number of terminal device, network and first server and second server can have.
With continued reference to Fig. 2, the stream of one embodiment for accessing the method for enumerating data according to the application is shown Journey 200.This is for accessing the method for enumerating data, comprising the following steps:
Step 201, user is received to the access request of the page of application.
In the present embodiment, it is (such as shown in FIG. 1 to run electronic equipment thereon for the method for enumerating data access First server 104) page browsing can be carried out using it from user by wired connection mode or radio connection Terminal device (such as terminal device shown in FIG. 1 101,102,103) receives the access request of the page of application.Wherein, above-mentioned Using that can be a Web application, the above-mentioned page can be a page of above-mentioned Web application.Specifically, user can be first The Web application of installation on the terminal device is opened, and then selects to access any one page of Web application.Wherein, at this It may include multiple enumerating item in the page of Web application.
In application scenes, above-mentioned item of enumerating be can be under one be presented on the page that booking class Web is applied Draw frame, such as " passenger type " combobox etc..
It should be pointed out that above-mentioned radio connection can include but is not limited to 3G/4G connection, WiFi connection, bluetooth Connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection and other currently known or exploitations in the future Radio connection.
In general, user can use terminal to browse each page of above-mentioned Web application.In the present embodiment, above-mentioned Web The page may include html format, xhtml format, asp format, php format, jsp format, shtml format, nsp format, xml At least one of format etc..
In application scenes, the access request of the above-mentioned page may include the network address that user it is expected the page of browsing.
Step 202, multiple enumerate is called each in item described to enumerate that item is corresponding to enumerate class according to access request.
In the present embodiment, above-mentioned Web application may include multiple pages.It may include multiple enumerate in each page ?.
Wherein, it is each enumerate item and can correspond to multiple enumerate data.In addition, any one, which enumerates item, can correspond to backstage branch It holds one in the application program of the page and enumerates class.It is above-mentioned enumerate item it is corresponding any one enumerate data and can be this and enumerate Corresponding enumerate in class the enumeration element of item.Above-mentioned class of enumerating can be stored in second server.That is, second It can be saved in server and multiple enumerate class.
It, can be by the Web using corresponding when starting the code of the above-mentioned Web application of operation support in second server Class is enumerated to be loaded into memory.In this way, when above-mentioned electronic equipment to Web using it is corresponding some enumerate class and be called when, This can be directly searched from memory and enumerates class, so that the above-mentioned electronic equipment of quick response enumerates this calling of class.
In application scenes, each enumerates the corresponding alias of class.The alias that difference enumerates class is not identical.In this way Starting runs above-mentioned Web in application, above-mentioned each alias for enumerating class can be loaded into memory in second server, with It is called for above-mentioned electronic equipment.When above-mentioned electronic equipment calls corresponding when enumerating class of certain alias, above-mentioned second server root The sequential value for enumerating the corresponding each enumeration element of class is taken out according to above-mentioned alias.It is loaded in the memory of second server each The alias for enumerating class can enumerate class according to the above-mentioned alias calling for enumerating class when above-mentioned electronic equipment is called.In this way Second server memory usage can be saved, so that second server response speed with higher.
After above-mentioned electronic equipment receives the access request of the page in step 201, it can determine that the page is wrapped What is included each enumerates item.Then it determines each to enumerate that item is corresponding to enumerate class.
When judge respectively to enumerate item is corresponding to enumerate class after, can call the page is corresponding to enumerate that item is corresponding, sets It sets and each in second server enumerates class.
In application scenes, can be set that the above-mentioned page includes in above-mentioned electronic equipment each to enumerate item corresponding Each interface for enumerating class.By above-mentioned interface, calls in above-mentioned second server and enumerate class.
Step 203, it receives and enumerates data to what calling enumerated that the return value of class parses according to pre-defined rule and show.
In the present embodiment, it is preserved in above-mentioned second server and each to enumerate sequential value included by class corresponding Enumerate data.For any one is enumerated, this, which enumerates any one sequential value in class, can enumerate data pass with one UNPROFOR is deposited.In the present embodiment, above-mentioned data of enumerating can be numerical value, character etc., and wherein character may include English character And Chinese character.
In the present embodiment, above-mentioned second server with according to above-mentioned incidence relation parse this enumerate it is each included by class A sequential value is corresponding to enumerate data.
In some embodiments, above-mentioned pre-defined rule may include the sequence model for enumerating data for the display that user specifies It encloses.When user to above-mentioned electronic equipment send accessing page request when, can be selected in the page and need in access request The sequential value of display is corresponding to enumerate data.In this way, second server can according to enumerate the sequential value that data are enumerated in class come Parsing user needs the sequence context is corresponding each to enumerate data.
In some embodiments, if user does not know that the range of data is enumerated in display, above-mentioned pre-defined rule can be Any one is enumerated and respectively enumerates sequential value parsing in class and respectively associated enumerates data.
In some embodiments, item is enumerated for each, this can be set and enumerates the corresponding attribute for enumerating class of item.And To attribute assignment.Such as attribute value, when being " 0 ", representative does not show and enumerates data, when attribute value is " 1 ", represents display enumerator According to.Above-mentioned electronic equipment send to above-mentioned second server call respectively enumerate that item is corresponding to enumerate class when, can be by above-mentioned piece The attribute value for lifting class is sent to above-mentioned second server simultaneously.Second server can judge whether to parse according to above-mentioned attribute value This is called to enumerate class return value.
Second server will respectively be enumerated the corresponding return value for enumerating class of item to calling according to pre-defined rule and be parsed To data of enumerating above-mentioned electronic equipment is sent to by network.
Above-mentioned electronic equipment receive it is above-mentioned enumerates data, and construct this and enumerate each of item and enumerate the corresponding view of data. It namely shows and above-mentioned respectively enumerates data.
Further, above-mentioned electronic equipment sends subscriber terminal equipment (such as Fig. 1 for above-mentioned displaying result by network Shown in subscriber terminal equipment 101,102,103).
Method provided in this embodiment for enumerating data access, passes through the access request according to user to the page, root According to access request enumerating of calling that the page includes, item is corresponding to enumerate class, then receives and shows pre-defined rule to calling each institute State enumerate that the corresponding return value for enumerating class of item parses enumerate data, to realize that Web application front end enumerates item It is updated as the update of class is enumerated in rear end, has saved and enumerated the synchronous institute of category code using rear end in Web application front end and Web The cost of the exploitation and maintenance that need.In addition, enumerating data using above method access, it can to enumerate class as a component It is applied in each page by developer, convenient for extending the use scope for enumerating class.
Continue ginseng and open Fig. 3, Fig. 3 is a signal of the application scenarios of the method for enumerating data access of the present embodiment Figure.In the application scenarios 300 of Fig. 3, above-mentioned electronic equipment 302 receives the accessing page request of application from user terminal 301 303.What above-mentioned electronic equipment 302 called that the above-mentioned page in second server 304 includes enumerate, and item is corresponding to enumerate class 305. The corresponding multiple classes of enumerating of above-mentioned application can be loaded onto memory in advance in above-mentioned second server 304.Above-mentioned second clothes Business device 304 receive above-mentioned electronic equipment to the above-mentioned call request 305 for enumerating class after, can be searched from memory above-mentioned The page is corresponding each to enumerate class 306.Obtain above-mentioned each return value 307 for enumerating class.By above-mentioned each return for enumerating class Value parses to obtain according to pre-defined rule each enumerates that class is corresponding to enumerate data 308.It is finally sent to above-mentioned electronic equipment above-mentioned It is each to enumerate that class is corresponding to enumerate data 309.Above-mentioned electronic equipment 302, which receives, above-mentioned enumerates data and to above-mentioned terminal device exhibition Show 310.
Method provided in this embodiment is added according to access request from advance by receiving user to the access request of the page Carry it is multiple enumerate to search in class enumerate that item is corresponding to enumerate class with multiple included by the above-mentioned page, sequentially for page correspondence It is multiple enumerate each of class enumerate class according to preset rules parse this enumerate class it is corresponding it is multiple enumerate data, and will solution The data of enumerating being precipitated are sent to front end so that front end, which is shown, enumerates data, to realize the rear end in Web application to enumerating In class when enumerating data and modifying and add, do not need to enumerate class the corresponding modification in front end is above-mentioned, to can both save The time of Web application code maintenance, the maintainability of Web application code can also be increased.
In some optional implementations of the present embodiment, Model View Controller can be set in above-mentioned electronic equipment (Model-View-Controller, MVC).Above-mentioned electronic equipment can be by involved by Model View Controller and the offer page And method and the servers (such as second server shown in FIG. 1) of data interact.It can also in above-mentioned second server Model View Controller is arranged.Above-mentioned electronic equipment can be by the Model View Controller that is arranged in above-mentioned electronic equipment To judge respectively to enumerate, item is corresponding enumerates class.And piece being arranged in second server is called by above-mentioned Model View Controller Lift class.It specifically, may include multiple interfaces for enumerating class in above-mentioned Model View Controller, Model View Controller is according to page The interface calling for class that face was related to enumerate enumerates class.
In some optional implementations of the present embodiment, above-mentioned Model View Controller can be exchanged according to what is received Enumerate the return value of class be resolved to enumerate data, building enumerates the relevant view of data to this.Above-mentioned electronic equipment It can show the view, and the view is sent to the terminal device of user.
In some optional implementations of the present embodiment, class is enumerated for each, is respectively provided in above-mentioned electronic equipment There is this to enumerate the note of class.The note that class is enumerated for each can set the application of the note in the statement of the note Range.Above-mentioned electronic equipment can be searched and above-mentioned page by each note for enumerating class from pre-loaded multiple enumerate in class Included by face it is multiple enumerate in item each enumerate that item is corresponding to enumerate class.
In some optional implementations of the present embodiment, corresponds to any one and enumerate class, above-mentioned electronic equipment can lead to It crosses above-mentioned view controller and using loop iteration method parses this and enumerate class and correspond to and multiple enumerate data.Specifically, above-mentioned electricity Sub- equipment can pass through view controller
In some optional implementations of the present embodiment, in step 203, loop iteration method can be used and parse This enumerates that class is corresponding multiple to enumerate data.
In some optional implementations of the present embodiment, above-mentioned electronic equipment can pass through model according to access request View controller is called each before enumerating that item is corresponding and enumerating class, registers and binds each in Model View Controller It enumerates item and each enumerates that item is corresponding to enumerate class.In this way, being asked when above-mentioned electronic equipment receives user to the access of the page When asking, the Model View Controller that is arranged in above-mentioned electronic equipment is searched to be enumerated with what each in the page enumerated that item binds Class.And this is called to enumerate class by the interface for enumerating class.
With further reference to Fig. 4, as the realization to method shown in above-mentioned each figure, this application provides one kind to be used for enumerator According to one embodiment of the device of access, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which specifically may be used To be applied in various electronic equipments.
As shown in figure 4, the device 400 for enumerating data access of the present embodiment includes: the first receiving unit 401, adjusts With unit 402 and the second receiving unit 403.Wherein, the first receiving unit 401 is configured to receive user to the page of application Access request, wherein the page includes multiple enumerating item;Call unit 402 is configured to be regarded according to access request by model Figure controller calls multiple enumerate respectively to enumerate that item is corresponding to enumerate class in item;Second receiving unit 403, is configured to receive It enumerates data to what calling respectively enumerated that the corresponding return value for enumerating class of item parses according to pre-defined rule and shows.
In the present embodiment, for enumerating the first receiving unit 401,402 and of call unit of the device 400 of data access The specific processing of second receiving unit 403 and its brought technical effect can be respectively with reference to steps in Fig. 2 corresponding embodiment 201, step 202, the related description of step 203, details are not described herein.
In some optional implementations of the present embodiment, above-mentioned call unit 402 is further configured to: passing through model View controller enumerates class respective explain from multiple enumerate and screens that page-out is corresponding multiple to enumerate class simultaneously in class according to multiple It calls.
In some optional implementations of the present embodiment, above-mentioned second receiving unit is further configured to for any One is enumerated class, receives that the return value for enumerating class corresponding multiple enumerates data by using loop iteration method parses And it shows.
In some optional implementations of the present embodiment, the device 400 for enumerating data access further includes that binding is single First (not shown).Above-mentioned binding unit, which is configured to call in above-mentioned call unit, passes through model view according to access request Controller call it is multiple enumerate respectively enumerate that item is corresponding in item and enumerate class before, register and tie up in Model View Controller It is fixed respectively to enumerate that item is corresponding to enumerate class.
Referring to FIG. 5, it illustrates the structural representations of the computer system 500 for the electronic equipment for being applicable in the embodiment of the present application Figure.
As shown in figure 5, computer system 500 includes central processing unit (CPU) 501, it can be read-only according to being stored in Program in memory (ROM) 502 or be loaded into the program in random access storage device (RAM) 503 from storage section 508 and Execute various movements appropriate and processing.In RAM 503, also it is stored with system 500 and operates required various programs and data. CPU501, ROM 502 and RAM 503 is connected with each other by bus 504.Input/output (I/O) interface 505 is also connected to always Line 504.
I/O interface 505 is connected to lower component: the importation 506 including keyboard, mouse etc.;Including such as liquid crystal Show the output par, c 507 of device (LCD) and loudspeaker etc.;Storage section 508 including hard disk etc.;And including such as LAN card, The communications portion 509 of the network interface card of modem etc..Communications portion 509 executes communication via the network of such as internet Processing.Driver 510 is also connected to I/O interface 505 as needed.Detachable media 511, such as disk, CD, magneto-optic disk, Semiconductor memory etc. is mounted on as needed on driver 510, in order to from the computer program read thereon according to need It is mounted into storage section 508.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communications portion 509, and/or from detachable media 511 are mounted.When the computer program is executed by central processing unit (CPU) 501, limited in execution the present processes Above-mentioned function.It should be noted that the computer-readable medium of the application can be computer-readable signal media or calculating Machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but it is unlimited In system, server or the device of --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In this application, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, server or device use or overdue combined use.And In the application, computer-readable signal media may include in a base band or the data as the propagation of carrier wave a part are believed Number, wherein carrying computer-readable program code.The data-signal of this propagation can take various forms, including but not It is limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer Any computer-readable medium other than readable storage medium storing program for executing, the computer-readable medium can send, propagate or transmit use In the program by the use of instruction execution system, server or device or overdue combined use.It is wrapped on computer-readable medium The program code contained can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc., or Above-mentioned any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor packet Include the first receiving unit, call unit and the second receiving unit.Wherein, the title of these units not structure under certain conditions The restriction of the pairs of unit itself, for example, the first receiving unit is also described as " receiving visit of the user to the page of application Ask the unit of request ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in device described in above-described embodiment;It is also possible to individualism, and without in the supplying device.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the device, so that should Device: receiving user to the access request of the page of application, and wherein the page includes multiple enumerating item;Pass through mould according to access request Type view controller calls multiple enumerate respectively to enumerate that item is corresponding to enumerate class in item;It receives each to calling according to pre-defined rule That enumerates that the corresponding return value for enumerating class of item parses enumerates data and shows.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from the inventive concept, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (12)

1. a kind of method for enumerating data access, which is characterized in that the described method includes:
User is received to the access request of the page of application, wherein the page includes multiple enumerating item;
The multiple enumerate is called each in item described to enumerate that item is corresponding to enumerate class according to the access request;
What the return value that class is enumerated in reception according to pre-defined rule described in calling parsed enumerates data and shows.
2. the method according to claim 1, wherein described call the multiple enumerate according to the access request It is each in described to enumerate that item is corresponding to enumerate class, comprising:
It is based on multiple enumerating the respective note of class and from the multiple enumerate filtering out the page in class according to the access request It is corresponding multiple to enumerate class and call.
3. the method according to claim 1, wherein described call the multiple enumerate according to the access request It is each in described to enumerate that item is corresponding to enumerate class, comprising:
It is called according to the access request by Model View Controller and the multiple enumerates that each in item described to enumerate item right respectively That answers enumerates class.
4. according to the method described in claim 3, it is characterized in that, passing through model view control according to the access request described Device processed call it is the multiple enumerate in item it is each it is described enumerate that item is corresponding and enumerate class before, the method also includes:
It registers and binds in the Model View Controller and respectively enumerate that item is corresponding to enumerate class.
5. the method according to claim 1, wherein described receive according to pre-defined rule to calling each described enumerate What the corresponding return value for enumerating class of item parsed enumerates data and shows, comprising:
Class is enumerated for any one, reception is corresponding by using the return value that this that loop iteration method parses enumerates class It is multiple to enumerate data and show.
6. a kind of for enumerating the device of data access, which is characterized in that described device includes:
First receiving unit is configured to receive user to the access request of the page of application, wherein the page includes multiple Enumerate item;
Call unit is configured to call the multiple enumerate in item respectively by Model View Controller according to the access request It is described to enumerate that item is corresponding to enumerate class;
Second receiving unit is configured to receive and enumerates piece that the return value of class parses described in calling according to pre-defined rule It lifts data and shows.
7. device according to claim 6, which is characterized in that the call unit is further configured to:
It is based on multiple enumerating the respective note of class and from the multiple enumerate filtering out the page in class according to the access request It is corresponding multiple to enumerate class and call.
8. device according to claim 6, which is characterized in that the call unit is further configured to: according to described Access request calls the multiple enumerate each in item described to enumerate that item is corresponding to enumerate class by Model View Controller.
9. device according to claim 8, which is characterized in that described device further includes binding unit,
The binding unit is configured to be called according to the access request by Model View Controller in the call unit It is the multiple enumerate in item it is each it is described enumerate that item is corresponding and enumerate class before, registered simultaneously in the Model View Controller Binding respectively enumerates that item is corresponding to enumerate class.
10. device according to claim 6, which is characterized in that second receiving unit is further configured to:
Class is enumerated for any one, reception is corresponding by using the return value that this that loop iteration method parses enumerates class It is multiple to enumerate data and show.
11. a kind of electronic equipment, comprising:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors Realize such as method as claimed in any one of claims 1 to 5.
12. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor Such as method as claimed in any one of claims 1 to 5 is realized when execution.
CN201710971811.XA 2017-10-18 2017-10-18 Method and apparatus for enumerating data access Pending CN109683870A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710971811.XA CN109683870A (en) 2017-10-18 2017-10-18 Method and apparatus for enumerating data access

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710971811.XA CN109683870A (en) 2017-10-18 2017-10-18 Method and apparatus for enumerating data access

Publications (1)

Publication Number Publication Date
CN109683870A true CN109683870A (en) 2019-04-26

Family

ID=66182844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710971811.XA Pending CN109683870A (en) 2017-10-18 2017-10-18 Method and apparatus for enumerating data access

Country Status (1)

Country Link
CN (1) CN109683870A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825459A (en) * 2019-11-08 2020-02-21 深圳前海环融联易信息科技服务有限公司 Enumeration constant hot loading method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060015936A1 (en) * 2004-06-08 2006-01-19 Daniel Illowsky System method and model for social security interoperability among intermittently connected interoperating devices
CN101176300A (en) * 2005-04-18 2008-05-07 捷讯研究有限公司 System and method for generating a wireless application from a web service definition
CN102480504A (en) * 2010-11-30 2012-05-30 金蝶软件(中国)有限公司 Method and system for accessing enumerated data
CN103561019A (en) * 2013-10-30 2014-02-05 上海斐讯数据通信技术有限公司 Method for TR069 data access
US20150143524A1 (en) * 2013-11-19 2015-05-21 Veracode, Inc. System and method for implementing application policies among development environments

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060015936A1 (en) * 2004-06-08 2006-01-19 Daniel Illowsky System method and model for social security interoperability among intermittently connected interoperating devices
CN101176300A (en) * 2005-04-18 2008-05-07 捷讯研究有限公司 System and method for generating a wireless application from a web service definition
CN102480504A (en) * 2010-11-30 2012-05-30 金蝶软件(中国)有限公司 Method and system for accessing enumerated data
CN103561019A (en) * 2013-10-30 2014-02-05 上海斐讯数据通信技术有限公司 Method for TR069 data access
US20150143524A1 (en) * 2013-11-19 2015-05-21 Veracode, Inc. System and method for implementing application policies among development environments

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DARREN JI: "MVC中下拉框显示枚举项", 《HTTPS://WWW.CNBLOGS.COM/DARRENJI/P/3658375.HTML》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825459A (en) * 2019-11-08 2020-02-21 深圳前海环融联易信息科技服务有限公司 Enumeration constant hot loading method and device, computer equipment and storage medium
CN110825459B (en) * 2019-11-08 2023-11-03 深圳前海环融联易信息科技服务有限公司 Enumeration constant hot loading method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107357914B (en) Information processing method and device
CN108805594A (en) Information-pushing method and device
CN109542445A (en) A kind of method and apparatus that Android plug-in unit melts hair
CN110109659A (en) A kind of system that realizing front end applications scaffold and server
CN106896937A (en) Method and apparatus for being input into information
CN110109979A (en) A kind of allocation list radio button method and apparatus
CN109714332A (en) The method for converting protocol and device parsed based on Thrift and syntax tree
CN108924197A (en) Electronics price tag system and its data communications method
CN107729246A (en) For the auxiliary test methods of intended application, device, equipment and storage medium
CN107797804A (en) The method and apparatus for generating front end interactive interface
CN109558323A (en) For debugging system, the method and apparatus of the page
CN110362304A (en) The method and apparatus of web displaying
CN110020376A (en) Data linkage method and system
CN108958826A (en) The method and apparatus of dynamic configuration application installation package
CN107463406A (en) Issue the method and electronic equipment of Mobile solution
CN109582317A (en) Method and apparatus for debugging boarding application
CN107347093A (en) Collocation method and device for distributed server system
CN109002282A (en) A kind of method and apparatus for realizing animation effect in web page exploitation
CN109271160A (en) Active rule construction method, device and computer system, medium
CN106201010B (en) Method for adding word bank and device
CN110109983A (en) A kind of method and apparatus operating Redis database
CN110020349A (en) The method and device of page rendering
CN107515947A (en) picture loading method and its system
CN109947423A (en) Code generating method, device, terminal and medium
CN109981546A (en) The method and apparatus for obtaining the far call relationship between application module

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190426