技术领域Technical Field
本发明涉及数据处理技术领域,尤其涉及一种基于双缓存的数据处理方法、装置、设备及存储介质。The present invention relates to the field of data processing technology, and in particular to a data processing method, device, equipment and storage medium based on double buffering.
背景技术Background Art
数据操作过程中,往往会存在误操作问题影响全局数据的变动,导致无法还原到某一时刻的状态,或者经过数据对比后所需要的还是修改前的数据。因此,在数据操作过程中,数据记忆(支持数据撤销操作和数据恢复操作)尤为重要。During data operation, there are often misoperations that affect the change of global data, resulting in the inability to restore to a certain moment, or after data comparison, the data required is still the data before the modification. Therefore, during data operation, data memory (supporting data undo and data recovery operations) is particularly important.
而目前绝大部分基于浏览器/服务器的架构系统都没有撤销恢复功能,针对页面的数据修改了就提交到后端入库了,所以没办法在页面上进行撤销恢复等操作。且由于浏览器本身的限制,性能依赖于其浏览器渲染引擎,与服务端交互尤其是大数据交互的时候,重复变量赋值会带来大量性能损耗。At present, most browser/server-based architecture systems do not have undo and restore functions. Once the data on a page is modified, it is submitted to the backend for storage, so there is no way to perform undo and restore operations on the page. In addition, due to the limitations of the browser itself, the performance depends on its browser rendering engine. When interacting with the server, especially when interacting with big data, repeated variable assignments will cause a lot of performance loss.
因此,亟需一种数据处理方法来在浏览器/服务器的架构系统的大数据交互场景下实现数据记忆。Therefore, there is an urgent need for a data processing method to realize data memory in the big data interaction scenario of the browser/server architecture system.
发明内容Summary of the invention
本发明提供了一种基于双缓存的数据处理方法、装置、设备及存储介质,能够实现数据撤销恢复操作,以及降低数据交互过程中的资源占用,提高工作效率。The present invention provides a data processing method, device, equipment and storage medium based on double buffering, which can realize data undo and restore operations, reduce resource occupation in the process of data interaction, and improve work efficiency.
根据本发明的一方面,提供了一种基于双缓存的数据处理方法,由数据操作系统中的数据服务器执行,所述数据操作系统还包括浏览器;所述浏览器中设置有第一缓存,所述数据服务器设置有第二缓存,所述第一缓存和所述第二缓存中存储有生成浏览器当前页面的业务数据,所述方法包括:According to one aspect of the present invention, a data processing method based on double buffering is provided, which is executed by a data server in a data operating system, wherein the data operating system also includes a browser; the browser is provided with a first buffer, and the data server is provided with a second buffer, wherein the first buffer and the second buffer store business data for generating a current page of the browser, and the method includes:
响应于浏览器所发送数据编辑请求,对第二缓存中的待操作数据进行相应的编辑操作;其中,所述数据编辑请求包括待操作数据的标识以及数据编辑类型的标识;In response to the data editing request sent by the browser, a corresponding editing operation is performed on the data to be operated in the second cache; wherein the data editing request includes an identifier of the data to be operated and an identifier of the data editing type;
在所述数据服务器执行所述数据编辑请求成功的情况下,在所述第二缓存中生成所述数据编辑类型的数据处理函数,并向所述浏览器返回所述数据编辑请求执行成功的消息,以使浏览器在第一缓存中生成所述数据编辑类型的数据处理函数,所述数据处理函数包括数据撤销函数以及数据恢复函数;In the case where the data server successfully executes the data editing request, a data processing function of the data editing type is generated in the second cache, and a message indicating that the data editing request is successfully executed is returned to the browser, so that the browser generates a data processing function of the data editing type in the first cache, wherein the data processing function includes a data undo function and a data restore function;
基于浏览器所发送的撤销恢复请求,以及所述第一缓存和所述第二缓存中的数据处理函数,进行数据撤销或数据恢复处理。Data revocation or data recovery processing is performed based on the revocation and recovery request sent by the browser and the data processing functions in the first cache and the second cache.
根据本发明的另一方面,提供了一种基于双缓存的数据处理方法,由数据操作系统中的浏览器执行,所述数据操作系统还包括数据服务器;所述浏览器中设置有第一缓存,所述数据服务器设置有第二缓存,所述第一缓存和所述第二缓存中存储有生成浏览器当前页面的业务数据,所述方法包括:According to another aspect of the present invention, a data processing method based on double buffering is provided, which is executed by a browser in a data operating system, and the data operating system also includes a data server; the browser is provided with a first buffer, and the data server is provided with a second buffer, and the first buffer and the second buffer store business data for generating a current page of the browser, and the method includes:
向数据服务器发送数据编辑请求,以使数据服务器对第二缓存中的待操作数据进行相应的编辑操作,在所述数据编辑请求执行成功的情况下,在所述第二缓存中生成数据编辑类型的数据处理函数,并向所述浏览器返回所述数据编辑请求执行成功的消息;所述数据编辑请求包括待操作数据的标识以及数据编辑类型的标识;所述数据处理函数包括数据撤销函数以及数据恢复函数;Sending a data editing request to a data server so that the data server performs a corresponding editing operation on the data to be operated in the second cache, generating a data processing function of the data editing type in the second cache when the data editing request is successfully executed, and returning a message indicating that the data editing request is successfully executed to the browser; the data editing request includes an identifier of the data to be operated and an identifier of the data editing type; the data processing function includes a data undo function and a data restore function;
响应于数据编辑请求执行成功的消息,在第一缓存中生成所述数据编辑类型的数据处理函数;In response to a message indicating that the data editing request is successfully executed, generating a data processing function of the data editing type in the first cache;
向数据服务器发送撤销恢复请求,以使数据服务器基于所述第一缓存和所述第二缓存中的数据处理函数,进行数据撤销或数据恢复处理。A revocation and recovery request is sent to the data server, so that the data server performs data revocation or data recovery processing based on the data processing functions in the first cache and the second cache.
根据本发明的另一方面,提供了一种基于双缓存的数据处理装置,应用于数据操作系统中的数据服务器,所述数据操作系统还包括浏览器;所述浏览器中设置有第一缓存,所述数据服务器设置有第二缓存,所述第一缓存和所述第二缓存中存储有生成浏览器当前页面的业务数据,所述装置包括:According to another aspect of the present invention, a data processing device based on double buffering is provided, which is applied to a data server in a data operating system, wherein the data operating system also includes a browser; the browser is provided with a first buffering, and the data server is provided with a second buffering, wherein the first buffering and the second buffering store business data for generating a current page of the browser, and the device includes:
编辑请求执行模块,用于响应于浏览器所发送数据编辑请求,对第二缓存中的待操作数据进行相应的编辑操作;其中,所述数据编辑请求包括待操作数据的标识以及数据编辑类型的标识;An editing request execution module, configured to perform a corresponding editing operation on the data to be operated in the second cache in response to a data editing request sent by the browser; wherein the data editing request includes an identifier of the data to be operated and an identifier of the data editing type;
编辑成功模块,用于在所述数据服务器执行所述数据编辑请求成功的情况下,在所述第二缓存中生成所述数据编辑类型的数据处理函数,并向所述浏览器返回所述数据编辑请求执行成功的消息,以使浏览器在第一缓存中生成所述数据编辑类型的数据处理函数,所述数据处理函数包括数据撤销函数以及数据恢复函数;An editing success module, used for generating a data processing function of the data editing type in the second cache when the data server successfully executes the data editing request, and returning a message indicating that the data editing request is successfully executed to the browser, so that the browser generates a data processing function of the data editing type in the first cache, wherein the data processing function includes a data undo function and a data restore function;
撤销恢复请求响应模块,用于基于浏览器所发送的撤销恢复请求,以及所述第一缓存和所述第二缓存中的数据处理函数,进行数据撤销或数据恢复处理。The revocation and restoration request response module is used to perform data revocation or data restoration processing based on the revocation and restoration request sent by the browser and the data processing functions in the first cache and the second cache.
根据本发明的另一方面,提供了一种基于双缓存的数据处理装置,应用于数据操作系统中的浏览器,所述数据操作系统还包括数据服务器;所述浏览器中设置有第一缓存,所述数据服务器设置有第二缓存,所述第一缓存和所述第二缓存中存储有生成浏览器当前页面的业务数据,所述装置包括:According to another aspect of the present invention, a data processing device based on double buffering is provided, which is applied to a browser in a data operating system, wherein the data operating system also includes a data server; the browser is provided with a first buffering, and the data server is provided with a second buffering, wherein the first buffering and the second buffering store business data for generating a current page of the browser, and the device includes:
编辑请求发送模块,用于向数据服务器发送数据编辑请求,以使数据服务器对第二缓存中的待操作数据进行相应的编辑操作,在所述数据编辑请求执行成功的情况下,在所述第二缓存中生成数据编辑类型的数据处理函数,并向所述浏览器返回所述数据编辑请求执行成功的消息;所述数据编辑请求包括待操作数据的标识以及数据编辑类型的标识;所述数据处理函数包括数据撤销函数以及数据恢复函数;An editing request sending module is used to send a data editing request to a data server so that the data server performs a corresponding editing operation on the data to be operated in the second cache. If the data editing request is successfully executed, a data processing function of the data editing type is generated in the second cache, and a message indicating that the data editing request is successfully executed is returned to the browser; the data editing request includes an identifier of the data to be operated and an identifier of the data editing type; the data processing function includes a data undo function and a data restore function;
编辑请求执行成功模块,用于响应于数据编辑请求执行成功的消息,在第一缓存中生成所述数据编辑类型的数据处理函数;An edit request execution success module, configured to generate a data processing function of the data edit type in a first cache in response to a message indicating that the data edit request has been successfully executed;
撤销恢复请求发送模块,用于向数据服务器发送撤销恢复请求,以使数据服务器基于所述第一缓存和所述第二缓存中的数据处理函数,进行数据撤销或数据恢复处理。The revocation and restoration request sending module is used to send a revocation and restoration request to the data server, so that the data server performs data revocation or data restoration processing based on the data processing functions in the first cache and the second cache.
根据本发明的另一方面,提供了一种电子设备,所述电子设备包括:According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
至少一个处理器;以及at least one processor; and
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein,
所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行本发明任一实施例所述的基于双缓存的数据处理方法。The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data processing method based on double buffering described in any embodiment of the present invention.
根据本发明的另一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使处理器执行时实现本发明任一实施例所述的基于双缓存的数据处理方法。According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data processing method based on double buffering described in any embodiment of the present invention when executed.
本发明实施例的技术方案,基于设置在浏览器的第一缓存以及设置在数据服务器的第二缓存进行数据处理,浏览器无需向数据服务器获取增量数据,浏览器与数据服务器之间的通信仅涉及到指令交互,并不涉及到数据的传递,在大数据场景下降低了传输性能的损耗,提高了数据处理效率,且通过设置在第一缓存和第二缓存中的数据处理函数,在浏览器/服务器的系统架构下实现了数据撤销和数据恢复,给用户在进行数据处理的工作过程中带来了极大的便捷性,提高了工作效率。The technical solution of the embodiment of the present invention is based on a first cache set in the browser and a second cache set in the data server for data processing. The browser does not need to obtain incremental data from the data server. The communication between the browser and the data server only involves instruction interaction and does not involve data transmission. In big data scenarios, the loss of transmission performance is reduced and the data processing efficiency is improved. In addition, by setting the data processing functions in the first cache and the second cache, data revocation and data recovery are realized in the browser/server system architecture, which brings great convenience to users in the process of data processing and improves work efficiency.
应当理解,本部分所描述的内容并非旨在标识本发明的实施例的关键或重要特征,也不用于限制本发明的范围。本发明的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
图1a是根据本发明实施例一提供的一种数据操作系统的架构图;FIG. 1a is an architecture diagram of a data operating system provided according to Embodiment 1 of the present invention;
图1b是根据本发明实施例一提供的一种基于双缓存的数据处理方法的流程图;FIG1b is a flow chart of a data processing method based on double buffering provided according to Embodiment 1 of the present invention;
图2是根据本发明实施例二提供的一种基于双缓存的数据处理方法的流程图;2 is a flow chart of a data processing method based on double buffering according to a second embodiment of the present invention;
图3是根据本发明实施例三提供的一种基于双缓存的数据处理方法的流程图;3 is a flow chart of a data processing method based on double buffering provided according to a third embodiment of the present invention;
图4是根据本发明实施例四提供的一种基于双缓存的数据处理方法的流程图;4 is a flow chart of a data processing method based on double buffering provided according to a fourth embodiment of the present invention;
图5是根据本发明实施例五提供的一种基于双缓存的数据处理装置的结构示意图;5 is a schematic diagram of the structure of a data processing device based on double buffering according to a fifth embodiment of the present invention;
图6是根据本发明实施例六提供的一种基于双缓存的数据处理装置的结构示意图;6 is a schematic diagram of the structure of a data processing device based on double buffering according to a sixth embodiment of the present invention;
图7是实现本发明实施例的基于双缓存的数据处理方法的电子设备的结构示意图。FIG. 7 is a schematic diagram of the structure of an electronic device that implements the data processing method based on double buffering according to an embodiment of the present invention.
具体实施方式DETAILED DESCRIPTION
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
实施例一Embodiment 1
图1a为本发明实施例一提供的一种数据操作系统的系统架构图。如图1a所示,数据操作系统包括浏览器、数据服务器以及数据库;浏览器中设置有第一缓存,数据服务器中设置有第二缓存,第一缓存和第二缓存中可以存储有生成浏览器当前页面的业务数据,数据库可用于存储全部业务数据。Figure 1a is a system architecture diagram of a data operating system provided in Embodiment 1 of the present invention. As shown in Figure 1a, the data operating system includes a browser, a data server, and a database; a first cache is set in the browser, a second cache is set in the data server, the first cache and the second cache can store business data for generating the current page of the browser, and the database can be used to store all business data.
浏览器可用于发起对数据服务器的数据编辑请求,数据服务器可用于接收和响应浏览器所发送的数据编辑请求,并执行该数据编辑请求相应的数据编辑操作。The browser may be used to initiate a data editing request to the data server, and the data server may be used to receive and respond to the data editing request sent by the browser, and execute the data editing operation corresponding to the data editing request.
具体的,用户可以通过运行在PC端或者移动端等设备上的浏览器,浏览不同业务的业务页面,并可以提供用户进行操作选择,用户可以在浏览器上选择需要进行编辑操作的业务数据以及需要进行的编辑操作类型,浏览器可根据用户选择的不同编辑操作调用不同的接口,向数据服务器发送编辑请求。数据服务器可以用于接收并响应浏览器所发送的数据编辑请求,对数据编辑请求所指示的待操作数据进行编辑。Specifically, users can browse business pages of different businesses through browsers running on PCs or mobile devices, and can provide users with operation selections. Users can select business data that needs to be edited and the type of editing operation that needs to be performed on the browser. The browser can call different interfaces according to different editing operations selected by the user and send editing requests to the data server. The data server can be used to receive and respond to the data editing request sent by the browser, and edit the data to be operated indicated by the data editing request.
可选的,第一缓存和第二缓存的设置可根据本领域技术人员进行适应性设置,示例性的,第一缓存可以为Web浏览器中提供的本地数据库系统(IndexedDB),第二缓存可以为内存级数据库,通过在数据服务集中设置第二缓存作为缓冲层,能够避免数据服务器直接对数据库中业务数据进行操作,避免了对数据库进行频繁的读写操作,提高了工作效率。Optionally, the settings of the first cache and the second cache can be adaptively set according to technical personnel in this field. Exemplarily, the first cache can be a local database system (IndexedDB) provided in a Web browser, and the second cache can be a memory-level database. By setting the second cache as a buffer layer in the data service center, it is possible to avoid the data server directly operating on the business data in the database, avoid frequent read and write operations on the database, and improve work efficiency.
图1b为本发明实施例一提供了一种基于双缓存的数据处理方法的流程图,本实施例可适用于数据服务器对业务数据进行数据处理的情况,该方法可以由基于双缓存的数据处理装置来执行,该基于双缓存的数据处理装置可以采用硬件和/或软件的形式实现,该基于双缓存的数据处理装置可配置于各种通用计算设备中,例如服务器设备。如图1b所示,该方法包括:FIG1b is a flowchart of a data processing method based on double buffering according to the first embodiment of the present invention. This embodiment is applicable to the case where a data server processes business data. The method can be executed by a data processing device based on double buffering. The data processing device based on double buffering can be implemented in the form of hardware and/or software. The data processing device based on double buffering can be configured in various general computing devices, such as server devices. As shown in FIG1b , the method includes:
S110、响应于浏览器所发送数据编辑请求,对第二缓存中的待操作数据进行相应的编辑操作。S110: In response to the data editing request sent by the browser, perform corresponding editing operations on the data to be operated in the second cache.
其中,数据编辑请求中可以包括待操作数据的标识以及数据编辑类型的标识,可以用于指示对待操作数据进行更新修改的请求。The data editing request may include an identifier of the data to be operated and an identifier of the data editing type, which may be used to indicate a request to update or modify the data to be operated.
可选的,待操作数据可以是指用于在浏览器所选中的业务数据,数据编辑类型包括但不限于新增、更新、删除以及合并等。需要说明的是,数据编辑请求中可以包括多个待操作数据的标识,同时请求会多个业务数据进行编辑。可选的,业务数据可以是指成本测算类数据,包括成本测算单位工程数据、用户数据、成本测算数据以及材料数据等。Optionally, the data to be operated may refer to the business data selected in the browser, and the data editing types include but are not limited to adding, updating, deleting, and merging. It should be noted that the data editing request may include multiple identifiers of the data to be operated, and multiple business data may be requested to be edited at the same time. Optionally, the business data may refer to cost calculation data, including cost calculation unit engineering data, user data, cost calculation data, and material data.
具体的,数据服务器可以响应于浏览器所发送的数据编辑请求,对第二缓存中的待操作数据进行数据编辑类型相应的编辑操作。Specifically, the data server may perform an editing operation corresponding to the data editing type on the data to be operated in the second cache in response to the data editing request sent by the browser.
可选的,用户在浏览器端的输入控件对业务数据进行编辑的过程中,在输入控件失去焦点之后,浏览器可以根据用户所编辑的数据以及数据编辑类型生成数据编辑请求发送至数据服务器端。Optionally, when the user is editing business data in the input control of the browser, after the input control loses focus, the browser may generate a data editing request based on the data edited by the user and the data editing type and send it to the data server.
S120、在数据服务器执行数据编辑请求成功的情况下,在第二缓存中生成数据编辑类型的数据处理函数,并向浏览器返回数据编辑请求执行成功的消息,以使浏览器在第一缓存中生成数据编辑类型的数据处理函数。S120. When the data server successfully executes the data editing request, a data processing function of the data editing type is generated in the second cache, and a message indicating that the data editing request has been successfully executed is returned to the browser, so that the browser generates a data processing function of the data editing type in the first cache.
其中,数据处理函数可以包括数据撤销函数以及数据恢复函数,可以用于指示当前页面的业务数据返回上一编辑操作前的数据状态。The data processing function may include a data undo function and a data restore function, which may be used to instruct the business data of the current page to return to the data state before the last editing operation.
具体的,在数据服务器执行浏览器所发送的数据编辑请求成功的情况下,数据服务器可以在第二缓存中生成该数据编辑请求所指示的数据编辑类型对应的数据处理函数,并向浏览器返回该数据编辑请求执行成功的消息,以使浏览器在第一缓存中生成数据编辑类型的数据处理函数,以及进行编辑后的数据的显示。Specifically, when the data server successfully executes the data editing request sent by the browser, the data server can generate a data processing function corresponding to the data editing type indicated by the data editing request in the second cache, and return a message to the browser indicating that the data editing request has been successfully executed, so that the browser can generate a data processing function of the data editing type in the first cache and display the edited data.
可选的,在数据服务器执行数据编辑请求未成功的情况下,会向浏览器发送执行失败的消息,以使浏览器重新发送该数据编辑请求;若浏览器重复发送该数据编辑请求次数达到最大次数阈值的情况下,则在浏览器进行数据异常提醒,提醒相关维护人员介入。可选的,最大次数阈值可以根据本领域技术人员进行适应性设置。Optionally, when the data server fails to execute the data editing request, it will send a message of execution failure to the browser, so that the browser can resend the data editing request; if the browser repeatedly sends the data editing request and the number of times reaches the maximum number threshold, the browser will issue a data abnormality reminder to remind relevant maintenance personnel to intervene. Optionally, the maximum number threshold can be adaptively set according to those skilled in the art.
可选的,若数据服务器由于物理因素,如网络无连接的情况下,无法接收到浏览器所发送的数据编辑请求,浏览器则会进行提示数据服务器网络异常提示,且浏览器可在数据服务器网络无连接时,将生成的数据编辑请求在第一缓存中按数据编辑请求生成的时间顺序对数据编辑请求进行保存,并在数据服务器回复网络连接时,顺序将数据编辑请求依次发送至数据服务器。Optionally, if the data server is unable to receive the data editing request sent by the browser due to physical factors, such as no network connection, the browser will prompt the data server of a network abnormality, and when the data server network is no longer connected, the browser may save the generated data editing requests in the first cache in the chronological order of when the data editing requests were generated, and when the data server restores the network connection, the browser will send the data editing requests to the data server sequentially.
S130、基于浏览器所发送的撤销恢复请求,以及第一缓存和第二缓存中的数据处理函数,进行数据撤销或数据恢复处理。S130: Perform data revocation or data recovery processing based on the revocation and recovery request sent by the browser and the data processing functions in the first cache and the second cache.
其中,撤销恢复请求可以包括撤销操作请求以及恢复操作请求,用于指示对当前页面的业务数据进行撤销或恢复处理。The undo and restore request may include an undo operation request and a restore operation request, which are used to instruct to undo or restore the business data of the current page.
具体的,可以响应于浏览器所发送的撤销恢复请求,以及基于浏览器中第一缓存和数据服务器中第二缓存中所存储的数据处理函数对当前页面的业务数据以及数据服务中所存储的业务数据进行数据撤销或数据恢复处理。Specifically, in response to the undo/restore request sent by the browser, and based on the data processing function stored in the first cache in the browser and the second cache in the data server, data undo or data restore processing can be performed on the business data of the current page and the business data stored in the data service.
可选的,在数据服务器执行撤销恢复请求未成功的情况下,会向浏览器发送执行失败的消息,以使浏览器重新发送该撤销恢复请求;若浏览器重复发送该撤销恢复请求次数达到最大次数阈值的情况下,则在浏览器进行操作异常提醒,提醒相关维护人员介入。Optionally, if the data server fails to execute the undo-restore request, it will send a failure message to the browser so that the browser can resend the undo-restore request; if the browser repeatedly sends the undo-restore request and the number of times reaches a maximum threshold, the browser will issue an abnormal operation reminder to alert relevant maintenance personnel to intervene.
可选的,在本发明实施例中,数据服务器还可响应于浏览器所发送的页面保存指令,将第二缓存中所存储的业务数据与数据库中所存储的业务数据进行数据同步。Optionally, in the embodiment of the present invention, the data server may also synchronize the business data stored in the second cache with the business data stored in the database in response to a page save instruction sent by the browser.
其中,页面保存指令用于指示将浏览器当前页面的业务数据状态同步给数据库。The page save instruction is used to instruct the browser to synchronize the business data status of the current page to the database.
具体的,数据服务器可以响应于浏览器所发送的页面保存指令,将当前页面的业务数据的数据状态同步给数据库,以对数据中所存储的业务数据进行更新。Specifically, the data server may synchronize the data status of the business data of the current page to the database in response to the page saving instruction sent by the browser, so as to update the business data stored in the database.
数据服务器通过响应页面保存指令才与数据库进行数据交互,避免了在每一次数据编辑时都需要访问数据库,避免了对数据库进行频繁的读写操作,提高了数据处理的效率。The data server interacts with the database only after responding to the page save instruction, avoiding the need to access the database every time the data is edited, avoiding frequent read and write operations on the database, and improving the efficiency of data processing.
可选的,在本发明实施例中,该基于双缓存的数据处理方法还包括:对数据操作系统进行初始化处理。Optionally, in an embodiment of the present invention, the data processing method based on double buffering further includes: initializing a data operating system.
具体的,在浏览器显示当前页面之前,数据服务器从数据库中获取生成浏览器当前需要显示页面的业务数据存储到第二缓存中,并将该当前需要显示页面的业务数据发送给浏览器,浏览器将该该当前需要显示页面的业务数据存储到第一缓存中;且数据服务器还会从第二缓存中撤销栈以及恢复栈中获取历史数据撤销函数和历史数据恢复函数发送给浏览器。可选的,撤销栈和恢复栈的栈地址大小可以根据本领域技术人员进行适应性设置。Specifically, before the browser displays the current page, the data server obtains the business data for generating the page that the browser currently needs to display from the database and stores it in the second cache, and sends the business data for the page that currently needs to be displayed to the browser, and the browser stores the business data for the page that currently needs to be displayed in the first cache; and the data server also obtains the historical data undo function and the historical data restore function from the undo stack and restore stack in the second cache and sends them to the browser. Optionally, the stack address size of the undo stack and the restore stack can be adaptively set according to those skilled in the art.
通过对数据操作系统初始化,将当前显示页面的数据以及历史数据撤销函数和历史数据恢复函数发送给浏览器,实现了关闭浏览器页面再进入时能够对修改过的业务数据进行撤销恢复,提高了工作效率。By initializing the data operating system, the data of the currently displayed page and the historical data undo function and historical data restore function are sent to the browser, so that the modified business data can be undone and restored when the browser page is closed and re-entered, thereby improving work efficiency.
本发明实施例的技术方案,基于设置在浏览器的第一缓存以及设置在数据服务器的第二缓存进行数据处理,浏览器无需向数据服务器获取增量数据,浏览器与数据服务器之间的通信仅涉及到指令交互,并不涉及到数据的传递,在大数据场景下降低了传输性能的损耗,提高了数据处理效率,且通过设置在第一缓存和第二缓存中的数据处理函数,在浏览器/服务器的系统架构下实现了数据撤销和数据恢复,给用户在进行数据处理的工作过程中带来了极大的便捷性,提高了工作效率。The technical solution of the embodiment of the present invention is based on a first cache set in the browser and a second cache set in the data server for data processing. The browser does not need to obtain incremental data from the data server. The communication between the browser and the data server only involves instruction interaction and does not involve data transmission. In big data scenarios, the loss of transmission performance is reduced and the data processing efficiency is improved. In addition, by setting the data processing functions in the first cache and the second cache, data revocation and data recovery are realized in the browser/server system architecture, which brings great convenience to users in the process of data processing and improves work efficiency.
实施例二Embodiment 2
图2为本发明实施例二提供的一种基于双缓存的数据处理方法的流程图,本实施例在上述实施例的基础上进一步细化,提供了在第二缓存中生成数据编辑类型的数据处理函数,并向浏览器返回数据编辑请求执行成功的消息,以使浏览器在第一缓存中生成数据编辑类型的数据处理函数的具体步骤。需要说明的是,在本发明实施例未详述部分,可参见其他实施例的相关表述,在此不再赘述。如图2所示,该方法包括:FIG2 is a flow chart of a data processing method based on double buffering provided by the second embodiment of the present invention. This embodiment further refines the above embodiment and provides specific steps of generating a data processing function of the data editing type in the second buffer and returning a message of successful execution of the data editing request to the browser so that the browser generates a data processing function of the data editing type in the first buffer. It should be noted that for the part not described in detail in the embodiment of the present invention, please refer to the relevant description of other embodiments, which will not be repeated here. As shown in FIG2, the method includes:
S210、响应于浏览器所发送数据编辑请求,对第二缓存中的待操作数据进行相应的编辑操作。S210: In response to the data editing request sent by the browser, perform corresponding editing operations on the data to be operated in the second cache.
S220、生成数据编辑类型的数据处理函数,并将数据处理函数存储到第二缓存中的处理方法池,以及将数据处理函数中的数据撤销函数存入第二缓存中的撤销栈。S220, generating a data processing function of a data editing type, storing the data processing function into a processing method pool in the second cache, and storing a data undo function in the data processing function into an undo stack in the second cache.
S230、向浏览器返回数据编辑请求执行成功的消息,以使浏览器生成数据编辑类型的数据处理函数,并将数据处理函数中的数据撤销函数存入第一缓存中的撤销栈。S230: Return a message indicating that the data editing request is successfully executed to the browser, so that the browser generates a data processing function of the data editing type, and stores the data undo function in the data processing function into an undo stack in the first cache.
S240、基于浏览器所发送的撤销恢复请求,以及第一缓存和第二缓存中的数据处理函数,进行数据撤销或数据恢复处理。S240: Perform data revocation or data recovery processing based on the revocation and recovery request sent by the browser and the data processing functions in the first cache and the second cache.
其中,处理方法池可以用于存储数据编辑类型对应的数据处理函数。Among them, the processing method pool can be used to store data processing functions corresponding to data editing types.
在本发明实施例中,若浏览器发送的数据编辑请求为数据新增请求,数据服务器响应于数据新增请求,基于待新增数据的标识在第二缓存中创建新增数据,返回给浏览器新增成功的消息,以使浏览器同步进行新增操作在当前页面中显示该新增数据,以及生成数据新增类型的数据处理函数,并将数据处理函数中的数据撤销函数存入第一缓存中的撤销栈。同时,数据服务器在创建新增数据完成之后,会生成数据新增类型对应的数据处理函数,并存储到第二缓存中,以及将该数据处理函数中的数据撤销函数存储第二缓存中的撤销栈中。可选的,数据处理函数中可以添加待操作数据的标识以及操作用户的标识,为后期责任追溯提供数据支持。In an embodiment of the present invention, if the data editing request sent by the browser is a data adding request, the data server responds to the data adding request, creates the new data in the second cache based on the identification of the data to be added, and returns a message of successful addition to the browser, so that the browser synchronously performs the adding operation to display the new data in the current page, and generates a data processing function of the data adding type, and stores the data undo function in the data processing function in the undo stack in the first cache. At the same time, after the data server completes the creation of the new data, it will generate a data processing function corresponding to the data adding type, and store it in the second cache, and store the data undo function in the data processing function in the undo stack in the second cache. Optionally, the identification of the data to be operated and the identification of the operating user can be added to the data processing function to provide data support for later responsibility tracing.
可选的,在数据编辑请求为数据新增请求的情况下,若新增数据需插入到原有的业务数据序列之中,则对插入新增数据后的业务数据序列的需要进行重新排序。Optionally, in the case where the data editing request is a data adding request, if the newly added data needs to be inserted into the original business data sequence, the business data sequence after the insertion of the newly added data needs to be reordered.
若浏览器发送的数据编辑请求为数据删除请求,数据服务器响应于数据删除请求,基于待删除数据的标识在第二缓存中删除待删除数据,返回给浏览器删除成功的消息,以使浏览器同步进行删除操作在当前页面中消除该数据,以及生成数据删除类型的数据处理函数,并将数据处理函数中的数据撤销函数存入第一缓存中的撤销栈。同时,数据服务器在删除数据完成之后,会生成数据删除类型对应的数据处理函数,并存储到第二缓存中,以及将该数据处理函数中的数据撤销函数存储第二缓存中的撤销栈中。If the data editing request sent by the browser is a data deletion request, the data server responds to the data deletion request, deletes the data to be deleted in the second cache based on the identifier of the data to be deleted, and returns a message of successful deletion to the browser, so that the browser synchronously performs the deletion operation to eliminate the data in the current page, and generates a data processing function of the data deletion type, and stores the data undo function in the data processing function in the undo stack in the first cache. At the same time, after deleting the data, the data server will generate a data processing function corresponding to the data deletion type, store it in the second cache, and store the data undo function in the data processing function in the undo stack in the second cache.
若浏览器发送的数据编辑请求为数据更新请求,数据服务器响应于数据更新请求,基于待更新数据的标识在第二缓存中更新待更新数据,返回给浏览器更新成功的消息,以使浏览器同步进行更新操作在当前页面中更新该待更新数据,以及生成数据更新类型的数据处理函数,并将数据处理函数中的数据撤销函数存入第一缓存中的撤销栈。同时,数据服务器在更新数据完成之后,会生成数据更新类型对应的数据处理函数,并存储到第二缓存中,以及将该数据处理函数中的数据撤销函数存储第二缓存中的撤销栈中。需要说明的是,在数据编辑请求为数据更新请求的情况下,浏览器需将数据更新前的值和数据更新后的值一并发送给数据服务器,数据服务器在接收到数据更新后的值之后,可以对待更新数据进行更新,并在数据更新类型对应的数据处理函数中对数据更新前的值和数据更新后的值进行记录。If the data editing request sent by the browser is a data update request, the data server responds to the data update request, updates the data to be updated in the second cache based on the identifier of the data to be updated, and returns a message of successful update to the browser, so that the browser synchronously performs the update operation to update the data to be updated in the current page, and generates a data processing function of the data update type, and stores the data undo function in the data processing function in the undo stack in the first cache. At the same time, after the data update is completed, the data server will generate a data processing function corresponding to the data update type, and store it in the second cache, and store the data undo function in the data processing function in the undo stack in the second cache. It should be noted that in the case where the data editing request is a data update request, the browser needs to send the value before the data update and the value after the data update to the data server together. After receiving the value after the data update, the data server can update the data to be updated, and record the value before the data update and the value after the data update in the data processing function corresponding to the data update type.
可选的,在本发明实施例中,若浏览器接收并响应数据编辑指令执行成功的消息后,并未成功在客户端完成数据编辑指令相应的数据编辑操作,则浏览器可以向数据服务器发送撤销恢复请求,以撤销数据服务器对业务数据所进行的数据编辑操作。Optionally, in an embodiment of the present invention, if the browser receives and responds to a message indicating that a data editing instruction has been successfully executed, but fails to successfully complete the data editing operation corresponding to the data editing instruction on the client, the browser may send an undo/restore request to the data server to undo the data editing operation performed by the data server on the business data.
本发明实施例的技术方案,通过生成数据编辑类型对应的数据处理函数,以指令交互的方式,将数据处理函数保存在第一缓存和第二缓存中,并基于数据编辑请求指令动态维护数据处理函数,实现了在浏览器/服务器的系统架构下的数据撤销和数据恢复功能,同时提高了数据处理的效率。The technical solution of the embodiment of the present invention generates a data processing function corresponding to the data editing type, saves the data processing function in the first cache and the second cache in an instruction interactive manner, and dynamically maintains the data processing function based on the data editing request instruction, thereby realizing data undoing and data recovery functions under the browser/server system architecture, and improving the efficiency of data processing.
实施例三Embodiment 3
图3为本发明实施例三提供的一种基于双缓存的数据处理方法的流程图,本实施例在上述实施例的基础上进一步细化,提供了基于浏览器所发送的撤销恢复请求,以及第一缓存和第二缓存中的数据处理函数,进行数据撤销或数据恢复处理的具体步骤。需要说明的是,在本发明实施例未详述部分,可参见其他实施例的相关表述,在此不再赘述。如图3所示,该方法包括:FIG3 is a flow chart of a data processing method based on double buffering provided by the third embodiment of the present invention. This embodiment further refines the above embodiment and provides specific steps for data revocation or data recovery based on the revocation and recovery request sent by the browser and the data processing functions in the first buffer and the second buffer. It should be noted that for the part not described in detail in the embodiment of the present invention, please refer to the relevant description of other embodiments, which will not be repeated here. As shown in FIG3, the method includes:
S310、在撤销恢复请求为撤销操作请求的情况下,响应于撤销操作请求,从第二缓存中的撤销栈中取出栈顶的数据撤销函数,并执行该栈顶的数据撤销函数。S310: When the undo restore request is an undo operation request, in response to the undo operation request, take out a data undo function at the top of the undo stack from the second cache, and execute the data undo function at the top of the stack.
S320、在该栈顶的数据撤销函数执行成功的情况下,从第二缓存的处理方法池中,确定与数据撤销函数所属数据编辑类型相同的数据恢复函数,并存入第二缓存中的恢复栈中,以及向浏览器发送撤销成功指令,以使浏览器从第一缓存中的撤销栈中取出栈顶的数据撤销函数,并执行该栈顶的数据撤销函数。S320. When the data undo function at the top of the stack is executed successfully, a data recovery function of the same data editing type as the data undo function is determined from the processing method pool of the second cache, and stored in the recovery stack in the second cache, and an undo success instruction is sent to the browser, so that the browser takes out the data undo function at the top of the stack from the undo stack in the first cache and executes the data undo function at the top of the stack.
其中,在浏览器执行数据撤销函数成功的情况下,浏览器从第一缓存中,确定与数据撤销函数所属数据编辑类型相同的数据恢复函数,并存入第一缓存中的恢复栈中。When the browser successfully executes the data undo function, the browser determines a data recovery function of the same data editing type as the data undo function from the first cache, and stores the function in a recovery stack in the first cache.
在本发明实施例中,在浏览器向数据服务器发送的撤销恢复请求为撤销操作请求的情况下,数据服务器会响应于该撤销操作请求从第二缓存中的撤销栈中取出栈顶的数据撤销函数,执行该从撤销栈栈顶取出的数据撤销函数,使数据服务器中的业务数据返回至上一数据编辑操作前的数据状态;在数据服务器成功执行该数据撤销函数的情况下,数据服务器会从第二缓存的处理方法池中,根据该数据撤销函数中待操作数据的标识和操作用户的标识,确定出与该数据撤销函数所属数据编辑类型相同的数据恢复函数,并将该数据恢复函数存入第二缓存的恢复栈中。同时,数据服务器还会向浏览器发送撤销成功指令,以使浏览器从第一缓存中的撤销栈中取出栈顶的数据撤销函数,并执行该栈顶的数据撤销函数,且在浏览器成功执行该数据撤销函数的情况下,浏览器会根据该数据撤销函数中待操作数据的标识和操作用户的标识,从第一缓存中确定出与该数据撤销函数所属数据编辑类型相同的数据恢复函数,并将该数据恢复函数存入第一缓存的恢复栈中。In an embodiment of the present invention, when the undo restore request sent by the browser to the data server is an undo operation request, the data server will take out the data undo function at the top of the undo stack in the second cache in response to the undo operation request, execute the data undo function taken out from the top of the undo stack, and return the business data in the data server to the data state before the last data editing operation; when the data server successfully executes the data undo function, the data server will determine the data recovery function of the same data editing type as the data undo function from the processing method pool of the second cache according to the identifier of the data to be operated in the data undo function and the identifier of the operating user, and store the data recovery function in the recovery stack of the second cache. At the same time, the data server will also send a successful undo instruction to the browser, so that the browser takes out the data undo function at the top of the undo stack in the first cache and executes the data undo function at the top of the stack, and when the browser successfully executes the data undo function, the browser will determine the data recovery function of the same data editing type as the data undo function from the first cache according to the identifier of the data to be operated in the data undo function and the identifier of the operating user, and store the data recovery function in the recovery stack of the first cache.
可选的,在本发明实施例中,在数据服务器成功响应并执行浏览器发送的撤销操作请求之后,又接收到浏览器所发送的新的数据编辑请求的情况下,则数据服务器以浏览器会分别清空第二缓存和第一缓存中的恢复栈,例如,数据编辑请求指示将待操作数据从2修改为3,又通过数据撤销函数将3退回为2,此时,恢复栈中栈顶的数据恢复函数所指示的数据操作为将2恢复为3,若此时数据编辑请求又指示将该待操作数据从2修改为4,该待操作数据的上以数据状态为2并不是3,因此,此时为了避免通过数据恢复函数将该操作数据恢复3,需要对恢复栈进行清空处理。Optionally, in an embodiment of the present invention, after the data server successfully responds to and executes the undo operation request sent by the browser, if it receives a new data editing request sent by the browser, the data server and the browser will respectively clear the recovery stacks in the second cache and the first cache. For example, the data editing request indicates that the data to be operated is changed from 2 to 3, and then 3 is returned to 2 through the data undo function. At this time, the data operation indicated by the data recovery function at the top of the recovery stack is to restore 2 to 3. If the data editing request indicates that the data to be operated is changed from 2 to 4 at this time, the data status of the data to be operated is 2 instead of 3. Therefore, in order to avoid restoring the operation data to 3 through the data recovery function, the recovery stack needs to be cleared.
通过对恢复栈进行维护,确保了恢复栈中栈顶的数据恢复函数所恢复的数据的数据状态始终为上一最接近的数据状态,确保了数据处理的准确性。By maintaining the recovery stack, it is ensured that the data state of the data recovered by the data recovery function at the top of the recovery stack is always the last closest data state, thereby ensuring the accuracy of data processing.
可选的,若数据服务器未成功执行撤销栈栈顶的数据撤销函数的情况下,则数据服务器向浏览器发送操作异常的告警提示,指示相关维护人员对数据服务器进行检修。Optionally, if the data server fails to successfully execute the data revocation function at the top of the revocation stack, the data server sends an abnormal operation warning to the browser, instructing relevant maintenance personnel to repair the data server.
可选的,若浏览器未成功执行撤销栈栈顶的数据撤销函数的情况下,则浏览器会向数据服务器发送恢复操作请求,使数据服务器中第二缓存的业务数据恢复至执行数据撤销函数前的数据状态。Optionally, if the browser fails to successfully execute the data undo function at the top of the undo stack, the browser will send a recovery operation request to the data server to restore the business data in the second cache in the data server to the data state before executing the data undo function.
可选的,在本发明实施例中,还包括:在撤销恢复请求为恢复操作请求的情况下,响应于恢复操作请求,从第二缓存中的恢复栈中取出栈顶的数据恢复函数,并执行该栈顶的数据恢复函数;在该栈顶的数据恢复函数执行成功的情况下,从第二缓存的处理方法池中,确定与数据恢复函数所属数据编辑类型相同的数据撤销函数,并存入第二缓存中的撤销栈中,以及向浏览器发送恢复成功指令,以使浏览器从第一缓存中的恢复栈中取出栈顶的数据恢复函数,并执行该栈顶的数据恢复函数。Optionally, in an embodiment of the present invention, it also includes: in a case where the undo recovery request is a recovery operation request, in response to the recovery operation request, taking out the data recovery function at the top of the stack from the recovery stack in the second cache, and executing the data recovery function at the top of the stack; in a case where the data recovery function at the top of the stack is executed successfully, determining a data undo function of the same data editing type as the data recovery function from the processing method pool of the second cache, storing it in the undo stack in the second cache, and sending a recovery success instruction to the browser, so that the browser takes out the data recovery function at the top of the stack from the recovery stack in the first cache, and executes the data recovery function at the top of the stack.
其中,在浏览器执行数据恢复函数成功的情况下,浏览器从第一缓存中,确定与数据恢复函数所属数据编辑类型相同的数据撤销函数,并存入第一缓存中的撤销栈中。When the browser executes the data recovery function successfully, the browser determines a data undo function of the same data editing type as the data recovery function from the first cache, and stores the function in an undo stack in the first cache.
具体的,在浏览器向数据服务器发送的撤销恢复请求为恢复操作请求的情况下,数据服务器会响应于该恢复操作请求从第二缓存中的恢复栈中取出栈顶的数据恢复函数,执行该从撤销栈栈顶取出的数据恢复函数,使数据服务器中的业务数据返回至上一数据编辑操作前的数据状态;在数据服务器成功执行该数据恢复函数的情况下,数据服务器会从第二缓存的处理方法池中,根据该数据恢复函数中待操作数据的标识和操作用户的标识,确定出与该数据恢复函数所属数据编辑类型相同的数据撤销函数,并将该数据撤销函数存入第二缓存的撤销栈中。同时,数据服务器还会向浏览器发送恢复成功指令,以使浏览器从第一缓存中的恢复栈中取出栈顶的数据恢复函数,并执行该栈顶的数据恢复函数,且在浏览器成功执行该数据恢复函数的情况下,浏览器会根据该数据恢复函数中待操作数据的标识和操作用户的标识,从第一缓存中确定出与该数据恢复函数所属数据编辑类型相同的数据撤销函数,并将该数据撤销函数存入第一缓存的撤销栈中。Specifically, when the undo restore request sent by the browser to the data server is a restore operation request, the data server will take out the data restore function at the top of the restore stack in the second cache in response to the restore operation request, execute the data restore function taken out from the top of the restore stack, and return the business data in the data server to the data state before the last data editing operation; when the data server successfully executes the data restore function, the data server will determine the data undo function of the same data editing type as the data restore function from the processing method pool of the second cache according to the identifier of the data to be operated and the identifier of the operating user in the data restore function, and store the data undo function in the undo stack of the second cache. At the same time, the data server will also send a restore success instruction to the browser, so that the browser takes out the data restore function at the top of the restore stack in the first cache and executes the data restore function at the top of the stack, and when the browser successfully executes the data restore function, the browser will determine the data undo function of the same data editing type as the data restore function from the first cache according to the identifier of the data to be operated and the identifier of the operating user in the data restore function, and store the data undo function in the undo stack of the first cache.
可选的,若数据服务器未成功执行恢复栈栈顶的数据恢复函数的情况下,则数据服务器向浏览器发送操作异常的告警提示,指示相关维护人员对数据服务器进行检修。Optionally, if the data server fails to successfully execute the data recovery function at the top of the recovery stack, the data server sends an abnormal operation warning to the browser, instructing relevant maintenance personnel to repair the data server.
可选的,若浏览器未成功执行撤销栈栈顶的数据恢复函数的情况下,则浏览器会向数据服务器发送恢复撤销请求,使数据服务器中第二缓存的业务数据恢复至执行数据恢复函数前的数据状态。Optionally, if the browser fails to successfully execute the data recovery function at the top of the undo stack, the browser will send a recovery and undo request to the data server to restore the business data in the second cache in the data server to the data state before executing the data recovery function.
本发明实施例的技术方案,通过浏览器所发送的撤销恢复请求,以及数据浏览器所返回的撤销恢复请求的执行状态,调用第一缓存和第二缓存中数据撤销函数和数据恢复函数,在浏览器/服务器的系统架构下实现了数据撤销和数据恢复,给用户在进行数据处理的工作过程中带来了极大的便捷性,提高了工作效率。The technical solution of the embodiment of the present invention calls the data undo function and data recovery function in the first cache and the second cache through the undo and restore request sent by the browser and the execution status of the undo and restore request returned by the data browser, thereby realizing data undo and data recovery under the browser/server system architecture, bringing great convenience to users in the process of data processing and improving work efficiency.
实施例四Embodiment 4
图4为本发明实施例四提供了一种基于双缓存的数据处理方法的流程图,本实施例可适用于浏览器向数据服务器发送数据操作请求对业务数据进行数据处理的情况,该方法可以由基于双缓存的数据处理装置来执行,该基于双缓存的数据处理装置可以采用硬件和/或软件的形式实现,该基于双缓存的数据处理装置可配置于各种通用计算设备中,例如手机终端、平板电脑或台式电脑等。如图4所示,该方法包括:FIG4 is a flowchart of a data processing method based on double buffering, which is provided in Embodiment 4 of the present invention. This embodiment is applicable to the case where a browser sends a data operation request to a data server to process business data. The method can be executed by a data processing device based on double buffering, which can be implemented in the form of hardware and/or software. The data processing device based on double buffering can be configured in various general computing devices, such as mobile phone terminals, tablet computers or desktop computers. As shown in FIG4, the method includes:
S410、向数据服务器发送数据编辑请求,以使数据服务器对第二缓存中的待操作数据进行相应的编辑操作,在数据编辑请求执行成功的情况下,在第二缓存中生成数据编辑类型的数据处理函数,并向浏览器返回数据编辑请求执行成功的消息。S410. Send a data editing request to the data server so that the data server performs corresponding editing operations on the data to be operated in the second cache. If the data editing request is successfully executed, a data processing function of the data editing type is generated in the second cache, and a message indicating that the data editing request is successfully executed is returned to the browser.
S420、响应于数据编辑请求执行成功的消息,在第一缓存中生成数据编辑类型的数据处理函数。S420. In response to a message indicating that the data editing request is successfully executed, generate a data processing function of the data editing type in the first cache.
S430、向数据服务器发送撤销恢复请求,以使数据服务器基于第一缓存和第二缓存中的数据处理函数,进行数据撤销或数据恢复处理。S430: Send a revocation and restoration request to the data server, so that the data server performs data revocation or data restoration processing based on the data processing functions in the first cache and the second cache.
其中,数据编辑请求中可以包括待操作数据的标识以及数据编辑类型的标识,可以用于指示对待操作数据进行更新修改的请求;数据处理函数可以包括数据撤销函数以及数据恢复函数,可以用于指示当前页面的业务数据返回上一编辑操作前的数据状态;撤销恢复请求可以包括撤销操作请求以及恢复操作请求,用于指示对当前页面的业务数据进行撤销或恢复处理。Among them, the data editing request may include the identification of the data to be operated and the identification of the data editing type, which can be used to indicate a request to update and modify the data to be operated; the data processing function may include a data undo function and a data restore function, which can be used to indicate that the business data of the current page returns to the data state before the last editing operation; the undo and restore request may include an undo operation request and a restore operation request, which are used to indicate the undo or restore processing of the business data of the current page.
在本发明实施例中,浏览器可以向数据服务器发送数据编辑请求,以使数据服务器对第二缓存中待操作数据进行数据编辑类型相应的编辑操作;在数据服务器执行浏览器所发送的数据编辑请求成功的情况下,数据服务器可以在第二缓存中生成该数据编辑请求所指示的数据编辑类型对应的数据处理函数,并向浏览器返回该数据编辑请求执行成功的消息;浏览器响应于该数据编辑请求执行成功的消息,会在第一缓存中生成数据编辑类型的数据处理函数,以及进行编辑后的数据的显示;浏览器还可以向数据服务器发送撤销恢复请求,以使数据服务器基于浏览器中第一缓存和数据服务器中第二缓存中所存储的数据处理函数对当前页面的业务数据以及数据服务中所存储的业务数据进行数据撤销或数据恢复处理。In an embodiment of the present invention, a browser may send a data editing request to a data server, so that the data server performs an editing operation corresponding to the data editing type on the data to be operated in the second cache; when the data server successfully executes the data editing request sent by the browser, the data server may generate a data processing function corresponding to the data editing type indicated by the data editing request in the second cache, and return a message to the browser indicating that the data editing request has been successfully executed; in response to the message indicating that the data editing request has been successfully executed, the browser may generate a data processing function of the data editing type in the first cache, and display the edited data; the browser may also send an undo/restore request to the data server, so that the data server performs data undo or data recovery processing on the business data of the current page and the business data stored in the data service based on the data processing functions stored in the first cache in the browser and the second cache in the data server.
本发明实施例的技术方案,基于设置在浏览器的第一缓存以及设置在数据服务器的第二缓存进行数据处理,浏览器无需向数据服务器获取增量数据,浏览器与数据服务器之间的通信仅涉及到指令交互,并不涉及到数据的传递,在大数据场景下降低了传输性能的损耗,提高了数据处理效率,且通过设置在第一缓存和第二缓存中的数据处理函数,在浏览器/服务器的系统架构下实现了数据撤销和数据恢复,给用户在进行数据处理的工作过程中带来了极大的便捷性,提高了工作效率。The technical solution of the embodiment of the present invention is based on a first cache set in the browser and a second cache set in the data server for data processing. The browser does not need to obtain incremental data from the data server. The communication between the browser and the data server only involves instruction interaction and does not involve data transmission. In big data scenarios, the loss of transmission performance is reduced and the data processing efficiency is improved. In addition, by setting the data processing functions in the first cache and the second cache, data revocation and data recovery are realized in the browser/server system architecture, which brings great convenience to users in the process of data processing and improves work efficiency.
实施例五Embodiment 5
图5为本发明实施例五提供的一种基于双缓存的数据处理装置的结构示意图。该装置应用于数据操作系统中的数据服务器,数据操作系统还包括浏览器;浏览器中设置有第一缓存,数据服务器设置有第二缓存,第一缓存和第二缓存中存储有生成浏览器当前页面的业务数据。如图5所示,该装置包括:FIG5 is a schematic diagram of the structure of a data processing device based on double buffering provided in Embodiment 5 of the present invention. The device is applied to a data server in a data operating system, and the data operating system also includes a browser; a first buffer is set in the browser, and a second buffer is set in the data server, and the first buffer and the second buffer store business data for generating the current page of the browser. As shown in FIG5, the device includes:
编辑请求执行模块510,用于响应于浏览器所发送数据编辑请求,对第二缓存中的待操作数据进行相应的编辑操作;其中,数据编辑请求包括待操作数据的标识以及数据编辑类型的标识;The editing request execution module 510 is used to perform a corresponding editing operation on the data to be operated in the second cache in response to the data editing request sent by the browser; wherein the data editing request includes an identifier of the data to be operated and an identifier of the data editing type;
编辑成功模块520,用于在数据服务器执行数据编辑请求成功的情况下,在第二缓存中生成数据编辑类型的数据处理函数,并向浏览器返回数据编辑请求执行成功的消息,以使浏览器在第一缓存中生成数据编辑类型的数据处理函数,数据处理函数包括数据撤销函数以及数据恢复函数;The editing success module 520 is used to generate a data processing function of the data editing type in the second cache when the data server successfully executes the data editing request, and return a message that the data editing request is successfully executed to the browser, so that the browser generates a data processing function of the data editing type in the first cache, and the data processing function includes a data undo function and a data restore function;
撤销恢复请求响应模块530,用于基于浏览器所发送的撤销恢复请求,以及第一缓存和第二缓存中的数据处理函数,进行数据撤销或数据恢复处理。The revocation and restoration request response module 530 is used to perform data revocation or data restoration processing based on the revocation and restoration request sent by the browser and the data processing functions in the first cache and the second cache.
本发明实施例的技术方案,基于设置在浏览器的第一缓存以及设置在数据服务器的第二缓存进行数据处理,浏览器无需向数据服务器获取增量数据,浏览器与数据服务器之间的通信仅涉及到指令交互,并不涉及到数据的传递,在大数据场景下降低了传输性能的损耗,提高了数据处理效率,且通过设置在第一缓存和第二缓存中的数据处理函数,在浏览器/服务器的系统架构下实现了数据撤销和数据恢复,给用户在进行数据处理的工作过程中带来了极大的便捷性,提高了工作效率。The technical solution of the embodiment of the present invention is based on a first cache set in the browser and a second cache set in the data server for data processing. The browser does not need to obtain incremental data from the data server. The communication between the browser and the data server only involves instruction interaction and does not involve data transmission. In big data scenarios, the loss of transmission performance is reduced and the data processing efficiency is improved. In addition, by setting the data processing functions in the first cache and the second cache, data revocation and data recovery are realized in the browser/server system architecture, which brings great convenience to users in the process of data processing and improves work efficiency.
可选的,编辑成功模块520包括:Optionally, the editing success module 520 includes:
数据处理函数生成单元,用于生成数据编辑类型的数据处理函数,并将数据处理函数存储到第二缓存中的处理方法池,以及将数据处理函数中的数据撤销函数存入第二缓存中的撤销栈;处理方法池用于存储数据编辑类型对应的数据处理函数;A data processing function generating unit, used for generating a data processing function of a data editing type, storing the data processing function into a processing method pool in the second cache, and storing a data undo function in the data processing function into an undo stack in the second cache; the processing method pool is used for storing data processing functions corresponding to the data editing type;
编辑请求执行成功单元,用于向浏览器返回数据编辑请求执行成功的消息,以使浏览器生成数据编辑类型的数据处理函数,并将数据处理函数中的数据撤销函数存入第一缓存中的撤销栈。The editing request execution success unit is used to return a message indicating that the data editing request has been successfully executed to the browser, so that the browser generates a data processing function of the data editing type and stores the data undo function in the data processing function into the undo stack in the first cache.
可选的,撤销恢复请求响应模块530包括:Optionally, the revocation and restoration request response module 530 includes:
撤销单元,用于在撤销恢复请求为撤销操作请求的情况下,响应于撤销操作请求,从第二缓存中的撤销栈中取出栈顶的数据撤销函数,并执行该栈顶的数据撤销函数;a revocation unit, configured to, when the revocation recovery request is a revocation operation request, retrieve a data revocation function at the top of the stack from the revocation stack in the second cache in response to the revocation operation request, and execute the data revocation function at the top of the stack;
撤销成功单元,用于在该数据撤销函数执行成功的情况下,从第二缓存的处理方法池中,确定与数据撤销函数所属数据编辑类型相同的数据恢复函数,并存入第二缓存中的恢复栈中,以及向浏览器发送撤销成功指令,以使浏览器从第一缓存中的撤销栈中取出栈顶的数据撤销函数,并执行该栈顶的数据撤销函数;其中,在浏览器执行数据撤销函数成功的情况下,浏览器从第一缓存中,确定与数据撤销函数所属数据编辑类型相同的数据恢复函数,并存入第一缓存中的恢复栈中。The undo success unit is used to determine, when the data undo function is successfully executed, a data recovery function of the same data editing type as the data undo function from the processing method pool of the second cache, and store it in the recovery stack in the second cache, and send a undo success instruction to the browser so that the browser takes out the top data undo function from the undo stack in the first cache and executes the top data undo function; wherein, when the browser executes the data undo function successfully, the browser determines, from the first cache, a data recovery function of the same data editing type as the data undo function, and stores it in the recovery stack in the first cache.
可选的,撤销恢复请求响应模块530还包括:Optionally, the revocation and restoration request response module 530 further includes:
恢复单元,用于在撤销恢复请求为恢复操作请求的情况下,响应于恢复操作请求,从第二缓存中的恢复栈中取出栈顶的数据恢复函数,并执行该栈顶的数据恢复函数;A recovery unit, configured to, in the case where the cancel recovery request is a recovery operation request, retrieve a data recovery function at the top of the stack from the recovery stack in the second cache in response to the recovery operation request, and execute the data recovery function at the top of the stack;
恢复成功单元,用于在该栈顶的数据恢复函数执行成功的情况下,从第二缓存的处理方法池中,确定与数据恢复函数所属数据编辑类型相同的数据撤销函数,并存入第二缓存中的撤销栈中,以及向浏览器发送恢复成功指令,以使浏览器从第一缓存中的恢复栈中取出栈顶的数据恢复函数,并执行该栈顶的数据恢复函数;其中,在浏览器执行数据恢复函数成功的情况下,浏览器从第一缓存中,确定与数据恢复函数所属数据编辑类型相同的数据撤销函数,并存入第一缓存中的撤销栈中。A recovery success unit is used to determine, when the data recovery function at the top of the stack is executed successfully, a data undo function of the same data editing type as the data recovery function from the processing method pool of the second cache, and store it in the undo stack in the second cache, and send a recovery success instruction to the browser so that the browser takes out the data recovery function at the top of the stack from the recovery stack in the first cache and executes the data recovery function at the top of the stack; wherein, when the browser executes the data recovery function successfully, the browser determines, from the first cache, a data undo function of the same data editing type as the data recovery function, and stores it in the undo stack in the first cache.
本发明实施例所提供的基于双缓存的数据处理装置可执行本发明任意实施例所提供的基于双缓存的数据处理方法,具备执行方法相应的功能模块和有益效果。The data processing device based on double buffering provided in the embodiment of the present invention can execute the data processing method based on double buffering provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
实施例六Embodiment 6
图6为本发明实施例六提供的一种基于双缓存的数据处理装置的结构示意图。该装置应用于数据操作系统中的浏览器执行,数据操作系统还包括数据服务器;浏览器中设置有第一缓存,数据服务器设置有第二缓存,第一缓存和第二缓存中存储有生成浏览器当前页面的业务数据。如图6所示,该装置包括:FIG6 is a schematic diagram of the structure of a data processing device based on double buffering provided in Embodiment 6 of the present invention. The device is applied to a browser in a data operating system, and the data operating system also includes a data server; a first buffer is set in the browser, and a second buffer is set in the data server, and the first buffer and the second buffer store business data for generating the current page of the browser. As shown in FIG6, the device includes:
编辑请求发送模块610,用于向数据服务器发送数据编辑请求,以使数据服务器对第二缓存中的待操作数据进行相应的编辑操作,在数据编辑请求执行成功的情况下,在第二缓存中生成数据编辑类型的数据处理函数,并向浏览器返回数据编辑请求执行成功的消息;数据编辑请求包括待操作数据的标识以及数据编辑类型的标识;数据处理函数包括数据撤销函数以及数据恢复函数;The editing request sending module 610 is used to send a data editing request to the data server so that the data server performs a corresponding editing operation on the data to be operated in the second cache. If the data editing request is successfully executed, a data processing function of the data editing type is generated in the second cache, and a message of successful execution of the data editing request is returned to the browser; the data editing request includes an identifier of the data to be operated and an identifier of the data editing type; the data processing function includes a data undo function and a data restore function;
编辑请求执行成功模块620,用于响应于数据编辑请求执行成功的消息,在第一缓存中生成数据编辑类型的数据处理函数;An edit request execution success module 620 is used to generate a data processing function of a data edit type in a first cache in response to a message that a data edit request is executed successfully;
撤销恢复请求发送模块630,用于向数据服务器发送撤销恢复请求,以使数据服务器基于第一缓存和第二缓存中的数据处理函数,进行数据撤销或数据恢复处理。The revocation and restoration request sending module 630 is used to send a revocation and restoration request to the data server, so that the data server performs data revocation or data restoration processing based on the data processing functions in the first cache and the second cache.
本发明实施例的技术方案,基于设置在浏览器的第一缓存以及设置在数据服务器的第二缓存进行数据处理,浏览器无需向数据服务器获取增量数据,浏览器与数据服务器之间的通信仅涉及到指令交互,并不涉及到数据的传递,在大数据场景下降低了传输性能的损耗,提高了数据处理效率,且通过设置在第一缓存和第二缓存中的数据处理函数,在浏览器/服务器的系统架构下实现了数据撤销和数据恢复,给用户在进行数据处理的工作过程中带来了极大的便捷性,提高了工作效率。The technical solution of the embodiment of the present invention is based on a first cache set in the browser and a second cache set in the data server for data processing. The browser does not need to obtain incremental data from the data server. The communication between the browser and the data server only involves instruction interaction and does not involve data transmission. In big data scenarios, the loss of transmission performance is reduced and the data processing efficiency is improved. In addition, by setting the data processing functions in the first cache and the second cache, data revocation and data recovery are realized in the browser/server system architecture, which brings great convenience to users in the process of data processing and improves work efficiency.
本发明实施例所提供的基于双缓存的数据处理装置可执行本发明任意实施例所提供的基于双缓存的数据处理方法,具备执行方法相应的功能模块和有益效果。The data processing device based on double buffering provided in the embodiment of the present invention can execute the data processing method based on double buffering provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
实施例七Embodiment 7
图7示出了可以用来实施本发明的实施例的电子设备710的结构示意图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备(如头盔、眼镜、手表等)和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本发明的实现。FIG7 shows a block diagram of an electronic device 710 that can be used to implement an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and/or required herein.
如图7所示,电子设备710包括至少一个处理器711,以及与至少一个处理器711通信连接的存储器,如只读存储器(ROM)712、随机访问存储器(RAM)713等,其中,存储器存储有可被至少一个处理器执行的计算机程序,处理器711可以根据存储在只读存储器(ROM)712中的计算机程序或者从存储单元718加载到随机访问存储器(RAM)713中的计算机程序,来执行各种适当的动作和处理。在RAM 713中,还可存储电子设备710操作所需的各种程序和数据。处理器711、ROM 712以及RAM 713通过总线714彼此相连。输入/输出(I/O)接口715也连接至总线714。As shown in FIG7 , the electronic device 710 includes at least one processor 711, and a memory connected to the at least one processor 711 in communication, such as a read-only memory (ROM) 712, a random access memory (RAM) 713, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 711 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 712 or the computer program loaded from the storage unit 718 to the random access memory (RAM) 713. In the RAM 713, various programs and data required for the operation of the electronic device 710 can also be stored. The processor 711, the ROM 712, and the RAM 713 are connected to each other via a bus 714. An input/output (I/O) interface 715 is also connected to the bus 714.
电子设备710中的多个部件连接至I/O接口715,包括:输入单元716,例如键盘、鼠标等;输出单元717,例如各种类型的显示器、扬声器等;存储单元718,例如磁盘、光盘等;以及通信单元719,例如网卡、调制解调器、无线通信收发机等。通信单元719允许电子设备710通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。A number of components in the electronic device 710 are connected to the I/O interface 715, including: an input unit 716, such as a keyboard, a mouse, etc.; an output unit 717, such as various types of displays, speakers, etc.; a storage unit 718, such as a disk, an optical disk, etc.; and a communication unit 719, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 719 allows the electronic device 710 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.
处理器711可以是各种具有处理和计算能力的通用和/或专用处理组件。处理器711的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的处理器、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。处理器711执行上文所描述的各个方法和处理,例如基于双缓存的数据处理方法。The processor 711 may be a variety of general and/or special processing components with processing and computing capabilities. Some examples of the processor 711 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 711 performs the various methods and processes described above, such as a data processing method based on double buffering.
在一些实施例中,基于双缓存的数据处理方法可被实现为计算机程序,其被有形地包含于计算机可读存储介质,例如存储单元718。在一些实施例中,计算机程序的部分或者全部可以经由ROM 712和/或通信单元719而被载入和/或安装到电子设备710上。当计算机程序加载到RAM 713并由处理器711执行时,可以执行上文描述的基于双缓存的数据处理方法的一个或多个步骤。备选地,在其他实施例中,处理器711可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行基于双缓存的数据处理方法。In some embodiments, the data processing method based on double buffering can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 718. In some embodiments, part or all of the computer program can be loaded and/or installed on the electronic device 710 via the ROM 712 and/or the communication unit 719. When the computer program is loaded into the RAM 713 and executed by the processor 711, one or more steps of the data processing method based on double buffering described above can be performed. Alternatively, in other embodiments, the processor 711 can be configured to perform the data processing method based on double buffering in any other appropriate manner (for example, by means of firmware).
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、复杂可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and/or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
用于实施本发明的方法的计算机程序可以采用一个或多个编程语言的任何组合来编写。这些计算机程序可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器,使得计算机程序当由处理器执行时使流程图和/或框图中所规定的功能/操作被实施。计算机程序可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions/operations specified in the flow chart and/or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
在本发明的上下文中,计算机可读存储介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的计算机程序。计算机可读存储介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。备选地,计算机可读存储介质可以是机器可读信号介质。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
为了提供与用户的交互,可以在电子设备上实施此处描述的系统和技术,该电子设备具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给电子设备。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)、区块链网络和互联网。The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
计算系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务中,存在的管理难度大,业务扩展性弱的缺陷。A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发明中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本发明的技术方案所期望的结果,本文在此不进行限制。It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
上述具体实施方式,并不构成对本发明保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明保护范围之内。The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410962144.9ACN118503298B (en) | 2024-07-18 | 2024-07-18 | Data processing method, device, equipment and storage medium based on double buffer |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410962144.9ACN118503298B (en) | 2024-07-18 | 2024-07-18 | Data processing method, device, equipment and storage medium based on double buffer |
| Publication Number | Publication Date |
|---|---|
| CN118503298A CN118503298A (en) | 2024-08-16 |
| CN118503298Btrue CN118503298B (en) | 2024-09-24 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410962144.9AActiveCN118503298B (en) | 2024-07-18 | 2024-07-18 | Data processing method, device, equipment and storage medium based on double buffer |
| Country | Link |
|---|---|
| CN (1) | CN118503298B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103229165A (en)* | 2010-08-12 | 2013-07-31 | 安全第一公司 | Systems and methods for secure remote storage |
| CN105302787A (en)* | 2015-11-10 | 2016-02-03 | 浪潮软件股份有限公司 | Method and device for table data editing |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7399043B2 (en)* | 2002-12-02 | 2008-07-15 | Silverbrook Research Pty Ltd | Compensation for uneven printhead module lengths in a multi-module printhead |
| US8184760B2 (en)* | 2008-09-02 | 2012-05-22 | Taiwan Semiconductor Manufacturing Company, Ltd. | Adaptive elastic buffer for communications |
| CN106503193A (en)* | 2016-11-02 | 2017-03-15 | 网宿科技股份有限公司 | Recover the method for the page and its device in browser |
| CN110121114B (en)* | 2018-02-07 | 2021-08-27 | 华为技术有限公司 | Method for transmitting stream data and data transmitting apparatus |
| US11243745B2 (en)* | 2018-07-15 | 2022-02-08 | Microsoft Technology Licensing, Llc | Text editor buffering implementation with offsets management |
| CN109522501B (en)* | 2018-11-26 | 2021-10-26 | 腾讯科技(深圳)有限公司 | Page content management method and device |
| US10997208B2 (en)* | 2019-02-13 | 2021-05-04 | Sap Se | In-memory database-managed container volume replication |
| US20200334274A1 (en)* | 2019-04-16 | 2020-10-22 | Suresh Joshi | Quick data structuring computing system and related methods |
| CN110765208B (en)* | 2019-10-22 | 2022-09-20 | 成都知道创宇信息技术有限公司 | Data synchronization method and device, electronic equipment and storage medium |
| CN115455013A (en)* | 2021-06-09 | 2022-12-09 | 京东方科技集团股份有限公司 | Method, system, computer equipment and medium for automatically updating dynamic form |
| CN117408794A (en)* | 2023-10-10 | 2024-01-16 | 中国平安财产保险股份有限公司 | Request processing method, device, equipment and storage medium thereof |
| CN117714543A (en)* | 2023-12-13 | 2024-03-15 | 北京中电兴发科技有限公司 | Method for realizing data sharing between platforms based on cache |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103229165A (en)* | 2010-08-12 | 2013-07-31 | 安全第一公司 | Systems and methods for secure remote storage |
| CN105302787A (en)* | 2015-11-10 | 2016-02-03 | 浪潮软件股份有限公司 | Method and device for table data editing |
| Publication number | Publication date |
|---|---|
| CN118503298A (en) | 2024-08-16 |
| Publication | Publication Date | Title |
|---|---|---|
| CN113961510B (en) | File processing method, device, equipment and storage medium | |
| CN113419865B (en) | Cloud resource processing method, related device and computer program product | |
| CN110737682A (en) | cache operation method, device, storage medium and electronic equipment | |
| CN113722124B (en) | Content processing method, device, equipment and storage medium of cloud mobile phone | |
| CN113656423B (en) | Method and device for updating data, electronic device and storage medium | |
| CN110555068A (en) | Data export method and device | |
| CN115905322A (en) | Service processing method and device, electronic equipment and storage medium | |
| CN115934414A (en) | Data backup method, data recovery method, device, equipment and storage medium | |
| CN111752960B (en) | Data processing method and device | |
| CN115061947B (en) | Resource management method, device, equipment and storage medium | |
| WO2025011307A1 (en) | Data backup method and apparatus, data recovery method and apparatus, device, and storage medium | |
| CN112306413B (en) | Method, device, equipment and storage medium for accessing memory | |
| CN118656221A (en) | Microservice merging method, device, equipment and storage medium | |
| CN118503298B (en) | Data processing method, device, equipment and storage medium based on double buffer | |
| CN114138397B (en) | Page display method, device, electronic device and storage medium | |
| CN116595110A (en) | Data storage method and device, electronic equipment and storage medium | |
| CN112948461B (en) | Method, apparatus, storage medium and program product for calendar data processing | |
| CN117009693A (en) | http request front-end caching method and device, electronic equipment and readable medium | |
| CN115858104A (en) | Method, device and equipment for acquiring snapshot of transaction commit sequence number and storage medium | |
| CN114647622A (en) | Replication operation processing method, device and equipment based on distributed object storage | |
| CN114443773A (en) | Distributed system data synchronization method, device, equipment and storage medium | |
| CN111625524A (en) | Data processing method, device, equipment and storage medium | |
| US12147448B2 (en) | Data reading method, device and storage medium | |
| CN115913954B (en) | Cluster management information interaction method, device, equipment and storage medium | |
| CN118819889A (en) | A message processing method, device, equipment, medium and program product |
| 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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| EE01 | Entry into force of recordation of patent licensing contract | Application publication date:20240816 Assignee:Hangzhou Haolian Intelligent Technology Co.,Ltd. Assignor:Hangzhou new China and the big Polytron Technologies Inc. Contract record no.:X2024980042943 Denomination of invention:Data processing method, device, equipment, and storage medium based on dual cache Granted publication date:20240924 License type:Common License Record date:20241231 | |
| EE01 | Entry into force of recordation of patent licensing contract |