Connect public, paid and private patent data with Google Patents Public Datasets

Data acquiring method and device

Download PDF

Info

Publication number
CN104317914A
CN104317914A CN 201410589547 CN201410589547A CN104317914A CN 104317914 A CN104317914 A CN 104317914A CN 201410589547 CN201410589547 CN 201410589547 CN 201410589547 A CN201410589547 A CN 201410589547A CN 104317914 A CN104317914 A CN 104317914A
Authority
CN
Grant status
Application
Patent type
Prior art keywords
data
acquiring
versions
method
identifiers
Prior art date
Application number
CN 201410589547
Other languages
Chinese (zh)
Inventor
张旭华
谭国斌
马哲
Original Assignee
小米科技有限责任公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRICAL DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/30Information retrieval; Database structures therefor ; File system structures therefor
    • G06F17/30861Retrieval from the Internet, e.g. browsers
    • G06F17/30864Retrieval from the Internet, e.g. browsers by querying, e.g. search engines or meta-search engines, crawling techniques, push systems

Abstract

The invention relates to a data acquiring method and device. The data acquiring method includes analyzing data requests transmitted by users to obtain user identifiers; acquiring data versions corresponding to the user identifiers; acquiring the data requested by the data requests according to the data versions; feeding the data back to the users. During gray distribution, the logic process obtained by the data versions are separated from storage of the data versions, any distribution objects can be appointed, and usability is high.

Description

数据获取方法和装置 Data acquisition method and apparatus

技术领域 FIELD

[0001] 本公开涉及通信技术领域,尤其涉及一种数据获取方法和装置。 [0001] The present disclosure relates to communication technologies, and in particular relates to a data acquisition method and apparatus.

背景技术 Background technique

[0002] 在互联网产品发布新版本时,通常会采用灰度发布的方式,让一部分用户继续使用老版本,一部分用户开始使用新版本。 [0002] When release a new version of Internet products, usually issued by way of gray, let some users continue to use the old version, some users start using the new version. 针对开始使用新版本的用户,可以在其获取数据时,通过将新版本的数据返回给用户以实现新版本的发布。 For the user to start using the new version, when it can get data through the new version of the data returned to the user in order to achieve the new release. 如果这部分用户对发布的新版本没有什么反对意见,那么可以将所有用户都迁移到新版本上。 If this part of the user does not have any objections to the new version is released, then all users will be migrated to the new version. 灰度发布可以保证整体系统的稳定,能够在早期就发现、解决问题。 Gray release can ensure the stability of the whole system can be found at an early stage, to solve the problem.

[0003] 要实现灰度发布,相关技术中可以在代理服务器的Nginx配置文件中进行配置,根据用户IP地址的权重或IP哈希值来区分使用老版本和新版本的用户。 [0003] To achieve the gray release, the related art can be configured in the configuration file Nginx proxy server to distinguish between users use the old version and the new version of the IP address of the user according to the weight of heavy or IP hash. 然而,这样的实现方式只能将用户进行大致分类,无法针对特定的用户发布新版本,可用性较差。 However, such an implementation can be broadly categorized by the user, can not release a new version for a particular user, usability is poor.

[0004] 相关技术还可以利用Lua作为Nginx插件,在Lua中进行配置,比如:在Lua中配置需要使用新版本的用户IP地址。 [0004] The related art may also be utilized as Nginx Lua plug, configured in Lua, such as: configuration requires a new version of the user IP address in Lua. 然而,这样的实现方案需要事先确定好配置,发布的对象较为单一、固定,当需要更改发布对象时,需要修改配置,可用性也较差。 However, such an implementation requires good pre-determined configuration, an object released more single, fixed, when you need to change the distribution target, you need to modify the configuration, availability is poor. 同时,如果配置出现故障,将直接导致新版本发布失败。 Meanwhile, if the configuration fails, it will lead directly to the new release failed.

发明内容 SUMMARY

[0005] 为克服相关技术中存在的问题,本公开提供一种数据获取方法和装置,以解决灰度发布可用性差的问题。 [0005] In order to overcome the problems in the related art, the present disclosure provides a method and apparatus for data acquisition, to resolve the problem of poor usability gradation released.

[0006] 根据本公开实施例的第一方面,提供一种数据获取方法,包括: [0006] According to a first aspect of the disclosed embodiment of the present embodiment, there is provided a data acquisition method, comprising:

[0007] 从用户发送的数据请求中解析出用户标识; [0007] Analytical data from the user identification request sent by the user;

[0008] 获取所述用户标识对应的数据版本; [0008] obtaining the corresponding user identification data version;

[0009] 根据所述数据版本获取所述数据请求所请求的数据; [0009] acquiring data requested by the data request according to the version of the data;

[0010] 将所述数据返回给用户。 [0010] The data returned to the user.

[0011] 可选的,所述获取所述用户标识对应的数据版本包括: [0011] Optionally, the obtaining the user identifier corresponding to the version of the data comprises:

[0012] 判断内存数据库中是否保存有所述用户标识对应的数据版本; [0012] It is determined whether the memory database stores data version corresponding to the user identifier;

[0013] 如果内存数据库中保存有所述用户标识对应的数据版本,则在所述内存数据库中获取所述用户标识对应的数据版本。 [0013] If the stored version of the data memory corresponding to the user identifier in the database, the version of the user to obtain data corresponding to the identifier in the database memory.

[0014] 可选的,还包括: [0014] Optionally, further comprising:

[0015] 如果内存数据库中没有保存所述用户标识对应的数据版本,则获取默认数据版本以作为所述用户标识对应的数据版本。 [0015] If no data memory databases stored version corresponding to the user identification, obtaining the version as default data corresponding to the user identification data version.

[0016] 可选的,所述根据所述数据版本获取所述数据请求所请求的数据包括: [0016] Alternatively, the data acquired according to the version of the data requested by the request data comprising:

[0017] 判断是否存在支持所述数据版本的业务服务器; [0017] It is determined whether there is data to support the version of the service server;

[0018] 如果存在支持所述数据版本的业务服务器,则从支持所述数据版本的业务服务器上获取所述数据请求所请求的数据。 [0018] If the version of the data supporting the presence service server, acquiring data from the data request to support the requested version of the data service server.

[0019] 可选的,还包括: [0019] Optionally, further comprising:

[0020] 如果不存在支持所述数据版本的业务服务器,则从支持默认数据版本的业务服务器上获取所述数据请求所请求的数据。 [0020] If the version of the data service support server is not present, obtaining data from the data request to support the requested data on the default version of the service server.

[0021] 可选的,所述从用户发送的数据请求中解析出用户标识包括: [0021] Alternatively, the analysis data requests sent by the user identifier of a user comprising:

[0022] 从所述数据请求中解析出用户的IP地址或者cookie作为所述用户标识。 [0022] parsed from the user's IP address or data request, as the user identification cookie.

[0023] 根据本公开实施例的第二方面,提供一种数据获取装置,包括: [0023] According to a second aspect of the disclosed embodiment of the present embodiment, there is provided a data acquisition apparatus, comprising:

[0024] 标识解析单元,用于从用户发送的数据请求中解析出用户标识; [0024] The identifier parsing unit configured to parse data from the user identification request sent by the user;

[0025] 版本获取单元,用于获取所述用户标识对应的数据版本; [0025] Version acquiring unit for acquiring data version corresponding to the user identifier;

[0026] 数据获取单元,用于根据所述数据版本获取所述数据请求所请求的数据; [0026] The data acquisition unit for acquiring data requested by the data request according to the version of the data;

[0027] 数据返回单元,用于将所述数据返回给用户。 [0027] The data returning unit configured to return the data to the user.

[0028] 可选的,所述版本获取单元包括: [0028] Optionally, a version obtaining unit comprises:

