Disclosure of Invention
In view of the above, the present invention is directed to a resource access method and apparatus, and an electronic device, which are capable of accessing resources in multiple scenarios.
Based on the above purpose, the present invention provides a resource access method, which includes:
s11: judging the network state, if the network state is in the networking state, executing the step S12, and if the network state is not in the networking state, executing the step S13:
s12: judging the login state, if the login state is in the login state, executing the step S14, and if the login state is not in the login state, executing the step S13;
s13: judging the geographical position state, if the geographical position state is in the specific area, executing the step S14, and if the geographical position state is out of the specific area, executing the step S15;
s14: acquiring resources stored in a database;
s15: the resources cannot be acquired.
Optionally, the database stores a plurality of resources, where the plurality of resources include a plurality of resources divided according to usage scope, and the resource of the same usage scope includes a plurality of resources divided according to user identity.
Optionally, the corresponding resource is obtained from the database according to the identification information of the specific area and the user identity corresponding to the login state.
Optionally, the resources are saved in a cloud server, and the resources are managed by the cloud server.
An embodiment of the present invention further provides a resource access apparatus, including:
the network state detection module is used for detecting the network state, wherein the network state comprises a networking state and an non-networking state;
the login state detection module is used for detecting login states, wherein the login states comprise a logged-in state and a logged-out state;
the system comprises a geographic position detection module, a display module and a display module, wherein the geographic position detection module is used for detecting a geographic position state, and the geographic position state comprises that the geographic position state is positioned in a specific area and is positioned outside the specific area;
a database for storing resources;
and the judging module is used for judging whether the resources can be acquired from the database or not according to the network state, the login state and the geographic position state.
Optionally, the apparatus further comprises: the judgment module judges as follows: if the network is in the networking state and the network is in the logged-in state, the resource can be obtained from the database; if the network is in the networking state and the network is not in the login state, if the network is in the specific area, the resource can be obtained from the database, and if the network is out of the specific area, the resource cannot be obtained from the database; if the network is in the non-networking state, the resource can be acquired from the database if the network is in the specific area, and if the network is out of the specific area, the resource cannot be acquired from the database.
Optionally, the resource includes multiple resources divided according to a usage scope, and for the resource with the same usage scope, the resource includes multiple resources divided according to a user identity.
Optionally, the corresponding resource is obtained from the database according to the identification information of the specific area and the user identity corresponding to the login state.
Optionally, the apparatus further comprises:
and the cloud server is used for storing the resources and managing the resources.
The embodiment of the invention also provides electronic equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the resource access method when executing the program.
From the above, the resource access method, the resource access device and the electronic device provided by the invention judge whether the resource can be acquired according to the network state, the login state and the geographic position state. By utilizing the method and the device, the resources can be accessed under various scene conditions, and the convenience of resource access is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to specific embodiments and the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
FIG. 1 is a schematic flow chart of a method according to an embodiment of the present invention. As shown in the figure, the resource access method provided in the embodiment of the present invention includes:
s10: performing an access resource action;
s11: judging the network state, if the network state is in the networking state, executing the step S12, and if the network state is not in the networking state, executing the step S13:
s12: judging the login state, if the login state is in the login state, executing the step S14, and if the login state is not in the login state, executing the step S13;
s13: judging the geographical position state, if the geographical position state is in the specific area, executing the step S14, and if the geographical position state is out of the specific area, executing the step S15;
s14: and acquiring resources stored in the database.
S15: the resources cannot be acquired.
In the embodiment of the invention, whether the resources can be normally acquired and accessed is judged according to conditions such as a network state, a user login state, a geographical position state and the like. Specifically, if the terminal is in a networking state and is logged in, the terminal can acquire and access resources from the database without considering the geographic position; if the network is in the networking state but not logged in, judging whether the resources can be acquired according to the geographic position state; and if the network is in the non-networking state, judging whether the resources can be acquired according to the geographic position state.
In a specific embodiment, for the teaching resources in the electronic schoolbag, the teaching resources are stored in the local database of the electronic schoolbag. If the electronic schoolbag is in a networking state and is logged in, acquiring corresponding teaching resources from a local database; if the electronic schoolbag is in a networking state but is not logged in, the teaching resources can be acquired from the local database in the school zone, and the teaching resources cannot be acquired in the school zone; if the school zone is in an unconnected state, the teaching resources can be acquired from the local database in the school zone, and the teaching resources cannot be acquired in the school zone outside the school zone.
The local database stores a plurality of resources, and the resources are associated with resource sources and user identities. For example, teaching resources in an electronic schoolbag include teaching resources of each school, and teaching resources of the same school are divided into resources accessible by a teacher, resources accessible by students, resources accessible by parents, and the like. When teaching resources are accessed, the specific identity of the specific school corresponding to the user identity information is determined through the logged user identity information, and then the corresponding resources are searched and obtained from the local database.
And resources are also stored in the cloud server, and when the network is in a networking state and the teacher logs in, the resources can be updated, namely, the newly added resources are uploaded to the cloud server, and meanwhile, the resources in the local database are updated. The administrator can also manage resources in the cloud server, including adding, deleting, and modifying resources.
Fig. 2 is a schematic structural diagram of an apparatus according to an embodiment of the present invention. As shown in the figure, the resource access apparatus provided in the embodiment of the present invention includes:
the network state detection module is used for detecting the network state, and the network state comprises a networking state and an non-networking state;
the login state detection module is used for detecting login states, wherein the login states comprise a logged-in state and a logged-out state;
the geographic position detection module is used for detecting a geographic position state, and the geographic position state comprises that the geographic position state is positioned in a specific area and is positioned outside the specific area;
a local database for storing resources;
and the judging module is used for judging whether the resources can be acquired from the database or not according to the network state, the login state and the geographic position state.
The judging module judges whether the resource can be acquired from the database according to the network state, the login state and the geographic position state, and specifically comprises the following steps: if the network is in the networking state and the logging state is achieved, resources can be obtained from the local database and accessed; if the mobile terminal is in the networking state and is not in the login state, further judging according to the geographic position state, if the mobile terminal is in the specific area, acquiring resources from the local database, and if the mobile terminal is out of the specific area, not acquiring the resources from the local database; if the local database is in the non-networking state, the local database can be acquired from the local database according to the geographic position state, and if the local database is outside the specific area, the resources can not be acquired from the local database.
The local database stores a plurality of resources, wherein the plurality of resources comprise a plurality of resources divided according to the use range, and for the resources in the same use range, the plurality of resources divided according to the user identity are also included. And acquiring corresponding resources from a local database according to the identification information of the specific area and the user identity corresponding to the login state.
The resource access device further comprises:
and the cloud server is used for storing resources and managing the resources.
Based on the above purpose, an embodiment of an apparatus for executing the resource access method is also provided in the embodiments of the present invention. The device comprises:
one or more processors, and a memory.
The apparatus for performing the resource access method may further include: an input device and an output device.
The processor, memory, input device, and output device may be connected by a bus or other means.
The memory, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the resource access methods in the embodiments of the present invention. The processor executes various functional applications and data processing of the server by executing the nonvolatile software programs, instructions and modules stored in the memory, that is, the resource access method of the above-described method embodiment is realized.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of an apparatus performing the resource access method, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory optionally includes memory remotely located from the processor, and these remote memories may be connected to the member user behavior monitoring device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means may receive input numeric or character information and generate key signal inputs related to user settings and function control of the apparatus performing the resource access method. The output device may include a display device such as a display screen.
The one or more modules are stored in the memory and, when executed by the one or more processors, perform the resource access method of any of the method embodiments described above. The technical effect of the embodiment of the device for executing the resource access method is the same as or similar to that of any method embodiment.
The embodiment of the invention also provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the processing method of the list item operation in any method embodiment. Embodiments of the non-transitory computer storage medium may be the same or similar in technical effect to any of the method embodiments described above.
Finally, it should be noted that, as will be understood by those skilled in the art, all or part of the processes in the methods of the above embodiments may be implemented by a computer program that can be stored in a computer-readable storage medium and that, when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like. The technical effect of the embodiment of the computer program is the same as or similar to that of any of the method embodiments described above.
Furthermore, the apparatuses, devices, etc. described in the present disclosure may be various electronic terminal devices, such as a mobile phone, a Personal Digital Assistant (PDA), a tablet computer (PAD), a smart television, etc., and may also be large terminal devices, such as a server, etc., and therefore the scope of protection of the present disclosure should not be limited to a specific type of apparatus, device. The client disclosed by the present disclosure may be applied to any one of the above electronic terminal devices in the form of electronic hardware, computer software, or a combination of both.
Furthermore, the method according to the present disclosure may also be implemented as a computer program executed by a CPU, which may be stored in a computer-readable storage medium. The computer program, when executed by the CPU, performs the above-described functions defined in the method of the present disclosure.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
Further, it should be appreciated that the computer-readable storage media (e.g., memory) described herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM is available in a variety of forms such as synchronous RAM (DRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
The various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein may be implemented or performed with the following components designed to perform the functions described herein: a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
Disclosed exemplary embodiments should be noted, however, that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosure may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a," "an," "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The above-mentioned serial numbers of the embodiments of the present disclosure are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of an embodiment of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention. .