CN114357481A - Access method, apparatus, computer device and storage medium for storage circuit - Google Patents
Access method, apparatus, computer device and storage medium for storage circuit Download PDFInfo
- Publication number
- CN114357481A CN114357481A CN202111646325.3A CN202111646325A CN114357481A CN 114357481 A CN114357481 A CN 114357481A CN 202111646325 A CN202111646325 A CN 202111646325A CN 114357481 A CN114357481 A CN 114357481A
- Authority
- CN
- China
- Prior art keywords
- access
- token
- module
- storage circuit
- access module
- 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
Links
Images
Landscapes
- Storage Device Security (AREA)
Abstract
Description
技术领域technical field
本申请实施例涉及通信技术领域,特别是涉及一种存储电路的访问方法、装置、计算机设备和存储介质。The embodiments of the present application relate to the field of communication technologies, and in particular, to a method, apparatus, computer device, and storage medium for accessing a storage circuit.
背景技术Background technique
随着通信技术的发展,终端设备一般带有近距离无线通信(Near FieldCommunication,NFC)芯片,NFC芯片集成了嵌入式安全单元(embedded Secure Element,eSE),eSE可以存储多种类型的用户数据。然而,eSE存在多种接口访问的情况,不同接口对eSE同时访问可能造成访问冲突。With the development of communication technology, terminal equipment generally has a Near Field Communication (Near Field Communication, NFC) chip, and the NFC chip integrates an embedded Secure Element (eSE), and the eSE can store various types of user data. However, the eSE has access to multiple interfaces, and simultaneous access to the eSE by different interfaces may cause access conflicts.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种存储电路的访问方法、装置、计算机设备和存储介质,可以避免多模块同时访问存储电路时可能存在的访问冲突。The embodiments of the present application provide an access method, apparatus, computer device, and storage medium for a storage circuit, which can avoid access conflicts that may exist when multiple modules simultaneously access a storage circuit.
一种存储电路的访问方法,应用于令牌管理模块,所述方法包括:An access method for a storage circuit, applied to a token management module, the method comprising:
接收第一访问模块发送的令牌申请请求;Receive a token application request sent by the first access module;
响应于所述令牌申请请求获取令牌的占用状态;obtaining the occupancy status of the token in response to the token application request;
当所述占用状态为未占用时,授权所述令牌至所述第一访问模块,以指示所述第一访问模块通过所述令牌访问所述存储电路。When the occupied state is not occupied, authorize the token to the first access module to instruct the first access module to access the storage circuit through the token.
一种存储电路的访问方法,应用于第二访问模块,所述方法包括:An access method for a storage circuit, applied to a second access module, the method comprising:
接收令牌管理模块发送的中断指令,所述中断指令为所述令牌管理模块在第二时长内接收到第一访问模块发送的令牌申请请求的次数大于预设次数时生成的指令;receiving an interruption instruction sent by the token management module, where the interruption instruction is an instruction generated when the token management module receives a token application request sent by the first access module for a number of times greater than a preset number of times within a second time period;
响应于所述中断指令中断对所述存储电路的访问,并在中断访问的位置生成中断断点;interrupting the access to the storage circuit in response to the interrupt instruction, and generating an interrupt breakpoint at the position where the access is interrupted;
释放所述令牌至所述令牌管理模块,所述令牌管理模块用于授权令牌至所述第一访问模块和所述第二访问模块,以指示所述第一访问模块和所述第二访问模块通过所述令牌分时访问所述存储电路。releasing the token to the token management module, where the token management module is used to authorize the token to the first access module and the second access module to instruct the first access module and the The second access module accesses the storage circuit by time-sharing through the token.
一种存储电路的访问装置,包括:An access device for a storage circuit, comprising:
请求接收模块,用于接收第一访问模块发送的令牌申请请求;a request receiving module, configured to receive a token application request sent by the first access module;
状态获取模块,用于响应于所述令牌申请请求获取所述令牌的占用状态;a state acquisition module, configured to acquire the occupation state of the token in response to the token application request;
令牌授权模块,用于当所述占用状态为未占用时,授权所述令牌至所述第一访问模块,以指示所述第一访问模块通过所述令牌访问所述存储电路。A token authorization module, configured to authorize the token to the first access module when the occupation state is unoccupied, so as to instruct the first access module to access the storage circuit through the token.
一种存储电路的访问装置,包括:An access device for a storage circuit, comprising:
中断接收模块,用于接收令牌管理模块发送的中断指令,所述中断指令为所述令牌管理模块在第二时长内接收到第一访问模块发送的令牌申请请求的次数大于预设次数时生成的指令;An interruption receiving module, configured to receive an interruption instruction sent by the token management module, where the interruption instruction is that the number of times the token management module receives the token application request sent by the first access module within the second time period is greater than a preset number of times command generated when
访问中断模块,用于响应于所述中断指令中断对所述存储电路的访问,并在中断访问的位置生成中断断点;an access interrupt module, configured to interrupt access to the storage circuit in response to the interrupt instruction, and generate an interrupt breakpoint at the location where the access is interrupted;
令牌释放模块,用于释放所述令牌至所述令牌管理模块,所述令牌管理模块用于授权令牌至所述第一访问模块和第二访问模块,以指示所述第一访问模块和所述第二访问模块通过所述令牌分时访问所述存储电路。a token release module for releasing the token to the token management module, the token management module for authorizing the token to the first access module and the second access module to instruct the first access module The access module and the second access module access the storage circuit by time-sharing through the token.
一种存储电路的访问装置,包括处理器、通信模块、令牌管理模块和存储电路,所述处理器、所述通信模块分别与所述存储电路连接,且所述处理器、所述通信模块分别与所述令牌管理模块连接,所述处理器和所述通信模块分时访问所述存储电路,所述处理器和所述通信模块中的一个为第一访问模块;An access device for a storage circuit, comprising a processor, a communication module, a token management module and a storage circuit, the processor and the communication module are respectively connected to the storage circuit, and the processor and the communication module are respectively connected to the storage circuit. respectively connected to the token management module, the processor and the communication module access the storage circuit in a time-sharing manner, and one of the processor and the communication module is a first access module;
其中,所述令牌管理模块用于接收所述第一访问模块发送的令牌申请请求;响应于所述令牌申请请求获取所述令牌的占用状态;当所述占用状态为未占用时,授权令牌至所述第一访问模块,以指示所述第一访问模块通过所述令牌访问所述存储电路。Wherein, the token management module is configured to receive the token application request sent by the first access module; obtain the occupation status of the token in response to the token application request; when the occupation status is unoccupied , authorizing a token to the first access module to instruct the first access module to access the storage circuit through the token.
一种计算机设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如上述的存储电路的访问方法的步骤。A computer device includes a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor causes the processor to execute the steps of the above-mentioned storage circuit access method.
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上述的存储电路的访问方法的步骤。A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of the access method for the storage circuit as described above.
上述存储电路的访问方法,通过查询令牌的占用状态,确定存储电路是否正在被访问,并可以在令牌未被占用,也即存储电路未被占用时,授权令牌给与令牌申请请求相对应的第一访问模块。从而可以避免多个访问模块同时访问存储电路时,发生造成访问冲突的问题,进而提高了存储电路的访问可靠性。In the access method of the above storage circuit, whether the storage circuit is being accessed is determined by querying the occupancy status of the token, and the authorization token can be given to the token application request when the token is not occupied, that is, the storage circuit is not occupied. The corresponding first access module. Therefore, when multiple access modules access the storage circuit at the same time, the problem of access conflict can be avoided, thereby improving the access reliability of the storage circuit.
附图说明Description of drawings
为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application or related technologies more clearly, the following briefly introduces the accompanying drawings that are used in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only the For some embodiments of the application, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1为一实施例的存储电路的访问方法的应用环境示意图之一;1 is a schematic diagram of an application environment of an access method for a storage circuit according to an embodiment;
图2为一实施例的存储电路的访问方法的应用环境示意图之二;FIG. 2 is a second schematic diagram of an application environment of an access method for a storage circuit according to an embodiment;
图3为一实施例的存储电路的访问方法的应用环境示意图之三;FIG. 3 is a third schematic diagram of an application environment of an access method for a storage circuit according to an embodiment;
图4为一实施例的存储电路的访问方法的流程图之一;4 is one of the flow charts of an access method for a storage circuit according to an embodiment;
图5为一实施例的存储电路的访问方法的流程图之二;FIG. 5 is the second flowchart of an access method for a storage circuit according to an embodiment;
图6为一实施例的存储电路的访问方法的流程图之三;FIG. 6 is a third flowchart of a method for accessing a storage circuit according to an embodiment;
图7为一实施例的存储电路的访问方法的流程图之四;FIG. 7 is a fourth flowchart of a method for accessing a memory circuit according to an embodiment;
图8为一实施例的存储电路的访问装置的结构框图之一;FIG. 8 is one of the structural block diagrams of the access device of the storage circuit according to an embodiment;
图9为一实施例的存储电路的访问装置的结构框图之二;FIG. 9 is a second structural block diagram of an access device for a storage circuit according to an embodiment;
图10为一实施例的存储电路的访问装置的结构框图之三;10 is a third structural block diagram of an access device for a storage circuit according to an embodiment;
图11为一实施例的计算机设备的内部结构图。FIG. 11 is an internal structure diagram of a computer device according to an embodiment.
具体实施方式Detailed ways
为了便于理解本申请实施例,下面将参照相关附图对本申请实施例进行更全面的描述。附图中给出了本申请实施例的首选实施例。但是,本申请实施例可以以许多不同的形式来实现,并不限于本文所描述的实施例。相反地,提供这些实施例的目的是使对本申请实施例的公开内容更加透彻全面。In order to facilitate the understanding of the embodiments of the present application, the embodiments of the present application will be described more fully below with reference to the related drawings. Preferred embodiments of the embodiments of the present application are shown in the accompanying drawings. However, the embodiments of the present application may be implemented in many different forms and are not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of the embodiments of the present application will be thorough and complete.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请实施例的技术领域的技术人员通常理解的含义相同。本文中在本申请实施例的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请实施例。本文所使用的术语“及/或”包括一个或多个相关的所列项目的任意的和所有的组合。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field belonging to the embodiments of the present application. The terms used in the description of the embodiments of the present application herein are only for the purpose of describing specific embodiments, and are not intended to limit the embodiments of the present application. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。在本申请的描述中,“若干”的含义是至少一个,例如一个,两个等,除非另有明确具体的限定。In addition, the terms "first" and "second" are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature delimited with "first", "second" may expressly or implicitly include at least one of that feature. In the description of the present application, "plurality" means at least two, such as two, three, etc., unless expressly and specifically defined otherwise. In the description of this application, "several" means at least one, such as one, two, etc., unless expressly and specifically defined otherwise.
本申请实施例提供了一种存储电路的访问方法,本申请实施例的存储电路是指安全元件,安全元件例如为eSE(embedded Secure Element,嵌入式安全单元)。eSE可以存放多种类型的安全类应用的用户数据。其中,安全类应用可以是银行卡应用、身份卡应用、公交卡应用、门禁卡应用、电话卡应用等。相应地,用户数据可以是各类银行卡信息、身份卡信息、公交卡信息、门禁卡信息、移动电话信息等。基于存储电路中存储的用户数据,计算机设备可以通过NFC的方式实现所需的支付、认证等功能。An embodiment of the present application provides an access method for a storage circuit. The storage circuit in the embodiment of the present application refers to a secure element, and the secure element is, for example, an eSE (embedded Secure Element, embedded secure element). eSE can store user data of various types of security applications. The security application may be a bank card application, an identity card application, a bus card application, an access control card application, a phone card application, and the like. Correspondingly, the user data may be various types of bank card information, identity card information, bus card information, access control card information, mobile phone information, and the like. Based on the user data stored in the storage circuit, the computer device can realize the required functions such as payment and authentication by means of NFC.
图1为一实施例的存储电路的访问方法的应用环境示意图之一,参考图1,应用环境包括存储电路100、令牌管理模块300和多个访问模块200,图1中示出的两个访问模块200。前述的各类银行卡应用、身份卡应用、公交卡应用、门禁卡应用、电话卡应用等可以分别对应于不同的访问模块200。示例性地,应用场景中的一个访问模块200可以为AP(application process,应用处理器),AP用于执行银行卡应用、身份卡应用、公交卡应用、门禁卡应用等应用程序,因此,AP可以理解为应用处理模块。另一个访问模块200可以为Modem(调制调解器),Modem用于实现电话卡应用的通信功能,因此,Modem可以理解为通信模块。可选地,存储电路可以被配置为包括多个存储区,不同的存储区分别对应存储有不同的应用和数据。当不同的访问模块200访问存储电路时,可以根据需求信息确定对应的目标存储区,以对目标存储区进行访问,从而提高访问的效率。FIG. 1 is a schematic diagram of an application environment of an access method for a storage circuit according to an embodiment. Referring to FIG. 1 , the application environment includes a
其中,访问模块200可以通过接口与存储电路100连接。不同类型的访问模块200的接口类型可以相同,也可以不同,本实施例不做限定。受访问用户数据的行业影响,不同行业类型的用户数据可以分别通过不同的行业接口被访问。示例性地,当需要从存储电路100中读取银行卡等电子身份证信息时,需要通过串行外设接口(Serial PeripheralInterface,SPI)进行访问。当需要从存储电路100中读取嵌入式SIM卡(Embedded-SIM,eSIM)信息时,需要通过GSMA定义的ISO7816接口进行访问。其中,嵌入式SIM卡是指将传统的实体SIM卡中的信息搬移到eSE中存储所形成的SIM卡。因此,在相关技术中,存在多种接口访问eSE的情况,当不同的接口同时对eSE访问时,就可能造成访问冲突的问题。在本申请实施例中,访问模块200可以响应于相关模块的需求指令访问存储电路,以获取存储的用户数据。示例性地,相关模块可以是计算机设备中的触控模块,触控模块可以响应于用户的触摸操作生成需求指令,且需求指令携带与触摸操作对应的需求信息。可选地,需求信息包括请求访问的访问类型及访问内容等信息。访问类型是指访问的存储类型,例如可以包括应用管理和数据读写。访问内容是指访问某一存储类型时的具体内容,例如包括应用的具体管理类型和数据读写的具体内容。应用的具体管理类型例如为对应用的下载、更新、删除、查询、鉴权、支付等应用服务。因此,若需求信息为查询银行卡在某一日期的交易记录,则相应的访问类型为银行卡信息读取,访问内容可以为银行卡在该日期的交易记录。The
可选地,存储电路100、多个访问模块200和令牌管理模块300均设置在计算机设备中,存储电路100分别与多个访问模块200连接,且令牌管理模块300也分别与多个访问模块200连接。进一步地,令牌管理模块300可以如图2或图3所示集成于不同的访问模块200中,还可以如图1所示设置于全部访问模块200的外部,本实施例不做限定。其中,计算机设备可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑、物联网设备和便携式可穿戴设备,物联网设备可为智能音箱、智能电视、智能空调、智能车载设备等。便携式可穿戴设备可为智能手表、智能手环、头戴设备等。Optionally, the
图4为一实施例的存储电路的访问方法的流程图之一,本实施例的存储电路的访问方法应用于前述的令牌管理模块。参考图4,在其中一个实施例中,存储电路的访问方法包括步骤402至步骤406。FIG. 4 is one of the flow charts of a method for accessing a storage circuit according to an embodiment. The method for accessing a storage circuit in this embodiment is applied to the aforementioned token management module. Referring to FIG. 4 , in one embodiment, the access method of the storage circuit includes
步骤402,接收第一访问模块发送的令牌申请请求。Step 402: Receive a token application request sent by the first access module.
其中,令牌可以理解为访问模块访问存储电路时的暗号。也即,持有有效令牌的访问模块才能访问存储电路,而持有无效令牌或未持有令牌的访问模块无法访问存储电路。因此,第一访问模块在访问存储电路前,需要先通过令牌申请请求向令牌管理模块请求令牌。在获取令牌管理模块授权的令牌后,第一访问模块才能根据令牌访问存储电路。可选地,令牌申请请求可以携带包括访问类型和访问内容的需求信息,以便于令牌管理模块在需要时,根据需求信息评估是否授权令牌给第一访问模块。Among them, the token can be understood as the secret code when the access module accesses the storage circuit. That is, an access module with a valid token can access the storage circuit, while an access module with an invalid token or no token cannot access the storage circuit. Therefore, before accessing the storage circuit, the first access module needs to request a token from the token management module through a token application request. After obtaining the token authorized by the token management module, the first access module can access the storage circuit according to the token. Optionally, the token application request may carry demand information including access type and access content, so that the token management module can evaluate whether to authorize the token to the first access module according to the demand information when needed.
步骤404,响应于令牌申请请求获取令牌的占用状态。
其中,令牌的占用状态与存储电路当前的被访问状态相对应。具体地,若令牌的占用状态为占用,则说明有其他访问模块当前正在占用令牌并访问存储电路。若令牌的占用状态为未占用,则说明当前没有任何访问模块正在访问存储电路。可以理解的是,如果当存储电路正在被其他访问模块访问时,第一访问模块强行访问存储电路,就会造成访问冲突的问题。因此,通过先查询令牌的占用状态,确定存储电路是否正在被访问,再根据查询结果执行相应的操作,可以避免令牌的重复授权,从而可以避免访问冲突的问题。The occupied state of the token corresponds to the current accessed state of the storage circuit. Specifically, if the occupied state of the token is occupied, it means that other access modules are currently occupying the token and accessing the storage circuit. If the occupied state of the token is not occupied, it means that no access module is currently accessing the storage circuit. It can be understood that, if the first access module forcibly accesses the storage circuit when the storage circuit is being accessed by other access modules, a problem of access conflict will be caused. Therefore, by first querying the occupancy status of the token to determine whether the storage circuit is being accessed, and then performing a corresponding operation according to the query result, repeated authorization of the token can be avoided, thereby avoiding the problem of access conflict.
步骤406,当占用状态为未占用时,授权令牌至第一访问模块,以指示第一访问模块通过令牌访问存储电路。
在本实施例中,通过查询令牌的占用状态,确定存储电路是否正在被访问,并可以在令牌未被占用,也即存储电路未被占用时,授权令牌给与令牌申请请求相对应的第一访问模块。从而可以避免多个访问模块同时访问存储电路时,发生造成访问冲突的问题,进而提高了存储电路的访问可靠性。In this embodiment, by querying the occupation status of the token, it is determined whether the storage circuit is being accessed, and when the token is not occupied, that is, when the storage circuit is not occupied, the authorization token is given to the token application request. The corresponding first access module. Therefore, when multiple access modules access the storage circuit at the same time, the problem of access conflict can be avoided, thereby improving the access reliability of the storage circuit.
在其中一个实施例中,当令牌的占用状态为当前被第二访问模块占用时,令牌管理模块可以选择直接中止第二访问模块当前对存储模块的访问,并授权令牌至第一访问模块。令牌管理模块也可以选择根据第一访问模块和第二访问模块的需求信息,进一步评估是否授权令牌至第一访问模块。用户可以根据实际需要设置预设规则,并在占用状态为占用时,根据预设规则进行令牌的分配,本实施例不做限定。In one embodiment, when the occupancy status of the token is currently occupied by the second access module, the token management module may choose to directly suspend the current access of the second access module to the storage module, and authorize the token to the first access module module. The token management module may also choose to further evaluate whether to authorize the token to the first access module according to the requirement information of the first access module and the second access module. The user can set preset rules according to actual needs, and when the occupancy state is occupied, tokens are allocated according to the preset rules, which is not limited in this embodiment.
在其中一个实施例中,若令牌管理模块由于令牌已被占用,而暂时不授权令牌给第一访问模块,则存储电路的访问方法还包括:当占用状态为当前被第二访问模块占用时,返回等待指令至第一访问模块,以指示第一访问模块在第一时长后再次发送令牌申请请求。可以理解的是,当第一访问模块请求访问存储电路时,存储电路可能处于空闲状态,即,当前不存在持有令牌并访问存储电路的第二访问模块,存储电路也可能处于被第二访问模块访问的状态。而且,第一访问模块和第二访问模块具体所指的访问模块可以随时间发生变化。例如,在第一时段内,若银行卡应用请求获取银行卡信息,则第一时段的第一访问模块即是指用于执行银行卡应用的AP。在第二时段内,若eSIM请求获取eSIM信息,则第二时段的第一访问模块即是指用于实现eSIM的通信功能的Modem。相应地,同一访问模块也可以在第一时段内作为第一访问模块,并在第二时段内作为第二访问模块,还可以在第三时段内既不作为第一访问模块也不作为第二访问模块。In one embodiment, if the token management module temporarily does not authorize the token to the first access module because the token is already occupied, the access method of the storage circuit further includes: when the occupied state is currently being accessed by the second access module When occupied, the waiting instruction is returned to the first access module to instruct the first access module to send the token application request again after the first time period. It can be understood that when the first access module requests to access the storage circuit, the storage circuit may be in an idle state, that is, there is currently no second access module holding the token and accessing the storage circuit, and the storage circuit may also be in an idle state. Access the state of module access. Moreover, the access modules specifically referred to by the first access module and the second access module may vary over time. For example, in the first time period, if the bank card application requests to obtain bank card information, the first access module in the first time period refers to the AP for executing the bank card application. In the second period, if the eSIM requests to obtain eSIM information, the first access module in the second period refers to the Modem used to implement the communication function of the eSIM. Correspondingly, the same access module can also be used as the first access module in the first time period and as the second access module in the second time period, and can also be used as neither the first access module nor the second access module in the third time period. Access modules.
其中,在一个可能的实施例中,第一时长可以为配置在第一访问模块中的信息,且第一时长可以根据第一访问模块所处理的业务的紧急程度设置。也即,令牌管理模块每次仅需返回等待指令,而无需告知第一访问模块所需等待的时间。第一访问模块接收到等待指令后,等待预先配置好的第一时长后,可以再次发送令牌申请请求。在另一个可能的实施例中,第一时长可以为等待指令携带的信息。也即,令牌管理模块可以自发选择一个恰当的第一时长,并在发送等待指令时,同步告知第一访问模块需要等待的时长。第一访问模块接收到等待指令后,对等待指令进行解析以获取需要等待的第一时长,并可以在第一时长后再次发送令牌申请请求。Wherein, in a possible embodiment, the first duration may be information configured in the first access module, and the first duration may be set according to the urgency of the service processed by the first access module. That is, the token management module only needs to return the waiting instruction every time, without informing the first access module of the required waiting time. After receiving the waiting instruction, the first access module can send the token application request again after waiting for the preconfigured first duration. In another possible embodiment, the first duration may be information carried by the waiting instruction. That is, the token management module can automatically select an appropriate first duration, and when sending the waiting instruction, synchronously inform the first access module of the duration to wait. After receiving the waiting instruction, the first access module parses the waiting instruction to obtain the first duration of waiting, and can send the token application request again after the first duration.
在本实施例中,通过设置恰当的第一时长,既可以避免第一访问模块过于频繁地发送令牌申请请求,从而避免对信号总线的资源浪费。与此同时,还可以避免第一访问模块长时间无法获得令牌,造成第一访问模块对存储电路的访问延误。因此,基于本实施例的访问方法,可以使第一访问模块以较为合理的频率发送令牌申请请求,并能够较为及时地对存储电路进行访问,以读取存储电路中存储的用户数据。In this embodiment, by setting an appropriate first duration, it is possible to prevent the first access module from sending token application requests too frequently, thereby avoiding waste of resources on the signal bus. At the same time, it can also be avoided that the first access module cannot obtain the token for a long time, resulting in a delay in the access of the first access module to the storage circuit. Therefore, based on the access method of this embodiment, the first access module can send a token application request at a relatively reasonable frequency, and can access the storage circuit in a timely manner to read user data stored in the storage circuit.
在其中一个实施例中,令牌管理模块还用于统计第二时长内接收到令牌申请请求的次数,并根据次数执行相应的操作。其中,第二时长大于第一时长。第一时长例如可以为0.05s、0.1s、1s,第二时长例如可以为0.5s、0.8s、3s,本实施例不做限定。即,若第二时长内接收到令牌申请请求的次数小于预设次数,则说明第一访问模块的访问紧急程度较低,可以等待第二访问模块完成访问后,再将令牌授权给第一访问模块。若第二时长内接收到令牌申请请求的次数大于或等于预设次数,则说明第一访问模块的访问紧急程度较高,需要对第一访问模块和第二访问模块的访问情况进行综合评估,以确定是否将令牌授权给第一访问模块。其中,预设次数可以与第二时长正相关,并与第一时长负相关。即,在第二时长不变的前提下,第一时长越短,可以对应设置越大的预设次数;第一时长越长,可以对应设置越小的预设次数。因此,可以根据第二时长与第一时长之间的比值,具体设置对应的预设次数。In one embodiment, the token management module is further configured to count the number of times the token application request is received within the second time period, and perform corresponding operations according to the number of times. Wherein, the second duration is longer than the first duration. The first duration may be, for example, 0.05s, 0.1s, or 1s, and the second duration may be, for example, 0.5s, 0.8s, or 3s, which is not limited in this embodiment. That is, if the number of token application requests received in the second time period is less than the preset number, it means that the access urgency of the first access module is low, and the token can be authorized to the first access module after the second access module completes the access. An access module. If the number of token application requests received within the second time period is greater than or equal to the preset number of times, it indicates that the access urgency of the first access module is relatively high, and a comprehensive evaluation of the access conditions of the first access module and the second access module is required. , to determine whether to authorize the token to the first access module. The preset number of times may be positively correlated with the second duration and negatively correlated with the first duration. That is, on the premise that the second duration is unchanged, the shorter the first duration, the larger the preset number of times can be set correspondingly; the longer the first duration, the smaller the preset number of times can be set correspondingly. Therefore, the corresponding preset number of times may be specifically set according to the ratio between the second duration and the first duration.
其中,第二时长内接收到令牌申请请求的次数可以是指,在第二时长内,接收到同一第一访问模块发送的令牌申请请求的次数。例如,若计算机设备中同时有两个访问模块都需要访问存储电路,并分别向令牌管理模块发送了令牌申请请求,则这两个访问模块可以同时作为第一访问模块。但是,令牌管理模块需要分别统计各第一访问模块发送令牌申请请求的次数。因此,统计结果例如可以如下,第一访问模块A在第二时长内发送了两次令牌申请请求,且第一访问模块B在第二时长内发送了四次令牌申请请求。基于上述统计结果,需要优先授权令牌给第一访问模块B。The number of times the token application request is received within the second time period may refer to the number of times the token application request sent by the same first access module is received within the second time period. For example, if two access modules in the computer device need to access the storage circuit at the same time, and respectively send token application requests to the token management module, the two access modules can simultaneously serve as the first access module. However, the token management module needs to separately count the number of times that each first access module sends a token application request. Therefore, the statistical results can be as follows, for example, the first access module A sends two token application requests within the second time period, and the first access module B sends four token application requests within the second time period. Based on the above statistical results, the first access module B needs to be given priority to authorize the token.
进一步地,第二时长内接收到令牌申请请求的次数也可以是指,在第二时长内,接收到同一第一访问模块为了执行同一业务发送的令牌申请请求的次数。若同一第一访问模块为了执行不同的业务,并向令牌管理模块分别发送了令牌申请请求,令牌管理模块就需要分别统计各业务对应的次数。例如,若AP为了执行银行卡应用向令牌管理模块发送了一次令牌申请请求,并为了执行公交卡应用向令牌管理模块发送了三次令牌申请请求。令牌管理模块就需要分别统计各业务对应的请求发送次数。因此,统计结果例如可以如下,AP为了执行银行卡应用在第二时长内发送了一次令牌申请请求,且AP为了执行公交卡应用在第二时长内发送了三次令牌申请请求。基于上述统计结果,需要优先授权令牌给AP执行公交卡应用。Further, the number of times the token application requests are received within the second time period may also refer to the number of times the token application requests sent by the same first access module for executing the same service are received within the second time period. If the same first access module sends token application requests to the token management module in order to execute different services, the token management module needs to count the times corresponding to each service respectively. For example, if the AP sends a token application request to the token management module once for executing the bank card application, and sends three token application requests to the token management module for executing the bus card application. The token management module needs to separately count the number of times of request sending corresponding to each service. Therefore, the statistical results may be as follows, for example, the AP sends a token application request within the second period of time to execute the bank card application, and the AP sends three token application requests within the second period of time for the execution of the bus card application. Based on the above statistical results, it is necessary to give priority to the authorization token to the AP to execute the bus card application.
图5为一实施例的存储电路的访问方法的流程图之二,参考图5,在其中一个实施例中,基于上述令牌申请请求的次数的统计结果,存储电路的访问方法包括步骤502至步骤510。需要说明的是,本实施例重点说明占用状态为当前被第二访问模块占用时的实施方式,因此未具体示出前一实施例中占用状态为未占用时的实施方式中的步骤406。而且,本实施例的步骤502至步骤506已在前述实施例中进行说明,可参考前述实施例,此处不再进行赘述。FIG. 5 is the second flow chart of a method for accessing a storage circuit according to an embodiment. Referring to FIG. 5 , in one embodiment, based on the statistical result of the number of times of token application requests, the method for accessing a storage circuit includes
步骤502,接收第一访问模块发送的令牌申请请求。Step 502: Receive a token application request sent by the first access module.
步骤504,响应于令牌申请请求获取令牌的占用状态。
步骤506,当占用状态为当前被第二访问模块占用时,返回等待指令至第一访问模块,以指示第一访问模块在第一时长后再次发送令牌申请请求。
步骤508,若第二时长内接收到令牌申请请求的次数大于预设次数,则发送中断指令至第二访问模块,以指示第二访问模块中断对存储电路的访问。
步骤510,回收第二访问模块的令牌,并将令牌授权至第一访问模块。Step 510: Reclaim the token of the second access module, and authorize the token to the first access module.
在一个可能的实施例中,对于步骤回收第二访问模块的令牌的具体实施方式,可以是第二访问模块接收到中断指令,并中断当前对存储电路的访问后,主动将令牌归还至令牌管理模块。在另一个可能的实施例中,也可以是令牌管理模块在发送中断指令后,主动取消第二访问模块所持有的令牌的访问权限,即,令牌管理模块使第二访问模块所持有的令牌失效。其中,令牌管理模块在主动取消访问权限前,还可以先等待第三时长,以确保第二访问模块已中断对存储电路的访问。In a possible embodiment, for the specific implementation of the step of recycling the token of the second access module, the second access module may take the initiative to return the token to the Token management module. In another possible embodiment, after sending the interrupt instruction, the token management module may actively cancel the access authority of the token held by the second access module, that is, the token management module makes the access rights of the token held by the second access module The token held is invalid. Wherein, before the token management module actively cancels the access authority, it can also wait for a third period of time to ensure that the second access module has interrupted the access to the storage circuit.
在本实施例中,令牌管理模块通过先发送中断指令,再回收第二访问模块的令牌,可以避免第二访问模块的访问权限被突然取消,从而可以避免第二访问模块的访问过程发生错误,进而可以提高第二访问模块的数据读取的准确性。In this embodiment, the token management module sends the interrupt instruction first, and then recycles the token of the second access module, so as to prevent the access authority of the second access module from being suddenly cancelled, thereby avoiding the occurrence of the access process of the second access module error, thereby improving the accuracy of data reading by the second access module.
在其中一个实施例中,第二访问模块接收到中断指令,在中断对存储电路的访问时,可以存储中断访问的位置,即中断断点。通过设置中断断点,可以便于第二访问模块后续直接查找中断断点,并从中断断点继续进行访问,从而提高第二访问模块恢复访问的速度。因此,当通过中断指令从第二访问模块回收令牌后,存储电路的访问方法还包括:当第一访问模块释放令牌时,授权令牌至被中断的第二访问模块,以指示第二访问模块从中断断点继续访问存储电路,中断断点为第二访问模块响应于中断指令中断访问的位置。其中,中断断点可以存储在第二访问模块中,第二访问模块重新获取令牌后,可以先从内部读取已存储的中断断点,并根据中断断点继续对存储电路进行访问,以获取中断前未读取到的部分数据。可以理解的是,在一些实施例中,为了实现读取数据的完整性和连续性,也可以在重新访问存储电路时,重新获取全部数据,本实施例不做限定。In one of the embodiments, the second access module receives the interrupt instruction, and when the access to the storage circuit is interrupted, the location where the access is interrupted, that is, the interrupt breakpoint can be stored. By setting the interruption breakpoint, it is convenient for the second access module to directly search for the interruption point and continue to access from the interruption point, thereby improving the speed of the second access module to resume access. Therefore, after the token is recovered from the second access module through the interrupt instruction, the access method of the storage circuit further includes: when the first access module releases the token, authorizing the token to the interrupted second access module to indicate the second access module. The access module continues to access the storage circuit from the interruption breakpoint, and the interruption breakpoint is the position where the second access module interrupts the access in response to the interruption instruction. The interrupt breakpoint can be stored in the second access module, and after the second access module re-acquires the token, it can first read the stored interrupt breakpoint from the inside, and continue to access the storage circuit according to the interrupt breakpoint, so as to Get some data that was not read before the interruption. It can be understood that, in some embodiments, in order to achieve the integrity and continuity of read data, all data may also be re-acquired when re-accessing the storage circuit, which is not limited in this embodiment.
图6为一实施例的存储电路的访问方法的流程图之三,参考图6,在其中一个实施例中,存储电路的访问方法包括步骤602至步骤614。即,在本实施例中,令牌管理模块发送中断指令至第二访问模块前,还包括:发送询问指令至第二访问模块,以指示第二访问模块根据当前的访问状态信息确定是否同意释放令牌,以及接收到第二访问模块返回的同意释放指令。需要说明的是,本实施例的步骤602至步骤606、以及步骤612至步骤614已在前述实施例中进行说明,可参考前述实施例,此处不再进行赘述。FIG. 6 is a third flowchart of a method for accessing a storage circuit according to an embodiment. Referring to FIG. 6 , in one embodiment, the method for accessing a storage circuit includes
步骤602,接收第一访问模块发送的令牌申请请求。Step 602: Receive a token application request sent by the first access module.
步骤604,响应于令牌申请请求获取令牌的占用状态。
步骤606,当占用状态为当前被第二访问模块占用时,返回等待指令至第一访问模块,以指示第一访问模块在第一时长后再次发送令牌申请请求。
步骤608,若第二时长内接收到令牌申请请求的次数大于预设次数,则发送询问指令至第二访问模块,以指示第二访问模块根据当前的访问状态信息确定是否同意释放令牌。Step 608: If the number of token application requests received in the second time period is greater than the preset number, send an inquiry instruction to the second access module to instruct the second access module to determine whether to agree to release the token according to the current access state information.
其中,访问状态信息包括紧急程度、剩余访问时长和剩余访问数据量中的至少一种。紧急程度例如可以包括非常紧急、较为紧急和一般紧急。剩余访问时长例如可以为0.3s、0.4s等。剩余访问数据量例如可以为200kb、1M等。第二访问模块中可以预先配置有算法规则,第二访问模块可以在接收到询问指令时,获取当前的上述访问状态信息,并根据获取到的访问状态信息和预先配置的算法规则,对当前的访问情况进行综合评价,以确定是否同意释放令牌。进一步地,令牌管理模块还可以将第一访问模块的紧急程度、预计访问时长、预计访问数据量等信息发送给第二访问模块,以使第二访问模块进行更加准确的评估。Wherein, the access state information includes at least one of urgency, remaining access duration and remaining access data volume. The degree of urgency may include, for example, very urgent, relatively urgent, and general urgency. The remaining access duration may be, for example, 0.3s, 0.4s, or the like. The remaining access data amount may be, for example, 200kb, 1M, or the like. Algorithm rules may be preconfigured in the second access module, and the second access module may acquire the current access status information when receiving the query instruction, and, according to the acquired access status information and the preconfigured algorithm rules, analyze the current access status information. The access situation is comprehensively evaluated to determine whether to agree to release the token. Further, the token management module can also send information such as the urgency of the first access module, the estimated access duration, and the estimated access data volume to the second access module, so that the second access module can make a more accurate evaluation.
步骤610,当接收到第二访问模块返回的同意释放指令时,发送中断指令至第二访问模块,以指示第二访问模块中断对存储电路的访问。
步骤612,回收第二访问模块的令牌,并将令牌授权至第一访问模块。Step 612: Reclaim the token of the second access module, and authorize the token to the first access module.
步骤614,当第一访问模块释放令牌时,授权令牌至被中断的第二访问模块,以指示第二访问模块从中断断点继续访问存储电路。
在本实施例中,通过发送询问指令,可以在第二访问模块剩余访问时长较短、或紧急程度较高的情况下,不打断第二访问模块的访问进程,以使第二访问模块完整地完成当前的访问,从而提高访问方法的灵活性。In this embodiment, by sending an inquiry instruction, the access process of the second access module can be not interrupted when the remaining access duration of the second access module is short or the urgency is high, so that the second access module is complete to complete the current access, thereby increasing the flexibility of the access method.
在其中一些实施例中,可以是第二访问模块在请求令牌时,直接将紧急程度、预计访问时长、预计访问数据量等信息发送给令牌管理模块,令牌管理模块就可以直接对将要中断的第二访问模块的访问情况进行评估,而无需向第二访问模块发送询问指令,提高评估速度。可以理解的是,与实际的剩余访问时长和剩余访问数据量相比,预计访问时长和预计访问数据量的准确性略差,相应无法提供非常准确的评估结果。因此,在对准确性要求相对较低的场景下,可以采用本实施例的方案提升交互速度。In some of these embodiments, when the second access module requests a token, it can directly send information such as the urgency, estimated access duration, and estimated access data volume to the token management module, and the token management module can directly respond to the The access situation of the interrupted second access module is evaluated without sending an inquiry instruction to the second access module, which improves the evaluation speed. It is understandable that, compared with the actual remaining access duration and remaining access data volume, the accuracy of the estimated access duration and the estimated access data volume is slightly worse, and accordingly, very accurate evaluation results cannot be provided. Therefore, in a scenario that requires relatively low accuracy, the solution of this embodiment can be used to improve the interaction speed.
在其中一个实施例中,向第二访问模块发送询问指令后,存储电路的访问方法还包括:当接收到第二访问模块返回的拒绝释放指令时,发送暂停请求指令至第一访问模块,以指示第一访问模块暂停发送令牌申请请求。具体地,第二访问模块可以在紧急程度较高或剩余访问时长较短时发送拒绝释放指令。可以理解的是,若第二访问模块当前的评估结果为拒绝释放令牌,则在第二访问模块完成当前的访问任务前,不会针对相同的询问指令变更评估结果为同意释放令牌。因此,即使第一访问模块继续发送令牌申请请求,第二访问模块也不会释放令牌。在本实施例中,通过上述设置方式,可以避免第一访问模块不断发送请求造成总线资源浪费,从而提高计算机设备的运行速度。In one of the embodiments, after sending the inquiry instruction to the second access module, the access method for the storage circuit further includes: when receiving the refusal and release instruction returned by the second access module, sending a pause request instruction to the first access module to Instruct the first access module to suspend sending the token application request. Specifically, the second access module may send a refusal to release the instruction when the urgency is high or the remaining access duration is short. It can be understood that if the current evaluation result of the second access module is refusal to release the token, the second access module will not change the evaluation result to agree to release the token for the same query instruction before the second access module completes the current access task. Therefore, even if the first access module continues to send the token application request, the second access module will not release the token. In this embodiment, the above-mentioned setting manner can avoid the waste of bus resources caused by the continuous sending of requests by the first access module, thereby improving the running speed of the computer device.
但可以理解的是,若第一访问模块响应于新的业务生成了新的令牌申请请求,则可以发送新的令牌申请请求给令牌管理模块,从而避免影响新的业务的运行。进一步地,第一访问模块也可以在内部先进行一次评估,若新的业务的紧急程度等信息低于旧的业务,则也可以先不发送令牌申请请求,从而避免资源浪费。But it can be understood that if the first access module generates a new token application request in response to the new service, it can send the new token application request to the token management module, so as to avoid affecting the operation of the new service. Further, the first access module can also perform an internal evaluation first, and if the information such as the urgency of the new service is lower than that of the old service, the token application request may not be sent first, thereby avoiding waste of resources.
图7为一实施例的存储电路的访问方法的流程图之四,本实施例的访问方法应用于第二访问模块,参考图7,在其中一个实施例中,存储电路的访问方法包括步骤702至步骤706。FIG. 7 is a fourth flowchart of an access method for a storage circuit in an embodiment. The access method in this embodiment is applied to the second access module. Referring to FIG. 7 , in one embodiment, the access method for a storage circuit includes
步骤702,接收令牌管理模块发送的中断指令。其中,中断指令为令牌管理模块在第二时长内接收到第一访问模块发送的令牌申请请求的次数大于预设次数时生成的指令。Step 702: Receive an interrupt instruction sent by the token management module. The interrupt instruction is an instruction generated when the token management module receives the token application request sent by the first access module more than a preset number of times within the second time period.
步骤704,响应于中断指令中断对存储电路的访问,并在中断访问的位置生成中断断点。
步骤706,释放令牌至令牌管理模块,以指示第一访问模块和第二访问模块通过令牌分时访问存储电路。其中,令牌管理模块用于授权令牌至第一访问模块和第二访问模块。Step 706: Release the token to the token management module to instruct the first access module and the second access module to access the storage circuit by time-sharing through the token. Wherein, the token management module is used to authorize the token to the first access module and the second access module.
在本实施例中,第二访问模块响应于中断指令释放令牌,可以避免第二访问模块的访问权限被突然取消,从而可以避免第二访问模块的访问过程发生错误,进而可以提高第二访问模块的数据读取的准确性。而且,通过设置中断断点,可以便于第二访问模块后续直接查找中断断点,并从中断断点继续进行访问,从而提高第二访问模块恢复访问的速度。In this embodiment, the second access module releases the token in response to the interrupt instruction, so that the access authority of the second access module can be prevented from being suddenly cancelled, so that errors in the access process of the second access module can be avoided, and the second access module can be improved. The accuracy of the module's data reading. Moreover, by setting the interruption breakpoint, it is convenient for the second access module to directly search for the interruption point and continue to access from the interruption point, thereby improving the speed of the second access module to resume access.
在其中一个实施例中,接收令牌管理模块发送的中断指令前,存储电路的访问方法还包括以下步骤。第二访问模块接收令牌管理模块发送的询问指令。第二访问模块响应于询问指令获取当前的访问状态信息,访问状态信息包括紧急程度、剩余访问时长和剩余访问数据量中的至少一种。第二访问模块根据访问状态信息确定是否同意释放令牌,并对应返回同意释放指令和拒绝释放指令中的一种至令牌管理模块。在本实施例中,第二访问模块通过接收询问指令,可以在剩余访问时长较长、或紧急程度较低的情况下,发送同意释放指令,以使第一访问模块先访问存储电路。第二访问模块还可以在剩余访问时长较短、或紧急程度较高的情况下,发送拒绝释放指令,从而避免打断第二访问模块的访问进程,以使第二访问模块完整地完成当前的访问,从而提高访问方法的灵活性。In one of the embodiments, before receiving the interrupt instruction sent by the token management module, the method for accessing the storage circuit further includes the following steps. The second access module receives the query instruction sent by the token management module. The second access module acquires current access state information in response to the query instruction, where the access state information includes at least one of an emergency degree, a remaining access duration and a remaining access data amount. The second access module determines, according to the access state information, whether to agree to release the token, and correspondingly returns one of an approval release instruction and a refusal release instruction to the token management module. In this embodiment, the second access module, by receiving the inquiry instruction, can send an approval release instruction when the remaining access time is long or the urgency is low, so that the first access module first accesses the storage circuit. The second access module can also send a refusal and release instruction when the remaining access duration is short or the urgency is high, so as to avoid interrupting the access process of the second access module, so that the second access module can completely complete the current access, thereby increasing the flexibility of the access method.
应该理解的是,虽然各流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,各流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the steps in the flowcharts are displayed in sequence according to the arrows, these steps are not necessarily executed in the sequence indicated by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in each flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed and completed at the same time, but may be executed at different times. The order of execution is also not necessarily sequential, but may be performed alternately or alternately with other steps or sub-steps of other steps or at least a portion of a phase.
图8为一实施例的存储电路的访问装置的结构框图之一,参考图8,在其中一个实施例中,存储电路的访问装置包括请求接收模块802、状态获取模块804和令牌授权模块806。其中,请求接收模块802用于接收第一访问模块发送的令牌申请请求。状态获取模块804用于响应于令牌申请请求获取令牌的占用状态。令牌授权模块806用于当占用状态为未占用时,授权令牌至第一访问模块,以指示第一访问模块通过令牌访问存储电路。FIG. 8 is one of the structural block diagrams of an access device for a storage circuit according to an embodiment. Referring to FIG. 8 , in one embodiment, the access device for a storage circuit includes a
图9为一实施例的存储电路的访问装置的结构框图之二,参考图9,在其中一个实施例中,存储电路的访问装置包括中断接收模块902、访问中断模块904和令牌释放模块906。其中,中断接收模块902用于接收令牌管理模块发送的中断指令,中断指令为令牌管理模块在第二时长内接收到第一访问模块发送的令牌申请请求的次数大于预设次数时生成的指令。访问中断模块904用于响应于中断指令中断对存储电路的访问,并在中断访问的位置生成中断断点。令牌释放模块906用于释放令牌至令牌管理模块,令牌管理模块用于授权令牌至第一访问模块和第二访问模块,以指示第一访问模块和第二访问模块通过令牌分时访问存储电路。FIG. 9 is the second structural block diagram of an access device for a storage circuit according to an embodiment. Referring to FIG. 9 , in one embodiment, the access device for a storage circuit includes an interrupt receiving
上述存储电路的访问装置中各个模块的划分仅用于举例说明,在其他实施例中,可将存储电路的访问装置按照需要划分为不同的模块,以完成上述存储电路的访问装置的全部或部分功能。The division of each module in the access device for the storage circuit is only used for illustration. In other embodiments, the access device for the storage circuit may be divided into different modules as required to complete all or part of the access device for the storage circuit. Function.
关于存储电路的访问装置的具体限定可以参见上文中对于存储电路的访问方法的限定,在此不再赘述。上述存储电路的访问装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the access device of the storage circuit, reference may be made to the limitation on the access method of the storage circuit above, which will not be repeated here. Each module in the access device of the above-mentioned storage circuit may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
图10为一实施例的存储电路的访问装置的结构框图之三,参考图10,本申请实施例还提供了一种存储电路的访问装置,存储电路的访问装置可以设置于手机等计算机设备中。存储电路的访问装置包括处理器1002、通信模块1004、令牌管理模块1006和存储电路1008,所述处理器1002、所述通信模块1004分别与所述存储电路1008连接,且所述处理器1002、所述通信模块1004分别与所述令牌管理模块1006连接,处理器1002和通信模块1004分时访问存储电路1008,处理器1002和通信模块1004中的一个为第一访问模块。其中,令牌管理模块1006用于接收第一访问模块发送的令牌申请请求;响应于令牌申请请求获取令牌的占用状态;当占用状态为未占用时,授权令牌至第一访问模块,以指示第一访问模块通过令牌访问存储电路。基于前述访问方法,本实施例提供了一种不易发生存储电路的访问冲突,用户数据的读取可靠性较高的存储电路的访问装置。FIG. 10 is a third structural block diagram of an access device for a storage circuit according to an embodiment. Referring to FIG. 10 , an embodiment of the present application also provides an access device for a storage circuit. The access device for a storage circuit can be installed in a computer device such as a mobile phone. . The access device of the storage circuit includes a
在其中一个实施例中,令牌管理模块1006设于处理器1002或通信模块1004。例如,在图10所示的实施例中,令牌管理模块1006设于处理器1002。在本实施例中,通过将令牌管理模块1006集成在处理器1002或通信模块1004中,可以减少令牌管理模块1006占用的空间,并提高存储电路的访问装置的集成度。In one embodiment, the
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图11所示。该计算机设备包括通过系统总线连接的处理器、存储器、通信接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、移动蜂窝网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时以实现一种存储电路的访问方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one of the embodiments, a computer device is provided, and the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 11 . The computer equipment includes a processor, memory, a communication interface, a display screen, and an input device connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The nonvolatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for wired or wireless communication with an external terminal, and the wireless communication can be realized by WIFI, mobile cellular network, NFC (Near Field Communication) or other technologies. The computer program, when executed by a processor, implements a method of accessing a memory circuit. The display screen of the computer equipment may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment may be a touch layer covered on the display screen, or a button, a trackball or a touchpad set on the shell of the computer equipment , or an external keyboard, trackpad, or mouse.
本领域技术人员可以理解,图11中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 11 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
在其中一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。In one of the embodiments, a computer device is provided, including a memory and a processor, where a computer program is stored in the memory, and the processor implements the steps in the foregoing method embodiments when the processor executes the computer program.
在其中一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one of the embodiments, a computer-readable storage medium is provided on which a computer program is stored, and when the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-OnlyMemory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic RandomAccess Memory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。Those skilled in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium , when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to a memory, a database or other media used in the various embodiments provided in this application may include at least one of a non-volatile memory and a volatile memory. Non-volatile memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetic variable memory (Magnetoresistive Random Memory) Access Memory, MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory may include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration and not limitation, the RAM may be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM). The database involved in the various embodiments provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a blockchain-based distributed database, etc., but is not limited thereto. The processors involved in the various embodiments provided in this application may be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, data processing logic devices based on quantum computing, etc., and are not limited to this.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features It is considered to be the range described in this specification.
以上实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。The above examples only represent several embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but should not be construed as a limitation on the scope of the patent of the present application. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the present application should be determined by the appended claims.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111646325.3A CN114357481A (en) | 2021-12-29 | 2021-12-29 | Access method, apparatus, computer device and storage medium for storage circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111646325.3A CN114357481A (en) | 2021-12-29 | 2021-12-29 | Access method, apparatus, computer device and storage medium for storage circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114357481A true CN114357481A (en) | 2022-04-15 |
Family
ID=81102924
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111646325.3A Pending CN114357481A (en) | 2021-12-29 | 2021-12-29 | Access method, apparatus, computer device and storage medium for storage circuit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114357481A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114938352A (en) * | 2022-05-19 | 2022-08-23 | 中国银行股份有限公司 | Picture uploading method, server, client and system |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4780871A (en) * | 1985-07-09 | 1988-10-25 | Canon Kabushiki Kaisha | Data Transmission system |
US4930102A (en) * | 1983-04-29 | 1990-05-29 | The Regents Of The University Of California | Dynamic activity-creating data-driven computer architecture |
CN101022292A (en) * | 2006-02-14 | 2007-08-22 | 南京大学 | Portable bluetooth help-seeking device |
CN101459816A (en) * | 2007-12-14 | 2009-06-17 | 深圳华为通信技术有限公司 | Method, system and device for controlling auxiliary stream token in multi-point bi-stream conference |
CN109787915A (en) * | 2018-12-14 | 2019-05-21 | 北京三快在线科技有限公司 | Flow control methods, device, electronic equipment and the storage medium of network access |
CN109936511A (en) * | 2017-12-19 | 2019-06-25 | 北京金山云网络技术有限公司 | A token acquisition method, apparatus, server, terminal device and medium |
US20200076745A1 (en) * | 2018-08-29 | 2020-03-05 | REALTEK SINGAPORE Pte. Ltd. | Wireless communication circuit with scheduling circuit in mac layer |
CN111800226A (en) * | 2020-06-30 | 2020-10-20 | 西安微电子技术研究所 | Sideband management circuit and method based on hardware arbitration |
CN112468409A (en) * | 2020-11-24 | 2021-03-09 | 平安消费金融有限公司 | Access control method, device, computer equipment and storage medium |
-
2021
- 2021-12-29 CN CN202111646325.3A patent/CN114357481A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4930102A (en) * | 1983-04-29 | 1990-05-29 | The Regents Of The University Of California | Dynamic activity-creating data-driven computer architecture |
US4780871A (en) * | 1985-07-09 | 1988-10-25 | Canon Kabushiki Kaisha | Data Transmission system |
CN101022292A (en) * | 2006-02-14 | 2007-08-22 | 南京大学 | Portable bluetooth help-seeking device |
CN101459816A (en) * | 2007-12-14 | 2009-06-17 | 深圳华为通信技术有限公司 | Method, system and device for controlling auxiliary stream token in multi-point bi-stream conference |
CN109936511A (en) * | 2017-12-19 | 2019-06-25 | 北京金山云网络技术有限公司 | A token acquisition method, apparatus, server, terminal device and medium |
WO2019120217A1 (en) * | 2017-12-19 | 2019-06-27 | 北京金山云网络技术有限公司 | Token obtaining method and apparatus, server, user terminal, and medium |
US20200076745A1 (en) * | 2018-08-29 | 2020-03-05 | REALTEK SINGAPORE Pte. Ltd. | Wireless communication circuit with scheduling circuit in mac layer |
CN109787915A (en) * | 2018-12-14 | 2019-05-21 | 北京三快在线科技有限公司 | Flow control methods, device, electronic equipment and the storage medium of network access |
CN111800226A (en) * | 2020-06-30 | 2020-10-20 | 西安微电子技术研究所 | Sideband management circuit and method based on hardware arbitration |
CN112468409A (en) * | 2020-11-24 | 2021-03-09 | 平安消费金融有限公司 | Access control method, device, computer equipment and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114938352A (en) * | 2022-05-19 | 2022-08-23 | 中国银行股份有限公司 | Picture uploading method, server, client and system |
CN114938352B (en) * | 2022-05-19 | 2024-06-18 | 中国银行股份有限公司 | Picture uploading method, server, client and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI430090B (en) | System and method for trimming data on non-volatile flash media, and storage medium | |
CN113625973B (en) | Data writing method, device, electronic equipment and computer readable storage medium | |
KR102770994B1 (en) | Secure applications in computational storage devices | |
US12164675B2 (en) | Capability management method and computer device | |
JP2024521963A (en) | Data access method, device and non-transitory computer-readable storage medium | |
CN109992399B (en) | Resource management method, device, mobile terminal, and computer-readable storage medium | |
WO2021018052A1 (en) | Garbage collection method and apparatus | |
CN108293197A (en) | A kind of resource statistics method, apparatus and terminal | |
CN112698793A (en) | Data storage method and device, machine readable medium and equipment | |
CN114357481A (en) | Access method, apparatus, computer device and storage medium for storage circuit | |
CN114185480B (en) | Memory systems and data processing systems | |
CN111142997A (en) | Application display method, vehicle machine and computer storage medium | |
CN111221584A (en) | Terminal single-card and double-card adapting method and device, computer equipment and storage medium | |
KR101103619B1 (en) | Multiport Memory and Its Access Control Method | |
WO2025103005A1 (en) | Access method for shared memory and related apparatus | |
CN114064236A (en) | Task execution method, apparatus, device and storage medium | |
CN115730341A (en) | Access control method, system, storage medium, electronic device and system-on-chip | |
CN113253939A (en) | Data processing method and device, electronic equipment and storage medium | |
CN117041980A (en) | Network element management method and device, storage medium and electronic equipment | |
US12282588B2 (en) | System and method for managing use of storage in distributed systems | |
CN112306896A (en) | Garbage recovery method and device | |
CN112654019B (en) | WIFI sharing method, system, computer-readable storage medium and server | |
CN115344198A (en) | Data reading and writing method and system of magnetic disk, terminal device and storage medium | |
CN114518844A (en) | Data processing method | |
CN112882831A (en) | Data processing method and device |
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 |