[0029] 第一判断子单元,用于判断内存数据库中是否保存有所述用户标识对应的数据版本; [0029] a first determining subunit, configured to determine whether the database stored memory data version corresponding to the user identifier;

[0030] 第一获取子单元,用于在内存数据库中保存有所述用户标识对应的数据版本时,在所述内存数据库中获取所述用户标识对应的数据版本。 [0030] a first obtaining sub-unit, used for saving the user identification data corresponding to the version in the database memory, acquires data version corresponding to the user identifier in the database memory.

[0031] 可选的,所述版本获取单元还包括: [0031] Optionally, a version obtaining unit further comprises:

[0032] 第二获取子单元,用于在内存数据库中没有保存所述用户标识对应的数据版本时,获取默认的数据版本以作为所述用户标识对应的数据版本。 [0032] When acquiring a second sub-unit, no data for the version corresponding to the user identification stored in the memory database, the default data acquired version as the version data corresponding to the user identification.

[0033] 可选的,所述数据获取单元包括: [0033] Optionally, the data acquisition unit comprises:

[0034] 第二判断子单元,用于判断是否存在支持所述数据版本的业务服务器; [0034] The second determining sub-unit, for determining whether there is data to support the version of the service server;

[0035] 第三获取子单元,用于在存在支持所述数据版本的业务服务器时,则从支持所述数据版本的业务服务器上获取所述数据请求所请求的数据。 [0035] The third obtaining sub-unit, configured to support the presence of the version of the data service server, acquiring data from the data request to support the requested version of the data service server.

[0036] 可选的,所述数据获取单元还包括: [0036] Optionally, the data acquisition unit further comprises:

[0037] 第四获取子单元,用于在不存在支持所述数据版本的业务服务器时,从支持默认的数据版本的业务服务器上获取所述数据请求所请求的数据。 [0037] The fourth obtaining sub-unit, configured to, when said data support the version of the business server does not exist, the data acquiring data requested by the request from the default version of the data support service server.

[0038] 可选的,所述标识解析单元包括: [0038] Optionally, the identifier parsing means comprises:

[0039] 标识解析子单元,用于从所述数据请求中解析出用户的IP地址或者cookie作为所述用户标识。 [0039] The identifier parsing sub-unit, configured to parse the user data request from the IP address or a cookie to the user identity.

[0040] 根据本公开实施例的第三方面,提供一种数据获取装置,包括: [0040] According to a third aspect of the disclosed embodiment of the present embodiment, there is provided a data acquisition apparatus, comprising:

[0041] 处理器; [0041] processor;

[0042] 用于存储处理器可执行指令的存储器; [0042] processor-executable instructions for storing a memory;

[0043] 其中,所述处理器被配置为: [0043] wherein the processor is configured to:

[0044] 从用户发送的数据请求中解析出用户标识; [0044] Analytical data from the user identification request sent by the user;

[0045] 获取所述用户标识对应的数据版本; [0045] obtaining the corresponding user identification data version;

[0046] 根据所述数据版本获取所述数据请求所请求的数据; [0046] acquiring data requested by the data request according to the version of the data;

[0047] 将所述数据返回给用户。 [0047] The data returned to the user.

[0048] 本公开的实施例提供的技术方案可以包括以下有益效果: [0048] The present embodiment provides a technical solution of the disclosure may comprise the following advantageous effects:

[0049] 本公开在接收到用户发送的数据请求时,根据从所述数据请求中解析出的用户标识以获取对应的数据版本,进而可以为用户获取该数据版本的数据,本公开在实现灰度发布的过程中,将数据版本获取的逻辑过程与数据版本的存储分离,可以指定任意发布对象,可用性强。 [0049] The present disclosure when receiving data request sent by the user, according to the parsed data request from the user identification to obtain corresponding data versions, and further can obtain the version of the data is user data, achieved in the present disclosure ash process of release, discrete logic process data stored version of the data acquired version, release can specify any object strong availability.

[0050] 本公开可以将用户标识和数据版本的对应关系存储在内存数据库中,能够实现持久化存储,更加安全。 [0050] The present disclosure may be user identifier and the correspondence between the version data stored in the database memory, persistent storage can be achieved, more secure.

[0051] 本公开可以从内存数据库中获取用户标识对应的数据版本,读取速度快,不会影响用户数据请求的响应时间。 [0051] The present disclosure may be acquired from the version data in the database memory corresponding to the user ID, the fast read speed, does not affect the response time to user data requests. 同时,在本实施例中,由于数据版本获取的逻辑过程与数据版本的存储分离,当开发人员想要调整新的数据版本的发布对象时,开发人员仅需更改内存数据库中用户标识与数据版本的对应关系即可,操作方便。 Meanwhile, in the present embodiment, since the process data stored discrete logic version of the data acquired version, when a developer wants to adjust the release of new data objects, the developer only needs to change the user ID and version data memory databases the corresponding relationship to facilitate operation.

[0052] 本公开在获取到用户标识对应的数据版本后,判断是否存在支持所述数据版本的业务服务器,并在不存在支持所述数据版本的业务服务器时,可以从支持默认数据版本的业务服务器获取数据,以避免没有及时更新内存数据库而导致的数据获取失败。 When [0052] the present disclosure after obtaining the user ID corresponding to the version of the data, determines whether there is version supports the data service server, and supports the data service server version does not exist, the default version of the data from the service support server access to data, to avoid data did not update the database memory caused by the failure to obtain.

[0053] 应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。 [0053] It should be understood that both the foregoing general description and the details described hereinafter are merely exemplary and explanatory and are not intended to limit the present disclosure.

附图说明 BRIEF DESCRIPTION

[0054] 此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。 [0054] The accompanying drawings, which are incorporated herein and constitute a part of this specification, illustrate embodiments consistent with the principles of the embodiments of the present disclosure, and together with the description serve to explain the present disclosure.

[0055] 图1是根据一示例性实施例示出的一种数据获取方法的流程图。 [0055] FIG. 1 is a flowchart of a data acquisition method of the embodiment shown according to an exemplary embodiment.

[0056] 图2是根据一示例性实施例示出的一种获取用户标识对应的数据版本的流程图。 [0056] FIG 2 is a flowchart illustrating a version of the data corresponding to the user ID acquired in accordance with an exemplary embodiment.

[0057] 图3是根据一示例性实施例示出的一种根据数据版本获取数据请求所请求的数据的流程图。 [0057] FIG. 3 is a flowchart of the data requested by the request data from the data acquisition according to one version of the illustrated exemplary embodiment.

[0058] 图4是根据一示例性实施例示出的一种数据获取应用场景示意图。 [0058] FIG. 4 is a schematic view of an application scenario according to a data acquisition illustrates an exemplary embodiment.

[0059] 图5是根据一示例性实施例示出的一种数据获取装置框图。 [0059] FIG. 5 is a block diagram of apparatus according to a data acquisition illustrates an exemplary embodiment.

[0060] 图6是根据一示例性实施例示出的另一种数据获取装置框图。 [0060] FIG. 6 is a block diagram of an apparatus illustrating another data acquisition according to an exemplary embodiment.

[0061] 图7是根据一示例性实施例示出的另一种数据获取装置框图。 [0061] FIG. 7 is a block diagram of an apparatus illustrating another data acquisition according to an exemplary embodiment.

[0062] 图8是根据一示例性实施例示出的另一种数据获取装置框图。 [0062] FIG. 8 is a block diagram of an apparatus illustrating another data acquisition according to an exemplary embodiment.

[0063] 图9是根据一示例性实施例示出的另一种数据获取装置框图。 [0063] FIG. 9 is a block diagram of an apparatus illustrating another data acquisition according to an exemplary embodiment.

[0064] 图10是根据一示例性实施例示出的另一种数据获取装置框图。 [0064] FIG. 10 is a block diagram of an apparatus illustrating another data acquisition according to an exemplary embodiment.

[0065] 图11是根据一示例性实施例示出的用于一种数据获取装置的一结构示意图。 [0065] FIG. 11 is a schematic view of a structure of the apparatus for obtaining A data illustrated in accordance with an exemplary embodiment.

具体实施方式 detailed description

[0066] 这里将详细地对示例性实施例进行说明,其示例表示在附图中。 [0066] The exemplary embodiments herein be described in detail embodiments of which are illustrated in the accompanying drawings. 下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。 When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. 以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。 The following exemplary embodiments described in the exemplary embodiments do not represent the disclosed embodiment consistent with all the present embodiment. 相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。 Instead, they are only in the book as detailed in the appended claims, some aspects of the present disclosure examples of apparatus and methods consistent phase.

[0067] 图1是根据一示例性实施例示出的一种数据获取方法的流程图。 [0067] FIG. 1 is a flowchart of a data acquisition method of the embodiment shown according to an exemplary embodiment.

[0068] 如图1所示,所述数据获取方法可以用在代理服务器中,包括以下步骤: [0068] 1, the data acquisition method may be used in a proxy server, comprising the steps of:

[0069] 在步骤SlOl中,从用户发送的数据请求中解析出用户标识。 [0069] In step SlOl, the analysis from the user identification data request sent by the user.

[0070] 在本实施例中,用户在访问网页或者使用某应用软件时,用户使用的终端会发送数据请求给代理服务器,代理服务器可以代替用户向网站或软件开发商提供的业务服务器获取用户请求的数据。 [0070] In the present embodiment, when accessed using a web page or application software, used by the user terminal sends a data request to the proxy server, the proxy server may provide the user service server instead of the website or the software to obtain a user request The data.

[0071] 代理服务器在接收到用户发送的数据请求时,会从所述数据请求中解析出用户标识。 [0071] When the proxy server receives a data request sent by the user, parses the user identifier from said data request. 在本步骤中,所述从用户发送的数据请求中解析出用户标识可以包括:从所述数据请求中解析出用户的IP地址或者cookie作为所述用户标识。 In this step, the parsed data from the requesting user transmits the user's identification may include: parsing the user's IP address or a cookie from the user the identification data request. 其中,cookie是指某些网站或应用软件为了辨别用户身份而存储在用户使用的终端上的数据,用户cookie和用户的IP地址一样,都可以用来标识用户的身份。 Which, cookie refers to certain Web sites or applications to identify the user identity and data stored on the terminal used by the user, the user cookie and the user's IP address, like, can be used to identify the user's identity. 举例来说,当代理服务器接收到用户针对某网页而发送的数据请求时,可以根据管理人员或者开发人员的设置,从所述数据请求中解析出源IP地址,即用户的IP地址,或者是从所述数据请求中解析其携带的cookie,以作为所述用户标识。 For example, when the proxy server receives a user request for data sent to a page, it can be provided according to the manager or developer, parsing the data request from the source IP address, i.e. the IP address of the user, or It parses the cookie from the data carried in the request, as to identify the user.

[0072] 在步骤S102中,获取所述用户标识对应的数据版本。 [0072] In step S102, the acquired data version corresponding to the user identifier.

[0073] 在本实施例中,当有新版本发布时,使用灰度发布的方式,可以选择一部分用户作为所述新版本的发布对象,并将这部分用户的用户标识与数据版本的对应关系存储在代理服务器上。 [0073] In the present embodiment, when a new version is released, use of the gradation released, the user can select a part as an object of the new release, and the correspondence between the user identifier and the data part of the user's version stored on the proxy server. 举例来说,某软件发布2.0版本,开发人员想要对IP地址192.168.0.15的用户发布该新版本,则需要将该IP地址192.168.0.15与数据版本2.0的对应关系存储在服务器中。 For example, a software release version 2.0, developers who want to release the new version of the IP address 192.168.0.15 users, you need the IP address 192.168.0.15 with the correspondence between the version of the data stored in the server 2.0.

[0074] 在上述过程中,可以将用户标识与数据版本的对应关系存储在代理服务器的内存数据库中,比如:将用户标识与数据版本的对应关系以key/value的形式存储在redis存储系统中。 [0074] In the above process, may be user identifier and version of the data corresponding relationship stored in the memory database proxy server, for example: the corresponding relationship between the user identifier and version of the data stored in the form key / value in redis storage system . 其中,key是所述用户标识,value是所述数据版本。 Wherein, key is the user ID, value is the version of the data. 在本实施例中,将用户标识和数据版本的对应关系存储在内存数据库中,能够实现持久化存储,更加安全。 In the present embodiment, the user ID and version data of the correspondence relationship stored in the database memory, persistent storage can be achieved, more secure.

[0075] 请参考图2,在本步骤中,所述获取所述用户标识对应的数据版本可以包括以下步骤: [0075] Please refer to FIG. 2, in this step, the obtaining the user identification data corresponding version may comprise the steps of:

[0076] 在步骤S201中,判断内存数据库中是否保存有所述用户标识对应的数据版本。 [0076] In step S201, it is determined whether the memory database stores user identification data corresponding to the versions. 如果内存数据库中保存有所述用户标识对应的数据版本,则执行步骤S202。 If the stored version of the data memory corresponding to the user identifier in the database, step S202. 如果内存数据库中没有保存所述用户标识对应的数据版本,则执行步骤S203。 If the memory data is not in the database stored version corresponding to the user identifier, step S203.

[0077] 在本步骤中,如果内存数据库中保存有所述用户标识对应的数据版本,则通常说明要向该用户标识对应的用户发布新版本,执行步骤S202。 [0077] In this step, if the database is stored in the memory of the user identification data corresponding to the version, the user would like to be described is usually a user identifier corresponding new release, step S202. 如果内存数据库中没有保存所述用户标识对应的数据版本,则通常说明针对该用户标识对应的用户,仍让其使用老版本,执行步骤S203。 If no version of the data memory database storing the user identifier corresponding to the user instructions for the user generally corresponding to the identifier, are still allowed to use the old version, performs step S203.

[0078] 仍以某软件发布新版本2.0,开发人员想要对IP地址为192.168.0.15的用户发布该新版本为例,假设开发人员将所述用户标识和所述数据版本的对应关系存储在redis存储系统中,而在步骤SlOl中解析出的用户标识为IP地址:192.168.0.15,则在本步骤中,经判断得知,redis缓存中存在用户标识为192.168.0.15的key值,执行步骤S202。 [0078] is still a new software release version 2.0, developers who want to release the new version of the IP address of 192.168.0.15 the user as an example, suppose the developer and the user identification data stored in the correspondence between the versions redis storage system, and at step SlOl parsing the user ID for the IP address: 192.168.0.15, then in this step, the determination that there is a user identifier in the cache redis key value 192.168.0.15 executes step S202. 如果在步骤SlOl中解析出的用户标识为IP地址:192.168.0.14,则在本步骤中,经判断得知,所述redis缓存中不存在用户标识为192.168.0.14的key值,则执行步骤S203。 If the parsed in step SlOl user identifier in the IP address: 192.168.0.14, then in this step, after determining that the user does not exist in the cache redis identified as a key value of 192.168.0.14, step S203 .

[0079] 在步骤S202中,在所述内存数据库中获取所述用户标识对应的数据版本。 [0079] acquire data of the version corresponding to the user identifier in the database memory in step S202.

[0080] 基于前述步骤S201的判断结果,在所述redis缓存中获取key值192.168.0.15对应的value值2.0,即获取用户标识192.168.0.15对应的数据版本2.0。 [0080] acquired value corresponding to the value of 192.168.0.15 key value based on a result of the aforementioned step S201 in the cache redis 2.0, i.e., acquires data corresponding to the version 2.0 user identification 192.168.0.15.

[0081] 在步骤S203中,获取默认数据版本以作为所述用户标识对应的数据版本。 [0081] In step S203, it acquires the default data version as the version data corresponding to the user identification.

[0082] 基于前述步骤S201的判断结果,内存数据库中没有保存用户标识192.168.0.14的key值,则获取默认数据版本以作为该用户标识对应的数据版本,所述默认数据版本通常为老版本,比如:上述软件的版本1.0。 [0082] Based on the determination result of step S201, the memory is not stored in the user identification database key value of 192.168.0.14, default data is acquired version as the version data corresponding to the user identifier, the default version of the data is usually the old version, For example: version 1.0 software listed above.

[0083] 在本实施例中,从内存数据库中获取用户标识对应的数据版本,读取速度快,不会影响用户数据请求的响应时间。 [0083], the present embodiment acquires the data in the database version from memory corresponding to the user ID, the fast read speed, does not affect the response time to user data requests. 同时,在本实施例中,由于数据版本获取的逻辑过程与数据版本的存储分离,当开发人员想要调整新的数据版本的发布对象时,开发人员仅需更改内存数据库中用户标识与数据版本的对应关系即可,可用性强,操作方便。 Meanwhile, in the present embodiment, since the process data stored discrete logic version of the data acquired version, when a developer wants to adjust the release of new data objects, the developer only needs to change the user ID and version data memory databases correspondence relationship to, the availability of strong, easy to operate.

[0084] 需要说明的是,本实施例可以支持多个数据版本同时发布,比如:某软件老的数据版本为1.0,开发人员同时发布新的数据版本2.0和2.1,其中,针对用户A发布2.0版本,针对用户B发布2.1版本,其他用户仍然使用1.0版本,则开发人员可以将用户A的用户标识与数据版本2.0的对应关系存储在内存数据库中,将用户B的用户标识与数据版本2.1的对应关系也存储在内存数据库中,以便在接收到用户A或用户B的数据请求时,可以获取到各自对应的数据版本。 [0084] Incidentally, the present embodiment can support multiple data versions also released, such as: a data old software version 1.0, developers also released new data versions 2.0 and 2.1, wherein the release for the user A 2.0 version, released for the user B 2.1 release, other users can still use the 1.0 version, developers can store correspondence between the user identity and data version of the user a is 2.0 in-memory database, the user identifier and version of the data user B 2.1 the correspondence relationship is also stored in memory in a database, so that when data is received or the user a requests the user B, can obtain the data corresponding to the respective versions.

[0085] 在步骤S103中,根据所述数据版本获取所述数据请求所请求的数据。 [0085] In step S103, the acquired data is the data request according to the requested data version.

[0086] 基于前述步骤S102,在获取到所述用户标识对应的数据版本后,获取该数据版本的用户请求的数据。 [0086] Based on the foregoing step S102, the acquired user identification data corresponding to the version, the version of the data to obtain data requested by the user. 通常来讲,网站或软件开发商会提供多台业务服务器为用户提供服务,当有新的数据版本发布时,可以升级其中某些业务服务器,以使该业务服务器能够支持新的数据版本的数据,同时,对于其他的业务服务器,仍为老版本数据。 Generally, a website or software developers will offer more than one service server to provide users with services when there is a new version of the data release, you can upgrade some of the server business, so that the business can support new data server version of the data, Meanwhile, for other business servers, is still the old version of the data. 在本步骤中,根据所述用户标识对应的数据版本,可以从支持该数据版本的业务服务器上获取用户请求的数据,也可以在本机中缓存有该数据版本的所述数据时,从本机的缓存中获取所述数据,本公开对此不作限制。 In this step, according to the version data corresponding to the user identifier, the user data may be obtained from the support of the requested data service server version, there may be cached version of the data of the data in the machine from this cache machine obtain the data, the present disclosure is not limited to this.

[0087] 请参考图3,所述根据所述数据版本获取所述数据请求所请求的数据可以包括以下步骤: [0087] Please refer to FIG. 3, the acquired data in the data requested by the request may include the steps according to the version of the data:

[0088] 在步骤S301中,判断是否存在支持所述数据版本的业务服务器,如果存在支持所述数据版本的业务服务器,则执行步骤S302。 [0088] In step S301, it is determined whether there is data to support the service server version, if the version of the data supporting the presence service server, step S302. 如果不存在支持所述数据版本的业务服务器,则执行步骤S303。 If the version of the data service support server does not exist, step S303.

[0089] 在本实施例中,在获取到用户标识对应的数据版本后,先判断是否存在支持所述数据版本的业务服务器,如果存在支持所述数据版本的业务服务器,则执行步骤S302。 [0089] In the present embodiment, after obtaining the user ID corresponding to the version of the data, to determine whether there is data to support the service server version, if the version of the data service support server is present, step S302. 如果不存在支持所述数据版本的业务服务器,比如:由于开发人员没有及时更新存储在代理服务器中的所述用户标识和所述数据版本的对应关系,那么就可能会导致不存在支持该数据版本的业务服务器,执行步骤S303。 If the data supports the version of the business server does not exist, for example: As the developer did not update the user identifier and the correspondence between the versions of the data stored in the proxy server, then it could lead to the absence of data to support this version business server, execute step S303.

[0090] 在步骤S302中,从支持所述数据版本的业务服务器上获取所述数据请求所请求的数据。 [0090] In step S302, the data acquiring data requested by the request from the data support the version of the service server.

[0091] 在本步骤中,可以从支持所述数据版本的业务服务器上获取所述数据请求所请求的数据,即获取用户请求的数据。 [0091], may acquire the data requested by the data request from the data support the version of the service server in this step, i.e. obtaining data requested by the user. 在这个过程中,代理服务器可以根据负载均衡原则选择一台支持所述数据版本的业务服务器以获取用户请求的数据。 In this process, the proxy server can select a version supporting the data service server according to a load balancing principle to obtain the data requested by the user. 当然,在实现时,本领域技术人员也可以参照相关技术,以轮询或指定的方式选择支持所述数据版本的业务服务器以获取用户请求的数据,本公开对此不作限制。 Of course, at the time of implementation, one skilled in the art may refer to the related art, or to specify a polling mode selection data support the version of the service server to obtain the data requested by the user, the present disclosure is not limited to this.

[0092] 在步骤S303中,从支持默认数据版本的业务服务器上获取所述数据请求所请求的数据。 [0092] In step S303, the data acquiring data requested by the request from the data support the default version of the service server.

[0093] 基于前述步骤S301的判断结果,在不存在支持所述数据版本的业务服务器时,可以从支持默认数据版本的业务服务器上获取所述数据请求所请求的数据,即,在不存在支持所述数据版本的业务服务器时,获取老版本的数据。 [0093] Based on the determination result of step S301, when the data support the version of the business server does not exist, the default version of the data from the service server to obtain data to support the data requested by the request, i.e., in the absence of support when the data server version of the business, get the old version of the data.

[0094] 举例来说,某软件向IP地址为192.168.0.15的用户发布新版本2.0,开发人员已经预先在代理服务器上存储用户标识192.168.0.15与数据版本2.0的对应关系。 [0094] For example, a user of the software for the IP address of 192.168.0.15 released a new version 2.0, developers have pre-stored in the proxy server user identification data and correspondence between 192.168.0.15 version 2.0. 假设,该数据版本2.0由于存在某些问题,已被停用,开发人员将原来支持2.0版本的业务服务器中的数据更新为老的数据版本1.0,但还没有来得及更新之前存储的用户标识192.168.0.15与数据版本2.0的对应关系,当在步骤S102中获取到用户标识192.168.0.15对应的数据版本2.0后,在步骤S301中判断不存在支持数据版本2.0的业务服务器,则从支持默认数据版本的业务服务器中获取数据,比如:从支持老的数据版本1.0的业务服务器中获取数据。 Assume that the data version 2.0 due to some problems, has been disabled, the original developer of business support version 2.0 server is updated to version 1.0 the old data, but has not had time to update the stored user identity before 192.168. 0.15 and 2.0 versions of the data corresponding relationship, obtained when the data corresponding to the user identifier 192.168.0.15 version 2.0 in step S102, it is determined in step S301 does not exist in the version 2.0 supports data service server, the default data from the version supported business server access to data, such as: get data from old data to support business version 1.0 server.

[0095] 在本实施例中,在获取到用户标识对应的数据版本后,判断是否存在支持所述数据版本的业务服务器,并在不存在支持所述数据版本的业务服务器时,从支持默认数据版本的业务服务器获取数据,以避免不能及时更新内存数据库而导致数据获取失败。 When [0095] In the present embodiment, after obtaining the user ID corresponding to the version of the data, it determines whether there is version supports the data service server, and supports the data service server version does not exist, the default data support version of the business server access to data, in order to avoid memory can not update the database and data acquisition result in failure.

[0096] 在步骤S104中,将所述数据返回给用户。 [0096] In step S104, the data returned to the user.

[0097] 在本步骤中,将用户标识对应的数据版本的数据返回给用户,以实现灰度发布。 [0097] In this step, the version of the user identification data corresponding to the data returned to the user, in order to achieve gradation released.

[0098] 需要说明的是,在本实施例中,可以使用Lua作为Nginx插件,在Lua中配置用户标识的解析、数据版本的获取过程,使用Lua进行配置,不会影响Nginx的性能。 [0098] Incidentally, in the present embodiment, the performance may be used as Nginx Lua plug disposed parse user ID, version of the data acquisition process in Lua, Lua configuration used, it does not affect the Nginx.

[0099] 由以上描述可以看出,本公开在接收到用户发送的数据请求时,根据从所述数据请求中解析出的用户标识以获取对应的数据版本,进而可以为用户获取该数据版本的数据,本公开在实现灰度发布的过程中,将数据版本获取的逻辑过程与数据版本的存储分离,可以指定任意发布对象,可用性强。 [0099] As can be seen from the above description, the present disclosure when receiving data request sent by the user, according to the parsed data request from the user identification to obtain corresponding data versions, and further can obtain the user data version data, discrete logic stored procedure in the process of the present disclosure grayscale published, the version of the data with the data acquired version, release can specify any object strong availability.

[0100] 下面结合具体的实施例来描述本公开的实现过程。 [0100] connection with the following description of specific embodiments of the present disclosure implement the process.

[0101] 请参考图4,假设某软件开发商使用4台业务服务器为用户提供服务,其中,业务服务器41和业务服务器42支持数据版本1.0,业务服务器43和业务服务器44支持新的数据版本2.0。 [0101] Please refer to FIG 4, suppose that a software developer using the service server 4 provides services to users, wherein the service server 41 and service server 42 version 1.0 supports data service server 43 and service server 44 supports the new data version 2.0 . 开发人员欲将数据版本2.0发布给用户A试用,于是在代理服务器45的内存数据库中存储用户A的IP地址192.168.0.15与数据版本2.0的对应关系,并设置默认数据版本1.0。 Developers wishing version 2.0 issued to the user data A trial, then the IP address of the user A stored in the correspondence relationship memory database proxy server 45 in the data 192.168.0.15 version 2.0, version 1.0, and set the default data.

[0102] 当代理服务器45接收到某一数据请求时,如果从该数据请求中解析出的用户的IP地址为192.168.0.15,即从该数据请求中解析出的用户标识为192.168.0.15,则可以在内存数据库中获取所述用户标识192.168.0.15对应的数据版本2.0,然后代理服务器45根据数据版本2.0,可以从业务服务器43或业务服务器44中获取所述数据请求所请求的数据并返回给用户,以实现将数据版本2.0下发给用户A。 [0102] When the proxy server 45 receives a data request, if the parsed data request from the user's IP address is 192.168.0.15, i.e., the parsed data request from the user ID is 192.168.0.15, then the user may acquire the data identifier corresponding to the version 2.0 192.168.0.15 in-memory database, then the proxy server 45 may obtain data requested by the data request from the service server 43 or the application server 44 and returns to the data version 2.0 users, in order to achieve the 2.0 version of the data to users under A.

[0103] 如果从该数据请求中解析出的用户的IP地址为192.168.0.14,即从该数据请求中解析出的用户标识为192.168.0.14,由于所述内存数据库中没有保存用户标识192.168.0.14对应的数据版本,所以获取默认数据版本1.0以作为所述用户标识192.168.0.14对应的数据版本,然后代理服务器45根据数据版本1.0,可以从业务服务器41或业务服务器42中获取所述数据请求所请求的数据并返回给用户,以实现针对IP地址为192.168.0.14的用户,仍向其下发老的数据版本。 [0103] If the parsed data request from the user's IP address is 192.168.0.14, i.e., the parsed data request from the user ID is 192.168.0.14, since the memory is not stored in the user identification database 192.168.0.14 corresponding to the version of the data, the data acquired version 1.0 as the default version of the data corresponding to the user identifier 192.168.0.14, then the proxy server 45 may obtain the data request from the service server 41 or the application server 42 according to the data version 1.0 data request and returned to the user, in order to achieve the IP address of 192.168.0.14 for the user, still issued its old version of the data.

[0104] 在图4所示的应用场景中,代理服务器45可以采用前述方法实施例描述的方法来实现上述用户进行数据获取的过程,在此不再赘述。 [0104] In the application scenario shown in FIG. 4, the proxy server 45 may be a method described in the aforementioned method employed to achieve the above-described embodiments of the process user data acquired, are not repeated here.

[0105] 与前述数据获取方法实施例相对应,本公开还提供了数据获取装置的实施例。 [0105] The method of obtaining the data corresponding to the embodiment, the present disclosure also provides an embodiment of a data acquisition apparatus.

[0106] 图5是根据一示例性实施例示出的一种数据获取装置框图。 [0106] FIG. 5 is a block diagram of apparatus according to a data acquisition illustrates an exemplary embodiment.

[0107] 请参考图5,该数据获取装置500包括:标识解析单元501、版本获取单元502、数据获取单元503以及数据返回单元504。 [0107] Please refer to FIG. 5, the data acquisition apparatus 500 includes: a parsing unit identifier 501, version acquisition unit 502, the data acquisition unit 503 and a data returning unit 504.

[0108] 其中,该标识解析单元501被配置为:从用户发送的数据请求中解析出用户标识。 [0108] wherein, the identifier parsing unit 501 is configured to: parse the data from the user identification request sent by the user.

[0109] 该版本获取单元502被配置为:获取所述用户标识对应的数据版本。 [0109] This version acquisition unit 502 is configured to: obtain data corresponding to the user identifier version.

[0110] 该数据获取单元503被配置为:根据所述数据版本获取所述数据请求所请求的数据。 [0110] The data acquisition unit 503 is configured to: obtain data requested by the data request according to the version of the data.

[0111] 该数据返回单元504被配置为:将所述数据返回给用户。 [0111] The data returning unit 504 is configured to: return the data to the user.

[0112] 上述实施例中,在接收到用户发送的数据请求时,根据从所述数据请求中解析出的用户标识以获取对应的数据版本,进而可以为用户获取该数据版本的数据,本公开在实现灰度发布的过程中,将数据版本获取的逻辑过程与数据版本的存储分离,可以指定任意发布对象,可用性强。 [0112] In the embodiment described above, when receiving data request sent by the user, according to the parsed data request from the user identification to obtain corresponding data versions, and further can obtain the version of the data is user data, the present disclosure in the process of implementing the gradation release, discrete logic process data stored version of the data acquired version, release can specify any object strong availability.

[0113] 请参考图6,图6是根据一示例性实施例示出的另一种数据获取装置框图,该实施例在前述图5所示实施例的基础上,所述版本获取单元502可以包括:第一判断子单元5021以及第一获取子单元5022。 [0113] Please refer to FIG. 6, FIG. 6 is a block diagram of apparatus according to another acquisition of data is shown an exemplary embodiment, this embodiment based on the embodiment shown in FIG. 5 of the embodiment, the acquisition unit 502 may include a version : a first determining subunit 5021 and a first obtaining subunit 5022.

[0114] 其中,该第一判断子单元5021被配置为:判断内存数据库中是否保存有所述用户标识对应的数据版本。 [0114] wherein, the first determining sub-unit 5021 is configured to: determining whether the memory database stores user identification data corresponding to the versions.

[0115] 该第一获取子单元5022被配置为:在内存数据库中保存有所述用户标识对应的数据版本时,在所述内存数据库中获取所述用户标识对应的数据版本。 [0115] The first acquisition sub-unit 5022 is configured to: when the data stored version corresponding to the user identification in the database memory, acquires data version corresponding to the user identifier in the database memory.

[0116] 上述实施例中,可以从内存数据库中获取用户标识对应的数据版本,读取速度快,不会影响用户数据请求的响应时间。 [0116] In the above-described embodiments, the database may be retrieved from memory version of the data corresponding to the user ID, the reading speed is fast, it does not affect the response time to user data requests. 同时,在本实施例中,由于数据版本获取的逻辑过程与数据版本的存储分离,当开发人员想要调整新的数据版本的发布对象时,开发人员仅需更改内存数据库中用户标识与数据版本的对应关系即可,操作方便。 Meanwhile, in the present embodiment, since the process data stored discrete logic version of the data acquired version, when a developer wants to adjust the release of new data objects, the developer only needs to change the user ID and version data memory databases the corresponding relationship to facilitate operation.

[0117] 请参考图7,图7是根据一示例性实施例示出的另一种数据获取装置框图,该实施例在前述图6所示实施例的基础上,所述版本获取单元502还可以包括:第二获取子单元5023。 [0117] Please refer to FIG. 7, FIG. 7 is a block diagram of apparatus in accordance with another data acquisition is shown an exemplary embodiment, this embodiment based on the embodiment shown in FIG. 6 in the embodiment, the acquisition unit 502 may also be version comprising: a second obtaining subunit 5023.

[0118] 该第二获取子单元5023被配置为:在内存数据库中没有保存所述用户标识对应的数据版本时,获取默认的数据版本以作为所述用户标识对应的数据版本。 [0118] The second obtaining sub-unit 5023 is configured to: when no data corresponding to the version stored in the user identification database in memory, the default data acquired version as the version data corresponding to the user identification.

[0119] 上述实施例中,可以将用户标识和数据版本的对应关系存储在内存数据库中,能够实现持久化存储,更加安全。 [0119] In the above embodiment, and may be user data version identification of the correspondence relationship stored in the database memory, persistent storage can be achieved, more secure.

[0120] 请参考图8,图8是根据一示例性实施例示出的另一种数据获取装置框图,该实施例在前述图5所示实施例的基础上,所述数据获取单元503可以包括:第二判断子单元5031、第三获取子单元5032。 [0120] Please refer to FIG 8, FIG 8 is a block diagram of apparatus in accordance with another data acquisition is shown an exemplary embodiment, this embodiment based on the embodiment, the data acquisition unit shown in the FIG. 5 may include 503 : a second determining sub-unit 5031, a third obtaining subunit 5032.

[0121] 其中,该第二判断子单元5031被配置:判断是否存在支持所述数据版本的业务服务器。 [0121] wherein the second determining sub-unit 5031 is configured to: determine whether there is data to support the version of the service server.

[0122] 该第三获取子单元5032被配置为:在存在支持所述数据版本的业务服务器时,则从支持所述数据版本的业务服务器上获取所述数据请求所请求的数据。 [0122] The third obtaining sub-unit 5032 is configured to: when there is data to support the version of the service server, acquiring data from the data request to support the requested version of the data service server.

[0123] 上述实施例中,在获取到用户标识对应的数据版本后,判断是否存在支持所述数据版本的业务服务器,并在不存在支持所述数据版本的业务服务器时,可以从支持默认数据版本的业务服务器获取数据,以避免没有及时更新内存数据库而导致的数据获取失败。 When [0123] the above-described embodiment, after obtaining the user ID corresponding to the version of the data, determines whether there is version supports the data service server, and supports the data service server version does not exist, default data can be supported from version of the business server access to data, to avoid data did not update the database memory caused by the failure to obtain.

[0124] 需要说明的是,上述图8所示的装置实施例示出的第二判断子单元5031和第三获取子单元5032的结构也可以包括在前述图6和图7所示的装置实施例中,本公开对此不作限制。 [0124] Incidentally, the third configuration example of a second determining sub-unit 5031 shown in obtaining subunit 5032 and a device according to the embodiment shown in Figure 8 may also include embodiments in the apparatus shown in FIG. 6 and FIG 7 the , the disclosure which is not limited.

[0125] 请参考图9,图9是根据一示例性实施例示出的另一种数据获取装置框图,该实施例在前述图8所示实施例的基础上,所述数据获取单元503还可以包括:第四获取子单元5033。 [0125] Please refer to FIG. 9, FIG. 9 is a block diagram of apparatus according to another acquisition of data is shown an exemplary embodiment, this embodiment based on the embodiment shown in FIG. 8 of the embodiment, the data acquisition unit 503 may also be comprising: a fourth obtaining subunit 5033.

[0126] 该第四获取子单元5033被配置为:在不存在支持所述数据版本的业务服务器时,从支持默认的数据版本的业务服务器上获取所述数据请求所请求的数据。 [0126] The fourth obtaining sub-unit 5033 is configured to: when the version of the data service supporting server does not exist, the data acquiring data requested by the request from the default version of the data support service server.

[0127] 请参考图10,图10是根据一示例性实施例示出的另一种数据获取装置框图,该实施例在前述图5所示实施例的基础上,所述标识解析单元501可以包括:标识解析子单元5011。 [0127] Please refer to FIG. 10, FIG. 10 is a block diagram of apparatus according to an exemplary embodiment acquires another embodiment of the data shown, in this embodiment of the FIG. 5 embodiment based on the embodiment, the identifier 501 may include a parsing unit shown : identifier parsing subunit 5011.

[0128] 该标识解析子单元5011被配置为:从所述数据请求中解析出用户的IP地址或者cookie作为所述用户标识。 [0128] The identifier parsing sub-unit 5011 is configured to: parse the data request from the IP address of the user, or a user identification cookie.

[0129] 需要说明的是,上述图10所示的装置实施例示出的标识解析子单元5011的结构也可以包括在前述图6至图9所示的装置实施例中,本公开对此不作限制。 [0129] Incidentally, subunit identifier parsing apparatus illustrated embodiment shown in FIG. 10 above embodiment configuration 5011 may also include in the apparatus shown in FIGS. 6 to 9 embodiment, the present disclosure is not limited to this .

[0130] 关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。 [0130] For the above-described embodiment apparatus, wherein each module performs a specific operation of the embodiment has been described in detail in an embodiment relating to the method, and will not be here described in detail.

[0131] 相应的,本公开还提供了一种数据获取装置,所述装置包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为:从用户发送的数据请求中解析出用户标识;获取所述用户标识对应的数据版本;根据所述数据版本获取所述数据请求所请求的数据;将所述数据返回给用户。 [0131] Accordingly, the present disclosure further provides a data acquisition means, the apparatus comprising: a processor; a memory storing processor-executable instructions; and wherein the processor is configured to: transmit from the user's parsing data request identifying a user; acquiring data version corresponding to the user identifier; acquiring data requested by the data request according to the version of the data; the data returned to the user.

[0132] 相应的,本公开还提供一种非临时性计算机可读存储介质,当所述存储介质中的指令由终端的处理器执行,使得终端能够执行一种数据获取方法,所述方法包括:从用户发送的数据请求中解析出用户标识;获取所述用户标识对应的数据版本;根据所述数据版本获取所述数据请求所请求的数据;将所述数据返回给用户。 [0132] Accordingly, the present disclosure also provides a non-transitory computer-readable storage medium, said storage medium when executed by a processor of the terminal, allowing the terminal to perform a data acquisition method, the method comprising : parses the data request sent by the user identifier of a user; acquiring data version corresponding to the user identifier; acquiring data requested by the data request according to the version of the data; the data returned to the user.

[0133] 关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。 [0133] For the above-described embodiment apparatus, wherein each module performs a specific operation of the embodiment has been described in detail in an embodiment relating to the method, and will not be here described in detail.

[0134] 对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。 [0134] For the apparatus of the embodiment, since a method which substantially corresponds to the embodiment, the portion of the embodiment of the method embodiments to be described where relevant. 以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。 It means the above-described embodiments are merely illustrative, as a unit wherein the separate parts may be or may not be physically separate, parts displayed as units may be or may not be physical units, i.e. may be located a place, or they may be distributed to multiple network units. 可以根据实际的需要选择其中的部分或者全部模块来实现本公开方案的目的。 Part or all of the modules may be selected according to actual needs to achieve the object of the present disclosure program. 本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。 Those of ordinary skill in the art without creative efforts, can be understood and implemented.

[0135] 图11是根据一示例性实施例示出的一种用于数据获取的装置1100的框图。 [0135] FIG. 11 is an exemplary embodiment illustrates a block diagram of an apparatus 1100 for data acquisition. 例如,装置1100可以被提供为一服务器。 For example, it means 1100 may be provided as a server. 参照图11,装置1100包括处理组件1122,其进一步包括一个或多个处理器,以及由存储器1132所代表的存储器资源,用于存储可由处理部件1122的执行的指令,例如应用程序。 Referring to Figure 11, apparatus 1100 includes a processing component 1122, which further includes one or more processors, memory resources, and 1132 represented by a memory for storing instructions for execution by a processing means 1122, such as an application. 存储器1132中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。 Stored in application memory 1132 may include one or more modules each corresponding to a set of instructions. 此外,处理组件1122被配置为执行指令,以执行上述方法。 Moreover, processing component 1122 is configured to execute instructions to perform the method described above.

[0136] 装置1100还可以包括一个电源组件1126被配置为执行装置1100的电源管理,一个有线或无线网络接口1150被配置为将装置1100连接到网络,和一个输入输出(I/O)接口1158。 [0136] Apparatus 1100 may further include a power supply assembly 1126 is configured to perform device power management 1100, a wired or wireless network interface 1150 is configured to connect the device 1100 to the network, and an input-output (I / O) interfaces 1158 . 装置1100可以操作基于存储在存储器1132的操作系统,例如Windows ServerTM,Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM 或类似。 Apparatus 1100 may operate based on an operating system stored in the memory 1132, for example, Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.

[0137] 本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。 [0137] Those skilled in the art upon consideration of the specification and practice of the disclosure disclosed herein, will readily appreciate other embodiments of the present disclosure. 本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。 This application is intended to cover any variations, uses, or adaptations of the present disclosure, these variations, uses, or adaptations following the general principles of the present disclosure and include the common general knowledge in the art of the present disclosure is not disclosed in the conventional techniques or . 说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。 The specification and examples be considered as exemplary only, the true scope and spirit of the present disclosure being indicated by the following claims.

[0138] 应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。 [0138] It should be understood that the present disclosure is not limited to the above has been described and illustrated in the drawings precise structure, and may be departing from its scope various modifications and changes do not. 本公开的范围仅由所附的权利要求来限制。 The scope of the present disclosure is limited only by the appended claims.

Claims (13)

1.一种数据获取方法,其特征在于,包括: 从用户发送的数据请求中解析出用户标识; 获取所述用户标识对应的数据版本; 根据所述数据版本获取所述数据请求所请求的数据; 将所述数据返回给用户。 A data acquisition method, comprising: parsing data from a request sent by the user identifier of a user; acquiring data version corresponding to the user identifier; acquiring data requested by the data request according to the version of the data ; the data returned to the user.
2.根据权利要求1所述的数据获取方法,其特征在于, 所述获取所述用户标识对应的数据版本包括: 判断内存数据库中是否保存有所述用户标识对应的数据版本; 如果内存数据库中保存有所述用户标识对应的数据版本,则在所述内存数据库中获取所述用户标识对应的数据版本。 The rights data acquisition method according to claim 1, wherein the obtaining the user identifier corresponding to the data version comprises: if the version of the stored data corresponding to a user identifier database memory is determined; if memory database data stored version corresponding to the user identification, obtaining the user identification data corresponding to the version in the database memory.
3.根据权利要求2所述的数据获取方法,其特征在于,还包括: 如果内存数据库中没有保存所述用户标识对应的数据版本,则获取默认数据版本以作为所述用户标识对应的数据版本。 The data acquisition method according to claim 2, characterized in that, further comprising: if no memory data version stored in the database corresponding to the identifier of the user, default data is acquired version as the version data corresponding to the user identifier .
4.根据权利要求1所述的数据获取方法,其特征在于, 所述根据所述数据版本获取所述数据请求所请求的数据包括: 判断是否存在支持所述数据版本的业务服务器; 如果存在支持所述数据版本的业务服务器,则从支持所述数据版本的业务服务器上获取所述数据请求所请求的数据。 4. The data acquisition method according to claim 1, wherein said acquiring data according to the data version of the data requested by the request comprises: determining whether there is data to support the version of the service server; if there is support the version of the data service server, acquiring data from the data request to support the requested version of the data service server.
5.根据权利要求4所述的数据获取方法,其特征在于,还包括: 如果不存在支持所述数据版本的业务服务器,则从支持默认数据版本的业务服务器上获取所述数据请求所请求的数据。 The data acquisition method according to claim 4, characterized in that, further comprising: if the version of the data service supporting server does not exist, to support access to the data request from the data of the default version of the requested service server data.
6.根据权利要求1所述的数据获取方法,其特征在于, 所述从用户发送的数据请求中解析出用户标识包括: 从所述数据请求中解析出用户的IP地址或者cookie作为所述用户标识。 6. The data acquisition method according to claim 1, wherein the parsing comprises identifying the user from the data request sent by the user: IP addresses parses the data request from a user or the user's cookie identity.
7.一种数据获取装置,其特征在于,包括: 标识解析单元,用于从用户发送的数据请求中解析出用户标识; 版本获取单元,用于获取所述用户标识对应的数据版本; 数据获取单元,用于根据所述数据版本获取所述数据请求所请求的数据; 数据返回单元,用于将所述数据返回给用户。 A data acquisition device comprising: an identifier parsing unit configured to parse data from the user identification request sent by the user; version acquisition unit for acquiring data version corresponding to the user identifier; data acquisition means for acquiring data requested by the data request according to the version of the data; a data returning unit configured to return the data to the user.
8.根据权利要求7所述的数据获取装置,其特征在于,所述版本获取单元包括: 第一判断子单元,用于判断内存数据库中是否保存有所述用户标识对应的数据版本;第一获取子单元,用于在内存数据库中保存有所述用户标识对应的数据版本时,在所述内存数据库中获取所述用户标识对应的数据版本。 8. The data acquisition device of claim 7, wherein the version obtaining unit comprises: a first determining subunit, configured to determine whether the database stored memory data version corresponding to the user identifier; first acquisition sub-unit, used for saving the user identification data corresponding to the version in the database memory, acquires data version corresponding to the user identifier in the database memory.
9.根据权利要求8所述的数据获取装置,其特征在于,所述版本获取单元还包括: 第二获取子单元,用于在内存数据库中没有保存所述用户标识对应的数据版本时,获取默认的数据版本以作为所述用户标识对应的数据版本。 9. The data acquisition device of claim 8, wherein the acquisition unit further version comprises: acquiring a second sub-unit, no data for the version corresponding to the user identification stored in memory, database, acquires the default data version as the version data corresponding to the user identification.
10.根据权利要求7所述的数据获取装置,其特征在于,所述数据获取单元包括: 第二判断子单元,用于判断是否存在支持所述数据版本的业务服务器; 第三获取子单元,用于在存在支持所述数据版本的业务服务器时,则从支持所述数据版本的业务服务器上获取所述数据请求所请求的数据。 According to claim 7, wherein said data acquisition apparatus, wherein the data acquisition unit comprises: a second determining sub-unit, for determining whether there is data to support the version of the service server; a third obtaining sub-unit, It is used when there is data to support the service server version, support the version of the data from a service server to obtain data requested by the data request.
11.根据权利要求10所述的数据获取装置,其特征在于,所述数据获取单元还包括: 第四获取子单元,用于在不存在支持所述数据版本的业务服务器时,从支持默认的数据版本的业务服务器上获取所述数据请求所请求的数据。 11. The data acquisition device of claim 10, wherein said data acquisition unit further comprises: a fourth obtaining sub-unit, configured to, when said data support the version of the business server does not exist, the default from the support acquiring data requested by the data request to the data service server version.
12.根据权利要求7所述的数据获取装置,其特征在于,所述标识解析单元包括: 标识解析子单元,用于从所述数据请求中解析出用户的IP地址或者cookie作为所述用户标识。 Claim 12. The data acquisition device of claim 7, wherein parsing the identification unit comprises: a sub-identifier parsing unit configured to parse the user data request from the IP address or a cookie to the user identity .
13.一种数据获取装置,其特征在于,包括: 处理器; 用于存储处理器可执行指令的存储器; 其中,所述处理器被配置为: 从用户发送的数据请求中解析出用户标识; 获取所述用户标识对应的数据版本; 根据所述数据版本获取所述数据请求所请求的数据; 将所述数据返回给用户。 13. A data acquisition device comprising: a processor; processor-executable instructions for storing a memory; wherein the processor is configured to: request from the user data sent by parsing the user ID; acquiring the version of the data corresponding to the user identifier; acquiring data requested by the data request according to the version of the data; the data returned to the user.
CN 201410589547 2014-10-28 2014-10-28 Data acquiring method and device CN104317914A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201410589547 CN104317914A (en) 2014-10-28 2014-10-28 Data acquiring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201410589547 CN104317914A (en) 2014-10-28 2014-10-28 Data acquiring method and device

Publications (1)

Publication Number Publication Date
CN104317914A true true CN104317914A (en) 2015-01-28

Family

ID=52373146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201410589547 CN104317914A (en) 2014-10-28 2014-10-28 Data acquiring method and device

Country Status (1)

Country Link
CN (1) CN104317914A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104852986A (en) * 2015-05-28 2015-08-19 北京奇艺世纪科技有限公司 Method and device for providing newly-added function

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7509393B2 (en) * 2001-12-19 2009-03-24 International Business Machines Corporation Method and system for caching role-specific fragments
CN101466024A (en) * 2007-12-19 2009-06-24 上海亿动信息技术有限公司 Method and device for inserted playing of advertisement information when playing multimedia file on customer equipment
JP2009238079A (en) * 2008-03-28 2009-10-15 Hitachi Software Eng Co Ltd Program delivery management system and method
CN102624771A (en) * 2011-08-05 2012-08-01 北京小米科技有限责任公司 Client upgrading method
CN103001967A (en) * 2012-12-13 2013-03-27 北京奇虎科技有限公司 Source station server and business push method
CN103164202A (en) * 2011-12-15 2013-06-19 深圳市腾讯计算机系统有限公司 Release method and device of gray level
CN103581231A (en) * 2012-07-25 2014-02-12 腾讯科技(北京)有限公司 UGC primary standby data synchronization method and system thereof
CN103890723A (en) * 2011-07-20 2014-06-25 谷歌公司 Distribution of multiple application versions

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7509393B2 (en) * 2001-12-19 2009-03-24 International Business Machines Corporation Method and system for caching role-specific fragments
CN101466024A (en) * 2007-12-19 2009-06-24 上海亿动信息技术有限公司 Method and device for inserted playing of advertisement information when playing multimedia file on customer equipment
JP2009238079A (en) * 2008-03-28 2009-10-15 Hitachi Software Eng Co Ltd Program delivery management system and method
CN103890723A (en) * 2011-07-20 2014-06-25 谷歌公司 Distribution of multiple application versions
CN102624771A (en) * 2011-08-05 2012-08-01 北京小米科技有限责任公司 Client upgrading method
CN103164202A (en) * 2011-12-15 2013-06-19 深圳市腾讯计算机系统有限公司 Release method and device of gray level
CN103581231A (en) * 2012-07-25 2014-02-12 腾讯科技(北京)有限公司 UGC primary standby data synchronization method and system thereof
CN103001967A (en) * 2012-12-13 2013-03-27 北京奇虎科技有限公司 Source station server and business push method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104852986A (en) * 2015-05-28 2015-08-19 北京奇艺世纪科技有限公司 Method and device for providing newly-added function

Similar Documents

Publication Publication Date Title
US7779091B2 (en) Method and system for providing virtualized application workspaces
US20120096365A1 (en) Providing remote application access using entitlements
US20110083138A1 (en) Self-service configuration for data environment
US20100235321A1 (en) Programming model for synchronizing browser caches across devices and web services
US8914514B1 (en) Managing network based content
US20120041970A1 (en) Distributed data cache for on-demand application acceleration
US20120254402A1 (en) Systems, apparatus, and methods for mobile device detection
US20100318968A1 (en) Catalog-based software component management
US20100049842A1 (en) Computing Environment Arranged to Support Predetermined URL Patterns
US20060123121A1 (en) System and method for service session management
US7886341B2 (en) External authentication against a third-party directory
US20130080514A1 (en) System and method for auto-tab completion of context sensitive remote managed objects in a traffic director environment
US8447757B1 (en) Latency reduction techniques for partitioned processing
US20130060810A1 (en) Smart database caching
US20130060842A1 (en) Remote desktop and data management system
US20100235829A1 (en) Programming model for installing and distributing occasionally connected applications
US20110320610A1 (en) Providing content to client device
US7779409B2 (en) Device-to-device software distribution
CN102109989A (en) Method, device and system for controlling browser cache
CN101557427A (en) Method for providing diffluent information and realizing the diffluence of clients, system and server thereof
CN102480397A (en) Method and equipment for accessing internet pages
CN102355500A (en) Business pushing method and device
US20120102220A1 (en) Routing traffic in an online service with high availability
US20150058461A1 (en) Image management in cloud environments
US9489227B2 (en) Apparatus and method for virtual desktop service

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination