CN109246080B - Resource sharing method, device, equipment and computer readable storage medium - Google Patents

Resource sharing method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN109246080B
CN109246080B CN201810877759.6A CN201810877759A CN109246080B CN 109246080 B CN109246080 B CN 109246080B CN 201810877759 A CN201810877759 A CN 201810877759A CN 109246080 B CN109246080 B CN 109246080B
Authority
CN
China
Prior art keywords
sound
target
target resource
request
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810877759.6A
Other languages
Chinese (zh)
Other versions
CN109246080A (en
Inventor
张浩川
陈群
余荣
蒲乐辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201810877759.6A priority Critical patent/CN109246080B/en
Publication of CN109246080A publication Critical patent/CN109246080A/en
Application granted granted Critical
Publication of CN109246080B publication Critical patent/CN109246080B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/101Access control lists [ACL]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Telephonic Communication Services (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a resource sharing method, a device, equipment and a computer readable storage medium, wherein the method comprises the steps of receiving request information sent by a sound of a requester, wherein the request information comprises target resource information and the sound information of the requester; judging whether the requesting party sound equipment has the acquisition authority of the target resource or not according to the request information, if so, acquiring the target resource; if not, determining a target sound from all the sounds with the target resource acquisition authority, and acquiring a corresponding target resource according to the target resource acquisition authority of the target sound; and establishing an access link corresponding to the target resource according to the target resource and the information of the requesting party sound equipment, and returning the access link to the requesting party sound equipment so that the requesting party sound equipment can access the target resource according to the access link. The method and the device can ensure the account and information safety of the sharing party sound equipment in the using process, and can also enable the requesting party sound equipment to access resources without permission under the condition of logging in the account, so that the user experience is improved.

Description

一种资源共享方法、装置、设备及计算机可读存储介质A resource sharing method, apparatus, device, and computer-readable storage medium

技术领域technical field

本发明实施例涉及信息共享技术领域,特别是涉及一种资源共享方法、装置、设备及计算机可读存储介质。Embodiments of the present invention relate to the technical field of information sharing, and in particular, to a resource sharing method, apparatus, device, and computer-readable storage medium.

背景技术Background technique

随着智能识别技术的不断进步,简单的生活方式已经很难满足我们的日常生活,上到智能手机,下到简单的插线板,无不在往智能的方向发展。智能音响是一个音响升级的产物,是家庭消费者用语音进行上网的一个工具,比如点播歌曲、上网购物或了解天气预报等。With the continuous advancement of intelligent identification technology, it is difficult for simple lifestyles to meet our daily life. From smartphones to simple power strips, all of them are developing in the direction of intelligence. Smart speakers are a product of audio upgrades. They are a tool for home consumers to use their voices to surf the Internet, such as on-demand songs, online shopping, or understanding the weather forecast.

智能音响一直被看作是未来的家庭智能控制终端,而这也是各大厂商十分看重的一点。从现阶段的发展情况来看,智能音响已经能够控制基本的智能家居设备,就像一个万能的语音遥控器,可以控制相应的灯光、窗帘、电视、空调、洗衣机、电饭煲等智能家居设备。另外,生活服务也是智能音箱非常重要的一方面功能,可以通过与支付宝口碑、滴滴出行等第三方应用的合作,提供查询周边、餐厅促销信息、路况、火车、机票、酒店等信息。Smart audio has always been regarded as the future home intelligent control terminal, and this is also a point that major manufacturers value very much. Judging from the current development situation, smart speakers have been able to control basic smart home devices, just like a universal voice remote control, which can control corresponding lights, curtains, TVs, air conditioners, washing machines, rice cookers and other smart home devices. In addition, life services are also a very important aspect of smart speakers. Through cooperation with third-party applications such as Alipay Koubei, Didi Chuxing, etc., it can provide information such as query surrounding, restaurant promotion information, road conditions, trains, air tickets, hotels, etc.

通常情况下,用户使用账号对智能音响的资源进行管理,同时用户可以根据个人喜好购买资源,也即用户可以通过购买相应的资源获取自己没有的资源。对于少数使用的资源,直接购买的方式并不能较好的满足用户需求,因此,需要共享资源获取权限的机制去帮助用户向拥有资源获取权限的用户那里得到有限制的资源获取权限。现有的资源共享方案是通过将共享方自身的账号与密码告知请求方,请求方直接登录账号使用相应的资源。现有技术中的资源共享方案一方面使共享方的隐私安全和信息保密带来一定的隐患,另一方面请求方用户需要登录其他用户的账号才能够获取相应的资源,使请求方用户的体验较差。Under normal circumstances, users use accounts to manage the resources of smart speakers, and users can purchase resources according to their personal preferences, that is, users can obtain resources that they do not have by purchasing corresponding resources. For a few used resources, the direct purchase method cannot better meet the needs of users. Therefore, a mechanism for sharing resource access rights is needed to help users obtain limited resource access rights from users who have resource access rights. The existing resource sharing scheme is to inform the requester of the sharer's own account and password, and the requester directly logs in to the account to use the corresponding resources. On the one hand, the resource sharing scheme in the prior art brings certain hidden dangers to the privacy security and information confidentiality of the sharing party; poor.

鉴于此,如何提供一种解决上述技术问题的资源共享方法、装置、设备及计算机可读存储介质成为本领域技术人员需要解决的问题。In view of this, how to provide a resource sharing method, apparatus, device and computer-readable storage medium for solving the above technical problems has become a problem to be solved by those skilled in the art.

发明内容SUMMARY OF THE INVENTION

本发明实施例的目的是提供一种资源共享方法、装置、设备及计算机可读存储介质,在使用过程中不仅能够保证共享方音响的账户和信息安全,还能够使请求方音响在登录自己账户的情况下访问到没有获取权限的资源,提高用户体验。The purpose of the embodiments of the present invention is to provide a resource sharing method, device, device and computer-readable storage medium, which can not only ensure the account and information security of the sharing party's audio during use, but also enable the requesting party's audio to log in to its own account. In the case of accessing resources without access rights, the user experience is improved.

为解决上述技术问题,本发明实施例提供了一种资源共享方法,包括:To solve the above technical problems, an embodiment of the present invention provides a resource sharing method, including:

S11:接收请求方音响发送的请求信息,所述请求信息包括目标资源信息和请求方音响信息;S11: Receive request information sent by the requester's audio, where the request information includes target resource information and requester's audio information;

S12:依据所述请求信息判断所述请求方音响是否具有目标资源的获取权限,若是,则获取所述目标资源,并进入S15;若否,则进入S13;S12: According to the request information, determine whether the requester audio has the acquisition authority of the target resource, if so, acquire the target resource, and enter S15; if not, enter S13;

S13:从具有所述目标资源获取权限的各个音响中确定出目标音响;S13: Determine the target sound from each sound with the target resource acquisition authority;

S14:依据所述目标音响的目标资源获取权限获取相应的目标资源;S14: Acquire the corresponding target resource according to the target resource acquisition authority of the target audio;

S15:依据所述目标资源及所述请求方音响信息建立与所述目标资源对应的访问链接,并将所述访问链接返回至所述请求方音响,以便所述请求方音响依据所述访问链接访问所述目标资源。S15: Establish an access link corresponding to the target resource according to the target resource and the requester audio information, and return the access link to the requester audio, so that the requester audio can follow the access link Access the target resource.

可选的,在所述接收请求方音响发送的请求信息之后,在所述依据所述请求信息判断所述请求方音响是否具有目标资源的获取权限之前,所述方法还包括:Optionally, after receiving the request information sent by the requester's audio, and before judging whether the requester's audio has the acquisition authority of the target resource according to the request information, the method further includes:

依据所述请求信息生成请求事件,所述请求事件包括所述请求信息;generating a request event according to the request information, where the request event includes the request information;

依据所述请求信息及预设排队机制确定出所述请求事件在请求队列中的添加位置;determining the addition position of the request event in the request queue according to the request information and the preset queuing mechanism;

将所述请求事件按照所述添加位置添加至所述请求队列中;adding the request event to the request queue according to the adding position;

对所述请求队列中的所有请求事件进行轮询,并从所述请求队列中获取所述请求事件及所述请求信息。All request events in the request queue are polled, and the request events and the request information are obtained from the request queue.

可选的,所述依据所述请求信息及预设排队机制确定出所述请求事件在请求队列中的添加位置的过程为:Optionally, the process of determining the addition position of the request event in the request queue according to the request information and the preset queuing mechanism is:

S21:依据所述请求信息获取所述请求方音响的参数信息,所述请求方音响的参数信息包括增益值、第一指标值、资源共享量、共享比例和积分值;S21: Acquire parameter information of the requester's audio according to the request information, where the parameter information of the requester's audio includes a gain value, a first indicator value, a resource sharing amount, a sharing ratio, and an integral value;

S22:依据所述请求方音响的参数信息及添加位置计算关系式确定所述请求事件在请求队列中的添加位置;S22: Determine the addition position of the request event in the request queue according to the parameter information of the requester's sound and the addition position calculation relationship;

所述添加位置计算关系式为:

Figure GDA0002958052850000031
和l=max{l',0};其中,
Figure GDA0002958052850000032
α+β+γ=1;其中:The added position calculation relationship is:
Figure GDA0002958052850000031
and l=max{l',0}; where,
Figure GDA0002958052850000032
α+β+γ=1; where:

l为所述请求事件的添加位置,L为请求队列的长度,a为请求方音响的增益值,h为请求方音响第一指标值,H为音响指标值阈值;m为请求方音响的资源共享量,p为请求方音响的共享比例,s为请求方音响的积分值,M为音响共享量阈值,P为音响共享比例阈值,S为音响积分值阈值,α、β和γ为常数。l is the addition position of the request event, L is the length of the request queue, a is the gain value of the requester's audio, h is the first indicator value of the requester's audio, H is the threshold of the audio indicator value; m is the resource of the requester's audio Sharing amount, p is the sharing ratio of the requester sound, s is the integral value of the requester sound, M is the sound sharing amount threshold, P is the sound sharing ratio threshold, S is the sound integral value threshold, α, β and γ are constants.

可选的,所述从具有所述目标资源获取权限的各个音响中确定出目标音响的过程为:Optionally, the process of determining the target sound from each sound with the target resource acquisition authority is:

S31:获取所述请求事件的参数信息;S31: Obtain parameter information of the request event;

S32:当所述请求事件的参数信息满足预设条件时,确定出具有所述目标资源获取权限的各个音响,并按照预设规则从具有所述目标资源获取权限的各个音响中确定出目标音响。S32: When the parameter information of the request event satisfies the preset condition, determine each sound with the target resource acquisition authority, and determine the target sound from each sound with the target resource acquisition authority according to the preset rule .

可选的,所述请求事件的参数信息包括事件处理周期t、事件修改次数n、请求方音响的积分值s、事件处理周期T、事件修改次数阈值N及事件修改次数最大上限值W;Optionally, the parameter information of the requested event includes an event processing period t, an event modification number n, an integral value s of the requester's sound, an event processing period T, an event modification number threshold N and an event modification number maximum upper limit W;

则,所述当所述请求事件的参数信息满足预设条件时,确定出具有所述目标资源获取权限的各个音响,并按照预设规则从具有所述目标资源获取权限的各个音响中确定出目标音响的过程为:Then, when the parameter information of the request event satisfies the preset condition, determine each sound with the acquisition authority of the target resource, and determine from the sound with the acquisition authority of the target resource according to the preset rule The process of target sound is:

S321:当n<W时,判断所述t和n是否满足t≥T或n≥N,若是,则进入S322;若否,则进入S326;S321: when n<W, determine whether the t and n satisfy t≥T or n≥N, if so, go to S322; if not, go to S326;

S322:判断是否存在具有所述目标资源获取权限且权限属性为默认共享状态的第一音响,若是,则进入S323;否则,进入S324;S322: Determine whether there is a first sound with the target resource acquisition authority and the authority attribute is the default shared state, if so, enter S323; otherwise, enter S324;

S323:确定出具有所述目标资源获取权限且权限属性为默认共享状态的各个第一音响,并随机从各个所述第一音响中选择一个第一音响作为目标音响;S323: Determine each first sound that has the target resource acquisition permission and whose permission attribute is a default shared state, and randomly select a first sound from each of the first sound as the target sound;

S324:判断是否存在具有所述目标资源获取权限且权限属性为非默认共享状态,若是,则进入S325;S324: Determine whether there is a permission to acquire the target resource and the permission attribute is a non-default shared state, and if so, enter S325;

S325:确定出具有所述目标资源获取权限且权限属性为非默认共享状态的各个第二音响,并按照积分值从大到小对各个所述第二音响进行排序,并从排序后的各个第二音响中随机选择一个第二音响作为目标音响;S325: Determine each second sound that has the target resource acquisition permission and whose permission attribute is a non-default shared state, and sort each of the second sound according to the integral value in descending order, and sort each second sound from the sorted A second sound is randomly selected as the target sound among the second sound;

S326:按照计算关系式

Figure GDA0002958052850000041
计算出请求方音响的第二指标值h',并所述判断所述h'是否满足h'≥H,若是,则进入S322,否则,进入S327;其中,α'+β'+γ'=1,α'、β'和γ'均为常数;S326: According to the calculation relationship
Figure GDA0002958052850000041
Calculate the second index value h' of the requester's sound, and determine whether the h' satisfies h'≥H, if so, go to S322, otherwise, go to S327; where α'+β'+γ'= 1, α', β' and γ' are all constants;

S327:确定出具有所述目标资源获取权限且权限属性为非默认共享状态的各个第二音响,按照积分值从大到小对各个所述第二音响进行排序,并从前预设数量个第二音响中随机选择一个音响作为目标音响。S327: Determine each second sound that has the target resource acquisition authority and whose authority attribute is a non-default sharing state, sort each of the second sound according to the integral value from large to small, and select a preset number of second sounds from the previous One of the sounds is randomly selected as the target sound.

可选的,所述依据所述目标音响的目标资源获取权限获取相应的目标资源的过程为:Optionally, the process of obtaining the corresponding target resource according to the target resource obtaining authority of the target audio is:

依据所述目标音响的目标资源获取权限获取所述目标音响的权限属性;Obtain the permission attribute of the target sound according to the target resource acquisition authority of the target sound;

当所述目标音响的权限属性为默认共享状态时,则直接获取所述目标资源;When the permission attribute of the target audio is the default shared state, the target resource is directly obtained;

当所述目标音响的权限属性为非默认共享状态时,则向所述目标音响发送询问请求,并依据所述目标音响返回的允许共享答复后获取所述目标资源。When the permission attribute of the target speaker is in a non-default sharing state, an inquiry request is sent to the target speaker, and the target resource is acquired according to the sharing permission reply returned by the target speaker.

本发明实施例相应的提供了一种资源共享装置,包括:The embodiment of the present invention correspondingly provides a resource sharing device, including:

接收模块,用于接收请求方音响发送的请求信息,所述请求信息包括目标资源信息和请求方音响信息;a receiving module, configured to receive the request information sent by the requester's audio, and the request information includes the target resource information and the requester's audio information;

第一判断模块,用于依据所述请求信息判断所述请求方音响是否具有目标资源的获取权限,若是,则获取所述目标资源,并触发建立模块;若否,则触发选择模块;a first judging module, configured to judge whether the requester audio has the acquisition authority of the target resource according to the request information, if so, acquire the target resource and trigger the establishment module; if not, trigger the selection module;

所述选择模块,用于从具有所述目标资源获取权限的各个音响中确定出目标音响;The selection module is used to determine the target sound from each sound with the acquisition authority of the target resource;

第一获取模块,用于依据所述目标音响的目标资源获取权限获取相应的目标资源;a first acquisition module, configured to acquire the corresponding target resource according to the target resource acquisition authority of the target audio;

所述建立模块,用于依据所述目标资源及所述请求方音响信息建立与所述目标资源对应的访问链接,并将所述访问链接返回至所述请求方音响,以便所述请求方音响依据所述访问链接访问所述目标资源。The establishment module is configured to establish an access link corresponding to the target resource according to the target resource and the requester audio information, and return the access link to the requester audio, so that the requestor audio The target resource is accessed according to the access link.

可选的,在所述接收模块和所述第一判断模块之间,所述装置还包括:Optionally, between the receiving module and the first judging module, the device further includes:

生成模块,用于依据所述请求信息生成请求事件,所述请求事件包括所述请求信息;a generating module, configured to generate a request event according to the request information, where the request event includes the request information;

确定模块,用于依据所述请求信息及预设排队机制确定出所述请求事件在请求队列中的添加位置;a determining module, configured to determine the addition position of the request event in the request queue according to the request information and the preset queuing mechanism;

添加模块,用于将所述请求事件按照所述添加位置添加至所述请求队列中;An adding module, configured to add the request event to the request queue according to the adding position;

第二获取模块,用于对所述请求队列中的所有请求事件进行轮询,并从所述请求队列中获取所述请求事件及所述请求信息。The second acquiring module is configured to poll all the request events in the request queue, and acquire the request events and the request information from the request queue.

本发明实施例提供了还一种资源共享设备,包括:An embodiment of the present invention provides yet another resource sharing device, including:

存储器,用于存储计算机程序;memory for storing computer programs;

处理器,用于执行所述计算机程序时实现如上述所述资源共享方法的步骤。The processor is configured to implement the steps of the above-mentioned resource sharing method when executing the computer program.

本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上述所述资源共享方法的步骤。An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the resource sharing method described above are implemented.

本发明实施例提供了一种资源共享方法、装置、设备及计算机可读存储介质,该方法包括:接收请求方音响发送的请求信息,请求信息包括目标资源信息和请求方音响信息;依据请求信息判断请求方音响是否具有目标资源的获取权限,若是,则获取目标资源;若否,则进入从具有目标资源获取权限的各个音响中确定出目标音响,并依据目标音响的目标资源获取权限获取相应的目标资源;依据目标资源及请求方音响信息建立与目标资源对应的访问链接,并将访问链接返回至请求方音响,以便请求方音响依据访问链接访问目标资源。Embodiments of the present invention provide a resource sharing method, apparatus, device, and computer-readable storage medium. The method includes: receiving request information sent by a requester's audio, where the request information includes target resource information and requester's audio information; according to the request information Determine whether the requester audio has the acquisition authority of the target resource, if so, acquire the target resource; if not, enter and determine the target audio from each audio with the target resource acquisition authorization, and obtain the corresponding target audio according to the target resource acquisition authorization of the target audio. the target resource; establish an access link corresponding to the target resource according to the target resource and the requester audio information, and return the access link to the requester audio, so that the requester audio can access the target resource according to the access link.

可见,本申请中在请求方音响需要访问某个没有访问权限的目标资源时,可以从具有该目标资源访问权限的各个音响中确定出一个目标音响,并依据该目标音响中的目标资源获取权限获取相应的目标资源,然后再根据目标资源和请求方音响信息建立关于目标资源的访问链接,使请求方音响通过该访问链接获取目标资源。本申请在使用过程中不仅能够保证共享方音响的账户和信息安全,还能够使请求方音响在登录自己账户的情况下访问到没有获取权限的资源,提高用户体验。It can be seen that, in the present application, when the requester speaker needs to access a certain target resource without access rights, a target speaker can be determined from each speaker with access rights to the target resource, and the authorization can be obtained according to the target resource in the target speaker. Obtain the corresponding target resource, and then establish an access link about the target resource according to the target resource and the requester's audio information, so that the requester's audio can obtain the target resource through the access link. This application can not only ensure the security of the account and information of the sharer's audio during use, but also enable the requester's audio to access resources without access rights when logging in to its own account, thereby improving user experience.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对现有技术和实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the prior art and the accompanying drawings required in the embodiments. Obviously, the drawings in the following description are only some of the present invention. In the embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.

图1为本发明实施例提供的一种资源共享方法的流程示意图;FIG. 1 is a schematic flowchart of a resource sharing method according to an embodiment of the present invention;

图2为本发明实施例提供的一种请求事件的添加方式示意图;2 is a schematic diagram of a method for adding a request event according to an embodiment of the present invention;

图3为本发明实施例提供的一种资源共享装置的结构示意图;3 is a schematic structural diagram of a resource sharing apparatus according to an embodiment of the present invention;

图4为本发明实施例提供的一种资源共享设备的结构示意图。FIG. 4 is a schematic structural diagram of a resource sharing device according to an embodiment of the present invention.

具体实施方式Detailed ways

本发明实施例提供了一种资源共享方法、装置、设备及计算机可读存储介质,在使用过程中不仅能够保证共享方音响的账户和信息安全,还能够使请求方音响在登录自己账户的情况下访问到没有获取权限的资源,提高用户体验。Embodiments of the present invention provide a resource sharing method, apparatus, device and computer-readable storage medium, which can not only ensure the security of the account and information of the sharing party during use, but also enable the requesting party to log in to its own account Access to resources without permission to improve user experience.

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

请参照图1,图1为本发明实施例提供的一种资源共享方法的流程示意图。Please refer to FIG. 1 , which is a schematic flowchart of a resource sharing method according to an embodiment of the present invention.

该资源共享方法包括:The resource sharing method includes:

S11:接收请求方音响发送的请求信息,请求信息包括目标资源信息和请求方音响信息;S11: Receive the request information sent by the requester's audio, and the request information includes the target resource information and the requester's audio information;

具体的,在请求方音响需要获取某个目标资源(音频文件等)时,会向服务端发送请求信息,具体可以在用户的操作下发送请求信息,该信息具体为请求目标资源的请求信息,其中,目标资源信息可以包括目标资源标识码,请求方音响信息可以包括请求方音响的标识码。Specifically, when the requester audio needs to obtain a certain target resource (audio file, etc.), it will send request information to the server. Specifically, the request information can be sent under the operation of the user. The information is specifically the request information for requesting the target resource. Wherein, the target resource information may include a target resource identification code, and the requester audio information may include an identification code of the requester audio.

S12:依据请求信息判断请求方音响是否具有目标资源的获取权限,若是,则获取目标资源,并进入S15;若否,则进入S13;S12: According to the request information, determine whether the requester audio has the acquisition authority of the target resource, if so, acquire the target resource, and go to S15; if not, go to S13;

在接收到请求方音响发送的请求信息后,会根据该请求信息中的请求方音响信息,具体可以根据请求方音响的标识码对请求方音响进行识别判断,判断该请求方音响是否具有目标资源的获取权限,当请求方音响具有该目标资源的获取权限时,则可以直接获取目标资源,并进入S15。After receiving the request information sent by the requester audio, it will identify and judge the requester audio according to the requester audio information in the request information, specifically according to the identification code of the requester audio, to determine whether the requester audio has the target resource When the requester has the acquisition authority of the target resource, it can directly acquire the target resource, and go to S15.

当请求方音响不具有目标资源的获取权限时,则进入S13,说明该请求方音响需要访问没有获取权限的资源,此时需要找到一个具有目标资源获取权限的目标音响来对请求方音响共享目标资源获取权限。When the requester speaker does not have the acquisition authority of the target resource, it goes to S13, indicating that the requester speaker needs to access the resource without the acquisition authorization, and at this time, it is necessary to find a target speaker with the target resource acquisition authority to share the target with the requester speaker Access to resources.

S13:从具有目标资源获取权限的各个音响中确定出目标音响;S13: Determine the target sound from each sound with the target resource acquisition authority;

具体的,当请求方音响不具有目标资源的获取权限时,则需要从其他的各个音响中筛选出具有目标资源获取权限的各个音响,并从这些音响中确定出目标音响,具体可以按照预设规则确定出目标音响。Specifically, when the requesting speaker does not have the acquisition authority of the target resource, it is necessary to filter out the audios with the acquisition authorization of the target resource from other audios, and determine the target audio from these audios. The rules determine the target sound.

S14:依据目标音响的目标资源获取权限获取相应的目标资源;S14: Acquire the corresponding target resource according to the target resource acquisition authority of the target audio;

S15:依据目标资源及请求方音响信息建立与目标资源对应的访问链接,并将访问链接返回至请求方音响,以便请求方音响依据访问链接访问目标资源。S15: Establish an access link corresponding to the target resource according to the target resource and the requester audio information, and return the access link to the requester audio, so that the requester audio can access the target resource according to the access link.

具体的,在获取目标资源后可以根据该目标资源和请求方音响信息建立与该目标资源对应的访问链接,并将该访问链接返回至请求方音响,请求方音响可以根据该访问链接对目标资源进行访问,其中,根据目标资源和请求方音响信息建立相应的访问链接的目的是为了使指定音响能够通过该访问链接对目标资源进行访问,也即只有与访问链接中的请求方音响信息匹配的音响才能够通过该访问链接访问目标资源,其他的音响设备不能够对该访问链接进行访问。Specifically, after acquiring the target resource, an access link corresponding to the target resource can be established according to the target resource and the requester's audio information, and the access link is returned to the requester's audio, and the requester's audio can access the target resource according to the access link. The purpose of establishing a corresponding access link according to the target resource and the requester's audio information is to enable the specified audio to access the target resource through the access link, that is, only the requestor's audio information in the access link matches. Only the audio device can access the target resource through the access link, and other audio devices cannot access the access link.

还需要说明的是,请求方音响和目标音响均为智能音响,其中,智能音响包括麦克风阵列、扬声器、主控板和蓝牙/WiFi模块等,麦克风阵列是由一定数目的麦克风组成的,用来对声场的空间特性进行采样并处理,负责获取语音信号,并交给服务端进行语音识别;扬声器用于播放对于用户的回复信息,主控板包括主板、CPU、存储器等,智能音响需要服务端分布提供大部分服务功能,因此,WiFi模块是不可缺少的模块,部分音响会通过蓝牙同手机进行通信。It should also be noted that both the requester audio and the target audio are smart audios. The smart audio includes a microphone array, a speaker, a main control board, and a Bluetooth/WiFi module. The microphone array is composed of a certain number of microphones. Sampling and processing the spatial characteristics of the sound field, responsible for obtaining the voice signal, and handing it over to the server for voice recognition; the speaker is used to play the reply information to the user, the main control board includes the motherboard, CPU, memory, etc., and the smart audio requires the server The distribution provides most of the service functions. Therefore, the WiFi module is an indispensable module, and some speakers will communicate with the mobile phone through Bluetooth.

进一步的,在步骤S11接收请求方音响发送的请求信息之后,在步骤S12依据请求信息判断请求方音响是否具有目标资源的获取权限之前,该方法还可以包括:Further, after receiving the request information sent by the requester audio in step S11, and before determining whether the requester audio has the acquisition authority of the target resource according to the request information in step S12, the method may further include:

依据请求信息生成请求事件,请求事件包括请求信息;Generate a request event according to the request information, and the request event includes the request information;

依据请求信息及预设排队机制确定出请求事件在请求队列中的添加位置;Determine the addition position of the request event in the request queue according to the request information and the preset queuing mechanism;

将请求事件按照添加位置添加至请求队列中;Add the request event to the request queue according to the added position;

对请求队列中的所有请求事件进行轮询,并从请求队列中获取请求事件及请求信息。Polls all request events in the request queue, and obtains request events and request information from the request queue.

需要说明的是,由于在接收到请求信息后至建立与目标资源对应的访问链接,并将该访问链接返回至请求方音响的过程需要一定的处理时间,并且在处理过程中可能还会接收到其他的请求方音响发送的请求信息,此时可以将与每个请求信息对应的请求事件添加至请求队列的相应位置处,并且服务端会对请求队列各个位置处的请求事件进行轮询处理,当需要对当前的请求事件进行处理时,则从请求队列中获取请求事件及与该请求事件对应的请求信息。It should be noted that after receiving the request information, it takes a certain amount of processing time to establish an access link corresponding to the target resource and return the access link to the requester's audio, and during the processing, it may also receive For the request information sent by other requesters, the request event corresponding to each request information can be added to the corresponding position of the request queue, and the server will poll the request events at each position of the request queue. When the current request event needs to be processed, the request event and the request information corresponding to the request event are obtained from the request queue.

例如,本申请中依据请求方音响发送的请求信息生成的请求事件为请求事件K,该请求事件K包括的请求信息可以为请求方音响信息、目标资源信息及请求事件K发起的时间信息,根据请求事件K的请求信息及预设排队机制计算出该请求事件K在请求队列中的添加位置后,将该请求事件K添加至请求队列中,具体请参照图2。For example, in this application, the request event generated according to the request information sent by the requester's sound is the request event K, and the request information included in the request event K may be the requester's sound information, target resource information and time information initiated by the request event K. According to After the request information of the request event K and the preset queuing mechanism calculate the addition position of the request event K in the request queue, the request event K is added to the request queue. For details, please refer to FIG. 2 .

更进一步的,上述依据请求信息及预设排队机制确定出请求事件在请求队列中的添加位置的过程,具体可以为:Further, the above-mentioned process of determining the addition position of the request event in the request queue according to the request information and the preset queuing mechanism may specifically be:

S21:依据请求信息获取请求方音响的参数信息,请求方音响的参数信息包括增益值、第一指标值、资源共享量、共享比例和积分值;S21: Acquire parameter information of the requester's audio according to the request information, and the parameter information of the requester's audio includes a gain value, a first index value, a resource sharing amount, a sharing ratio and an integral value;

S22:依据请求方音响的参数信息及添加位置计算关系式确定请求事件在请求队列中的添加位置;S22: Determine the addition position of the request event in the request queue according to the parameter information of the requester's sound and the addition position calculation relationship;

添加位置计算关系式为:

Figure GDA0002958052850000091
和l=max{l',0};其中,
Figure GDA0002958052850000092
α+β+γ=1,上述公式中的“其他”表示
Figure GDA0002958052850000093
的情况;其中:The added position calculation relationship is:
Figure GDA0002958052850000091
and l=max{l',0}; where,
Figure GDA0002958052850000092
α+β+γ=1, "other" in the above formula means
Figure GDA0002958052850000093
situation; where:

l为请求事件的添加位置,L为请求队列的长度,a为请求方音响的增益值,h为请求方音响第一指标值,H为音响指标值阈值;m为请求方音响的资源共享量,p为请求方音响的共享比例,s为请求方音响的积分值,M为音响共享量阈值,P为音响共享比例阈值,S为音响积分值阈值,α、β和γ为常数。l is the addition position of the request event, L is the length of the request queue, a is the gain value of the requester audio, h is the first indicator value of the requester audio, H is the audio indicator value threshold; m is the resource sharing amount of the requester audio , p is the share ratio of the requester sound, s is the integral value of the requester sound, M is the sound sharing threshold, P is the sound sharing ratio threshold, S is the sound integral value threshold, α, β and γ are constants.

本申请中在确定请求事件的添加位置时,考虑到请求方音响的增益值、第一指标值、资源共享量、共享比例、积分值等因素,使从而综合考虑相应的请求事件在请求队列中的添加位置,添加位置的不同决定了是否对该请求事件进行优先处理,例如对于添加位置靠前的请求事件在处理过程中将会被优先处理。In this application, when determining the addition position of the request event, the gain value of the requester's sound, the first indicator value, the resource sharing amount, the sharing ratio, the integral value and other factors are considered, so that the corresponding request event is comprehensively considered in the request queue. The addition position of , and the difference of the addition position determines whether the request event is processed preferentially. For example, the request event with the first addition position will be preferentially processed in the processing process.

其中,根据添加位置计算关系式计算得到的l即为在长度为L的请求队列中的添加位置,根据该添加位置可以将相应的请求事件添加至请求队列中。Wherein, l calculated according to the addition position calculation relationship is the addition position in the request queue of length L, and the corresponding request event can be added to the request queue according to the addition position.

可见,本申请中在请求方音响需要访问某个没有访问权限的目标资源时,可以从具有该目标资源访问权限的各个音响中确定出一个目标音响,并依据该目标音响中的目标资源获取权限获取相应的目标资源,然后再根据目标资源和请求方音响信息建立关于目标资源的访问链接,使请求方音响通过该访问链接获取目标资源。本申请在使用过程中不仅能够保证共享方音响的账户和信息安全,还能够使请求方音响在登录自己账户的情况下访问到没有获取权限的资源,提高用户体验。It can be seen that, in the present application, when the requester speaker needs to access a certain target resource without access rights, a target speaker can be determined from each speaker with access rights to the target resource, and the authorization can be obtained according to the target resource in the target speaker. Obtain the corresponding target resource, and then establish an access link about the target resource according to the target resource and the requester's audio information, so that the requester's audio can obtain the target resource through the access link. This application can not only ensure the security of the account and information of the sharer's audio during use, but also enable the requester's audio to access resources without access rights when logging in to its own account, thereby improving user experience.

在上述实施例的基础上,本实施例对技术方案作了进一步的说明和优化,具体如下:On the basis of the above-mentioned embodiment, the present embodiment further illustrates and optimizes the technical solution, as follows:

进一步的,上述步骤S13中的从具有目标资源获取权限的各个音响中确定出目标音响的过程,具体可以为:Further, the process of determining the target sound from each sound with the target resource acquisition authority in the above step S13 may be specifically:

S31:获取请求事件的参数信息;S31: Obtain parameter information of the request event;

S32:当请求事件的参数信息满足预设条件时,确定出具有目标资源获取权限的各个音响,并按照预设规则从具有目标资源获取权限的各个音响中确定出目标音响。S32: When the parameter information of the request event satisfies the preset condition, determine each sound with the target resource acquisition authority, and determine the target sound from each sound with the target resource acquisition authority according to the preset rule.

需要说明的是,在进行目标音响选择时,需要判断请求事件的参数信息是否满足预设条件,当该请求事件的参数信息满足预设条件时,才会执行后续流程。例如,对于处理时间较长的请求事件或处理次数较多的请求事件,或者音响的指标值较大、往常贡献较大的音响则将直接为其寻找合适的目标音响。It should be noted that when selecting the target sound, it is necessary to judge whether the parameter information of the request event satisfies the preset condition, and the subsequent process will be executed only when the parameter information of the request event satisfies the preset condition. For example, for a request event with a long processing time or a request event with a large number of processing times, or a sound with a large index value of the sound and a sound that usually contributes more, it will directly find a suitable target sound for it.

更进一步的,本申请中的请求事件的参数信息可以包括事件处理周期t、事件修改次数n、请求方音响的积分值s、事件处理周期T、事件修改次数阈值N及事件修改次数最大上限值W;Further, the parameter information of the request event in the present application may include the event processing period t, the number of modification events n, the integral value s of the requester's sound, the event processing period T, the threshold value N for the modification times of the event, and the maximum upper limit for the modification times of the event. value W;

则,上述步骤S32中当请求事件的参数信息满足预设条件时,确定出具有目标资源获取权限的各个音响,并按照预设规则从具有目标资源获取权限的各个音响中确定出目标音响的过程,具体可以为:Then, in the above-mentioned step S32, when the parameter information of the request event satisfies the preset conditions, each sound with the target resource acquisition authority is determined, and the process of determining the target sound from each sound with the target resource acquisition authority according to the preset rule , which can be specifically:

S321:当n<W时,判断t和n是否满足t≥T或n≥N,若是,则进入S322;若否,则进入S326;S321: When n<W, judge whether t and n satisfy t≥T or n≥N, if yes, go to S322; if not, go to S326;

需要说明的是,当n>W时,视为共享操作失败,则将请求事件修改次数在当前数值的基础上加1,只有在事件修改次数n小于事件修改次数最大上限值W时,才进入后续流程。It should be noted that when n>W, it is considered that the sharing operation fails, and the requested event modification times are added 1 to the current value. Enter the follow-up process.

S322:判断是否存在具有目标资源获取权限且权限属性为默认共享状态的第一音响,若是,则进入S323;否则,进入S324;S322: Determine whether there is a first sound with the target resource acquisition authority and the authority attribute is the default shared state, if so, enter S323; otherwise, enter S324;

S323:确定出具有目标资源获取权限且权限属性为默认共享状态的各个第一音响,并随机从各个第一音响中选择一个第一音响作为目标音响;S323: Determine each first sound that has the target resource acquisition permission and the permission attribute is the default shared state, and randomly select a first sound from each first sound as the target sound;

为了加快处理流程,快速找到能够共享目标资源获取权限的目标音响,则可以优选的选择具有目标资源获取权限且权限属性为默认共享状态第一音响为目标音响,在目标音响的权限属性为默认共享状态时,则视为该目标音响默认同意共享该目标资源获取权限,无需再次询问该目标音响即可直接获取相应的目标资源获取权限。In order to speed up the processing process and quickly find the target speaker that can share the acquisition permission of the target resource, you can preferably select the first speaker that has the acquisition permission of the target resource and the permission attribute is the default sharing state as the target speaker, and the permission attribute of the target speaker is the default sharing. In the state, it is considered that the target speaker agrees to share the acquisition permission of the target resource by default, and the corresponding target resource acquisition permission can be directly obtained without asking the target speaker again.

S324:判断是否存在具有目标资源获取权限且权限属性为非默认共享状态,若是,则进入S325;S324: Determine whether there is a target resource acquisition permission and the permission attribute is a non-default shared state, and if so, enter S325;

当不存在具有目标资源获取权限且权限属性为默认共享状态的第一音响时,则再寻找是否存在具有目标资源获取权限且权限属性为非默认共享状态的第二音响。When there is no first speaker with the permission to acquire the target resource and the permission attribute is the default sharing state, then find out whether there is a second speaker with the permission to acquire the target resource and the permission attribute is the non-default sharing state.

S325:确定出具有目标资源获取权限且权限属性为非默认共享状态的各个第二音响,并按照积分值从大到小对各个第二音响进行排序,并从排序后的各个第二音响中随机选择一个第二音响作为目标音响;S325: Determine each second speaker that has the target resource acquisition permission and whose permission attribute is a non-default shared state, sort each second speaker according to the integral value from largest to smallest, and randomly select each second speaker from the sorted second speaker Select a second sound as the target sound;

若存在具有目标资源获取权限且权限属性为非默认共享状态的第二音响,并且确定出各个第二音响后,可以按照各个第二音响各自的积分值对第二音响进行排序,具体可以采用从大到小进行排序,并且在排序后从排序序列的第二个起截取第一预设数量个第二音响,并从所截取的各个第一音响中随机选择一个第二音响作为目标音响,具体可以从[0,min{L1,l1}]中随机选择一个第二音响作为目标音响,其中,L1为具有目标资源获取权限且权限属性为非默认共享状态的第二音响的数量,l1为第一预设数量。If there is a second speaker with the target resource acquisition permission and the permission attribute is a non-default shared state, and after each second speaker is determined, the second speaker can be sorted according to the respective integral value of each second speaker. Specifically, the following can be used: Sort from big to small, and after sorting, intercept the first preset number of second sounds from the second one in the sorting sequence, and randomly select a second sound from the intercepted first sounds as the target sound, specifically A second speaker can be randomly selected from [0,min{L 1 ,l 1 }] as the target sound, where L 1 is the number of second speakers that have the target resource acquisition permission and whose permission attribute is a non-default shared state, l 1 is the first preset number.

S326:按照计算关系式

Figure GDA0002958052850000111
计算出请求方音响的第二指标值h',并判断h'是否满足h'≥H,若是,则进入S322,否则,进入S327;其中,α'+β'+γ'=1,α'、β'和γ'均为常数,H为音响指标值阈值;S326: According to the calculation relationship
Figure GDA0002958052850000111
Calculate the second index value h' of the requesting party's sound, and judge whether h' satisfies h'≥H, if so, go to S322, otherwise, go to S327; wherein, α'+β'+γ'=1, α' , β' and γ' are all constants, H is the threshold of the sound index value;

S327:确定出具有目标资源获取权限且权限属性为非默认共享状态的各个第二音响,按照积分值从大到小对各个第二音响进行排序,并从前预设数量个第二音响中随机选择一个音响作为目标音响。S327: Determine each second speaker that has the target resource acquisition permission and whose permission attribute is a non-default sharing state, sort each second speaker according to the integral value from large to small, and randomly select from the first preset number of second speakers A sound is used as the target sound.

具体的,在确定出具有目标资源获取权限且权限属性为非默认共享状态的各个第二音响后,按照与各个第二音响分别对应的积分值对各个第二音响进行排序,具体可以按照积分值的大小从大至小对各个第二音响进行排序,并且在排序后从第一个第二音响开始截取第二预设数量个第二音响,并从该第二预设数量个第二音响中随机选取一个第二音响作为目标音响。Specifically, after determining each second speaker that has the target resource acquisition authority and the permission attribute is a non-default sharing state, the second sound is sorted according to the integral value corresponding to each second audio, specifically, according to the integral value Sort each second sound in descending order of size, and after sorting, intercept a second preset number of second sounds starting from the first second sound, and select from the second preset number of second sounds. A second sound is randomly selected as the target sound.

例如,可以从

Figure GDA0002958052850000121
中随机选择一个第二音响作为目标音响,其中,L1为具有目标资源获取权限且权限属性为非默认共享状态的第二音响的数量。For example, from
Figure GDA0002958052850000121
A second speaker is randomly selected as the target speaker in , where L 1 is the number of second speakers that have the target resource acquisition permission and whose permission attribute is a non-default sharing state.

另外,如果其他的所以音响中不存在具有目标资源获取权限的音响,则结束,并向请求方音响返回共享失败的提示信息,还可以返回共享失败的原因。In addition, if there is no sound with the target resource acquisition authority among the other sound, it will end, and return to the requester sound a message that the sharing fails, and may also return the reason for the sharing failure.

更进一步的,依据目标音响的目标资源获取权限获取相应的目标资源的过程为:Further, the process of acquiring the corresponding target resource according to the target resource acquisition authority of the target audio is as follows:

依据目标音响的目标资源获取权限获取目标音响的权限属性;Obtain the permission attribute of the target audio according to the target resource acquisition permission of the target audio;

当目标音响的权限属性为默认共享状态时,则直接获取目标资源;When the permission attribute of the target audio is the default shared state, the target resource is directly obtained;

需要说明的是,对于权限属性为默认共享状态的目标音响,则说明无需在询问该目标音响既可默认为允许共享资源获取权限,此时可以直接获取目标资源,并根据该目标资源及请求方音响信息建立与目标资源对应的访问链接,并将访问链接返回至请求方音响,以便请求方音响依据访问链接访问目标资源。It should be noted that, for the target audio whose permission attribute is the default shared state, it means that the target audio can be allowed to obtain the permission of the shared resource by default without asking the target audio. The audio information establishes an access link corresponding to the target resource, and returns the access link to the requester speaker, so that the requester speaker accesses the target resource according to the access link.

当目标音响的权限属性为非默认共享状态时,则向目标音响发送询问请求,并依据目标音响返回的允许共享答复后获取目标资源。When the permission attribute of the target speaker is in a non-default sharing state, a query request is sent to the target speaker, and the target resource is acquired according to the permission to share reply returned by the target speaker.

可以理解的是,对于权限属性为非默认共享状态的目标音响,则需要向该目标音响发送询问请求,该询问请求中可以包括请求方音响信息、目标资源信息等信息,该目标音响在接收到询问请求后可以根据询问请求中国的请求方音响信息和目标资源信息确定是否允许共享该目标资源的获取权限,并且向服务端返回答复信息,服务端只有在接收到目标音响返回的允许共享答复后才能够获取目标资源。如果服务端接收到目标音响返回的不允许共享答复,则共享失败,并且可以再次从其他各个第二音响中选择一个第二音响作为目标音响,并发起相应的询问请求,直至接收到允许共享答复后,获取目标资源,并依据该目标资源及请求方音响信息建立与目标资源对应的访问链接,并将访问链接返回至请求方音响,以便请求方音响依据访问链接访问目标资源。It can be understood that, for a target speaker whose permission attribute is non-default shared state, an inquiry request needs to be sent to the target speaker, and the inquiry request may include information such as the requester audio information, target resource information, etc. After the inquiry request, it can be determined whether to allow the sharing of the access rights of the target resource according to the requester's audio information and target resource information in the inquiry request China, and return the reply information to the server. to obtain the target resource. If the server receives a share not allowed reply returned by the target speaker, the sharing fails, and can select a second speaker from the other second speakers as the target speaker again, and initiate a corresponding query request until the share permission reply is received. Then, acquire the target resource, establish an access link corresponding to the target resource according to the target resource and the requester audio information, and return the access link to the requester audio, so that the requester audio can access the target resource according to the access link.

还需要说明的是,在服务端在向目标音响发送询问请求时,还可以同时生成等待回复事件,并将该等待回复事件添加至等待回复队列中,此时该询问请求还可以包括等待回复事件的标识码等信息,等待回复事件应包括请求方音响信息、目标音响信息、目标资源信息、相应的请求事件发起时间以及等待回复事件的修改次数等信息。It should also be noted that when the server sends an inquiry request to the target speaker, it can also generate a waiting-reply event at the same time, and add the waiting-replying event to the waiting-replying queue. At this time, the inquiry request can also include a waiting-replying event. The waiting-reply event should include information such as the requester's audio information, target audio information, target resource information, the corresponding request event initiation time, and the modification times of the waiting-reply event.

目标音响在接收到询问请求后,确定是否向请求方音响共享目标资源的获取权限,并向服务端回复答复信息,该答复信息中应包括等待回复事件的标识码等信息。服务端在接收到目标音响返回的允许共享权限的答复后,依据答复信息中的等待回复事件的标识码从等待回复队列中获取出等待回复事件,并依据目标资源获取权限获取目标资源,并在目标音响的共享目录下创建目标资源的访问链接,将该访问链接返回至请求方音响,还可以对目标音响的积分情况进行修改,在对目标音响的积分情况进行修改是可以根据第一积分修改规则进行修改,其中,第一积分修改规则如下:After receiving the inquiry request, the target speaker determines whether to share the acquisition authority of the target resource with the requester speaker, and replies to the server with reply information, which should include information such as the identification code of the event waiting for a reply. After receiving the reply of permission sharing permission returned by the target speaker, the server obtains the waiting-reply event from the waiting-reply queue according to the identification code of the waiting-reply event in the reply information, and obtains the target resource according to the target resource's access permission, and in the Create an access link of the target resource in the shared directory of the target audio, return the access link to the requester audio, and modify the score of the target audio. When modifying the score of the target audio, it can be modified according to the first score The rules are modified, among which, the first point modification rules are as follows:

Figure GDA0002958052850000131
其中,s为音响的积分值,t'为事件回复周期,T'为事件回复周期阈值,a为增益值。
Figure GDA0002958052850000131
Among them, s is the integral value of the sound, t' is the event recovery period, T' is the event recovery period threshold, and a is the gain value.

若服务端收到不允许共享资源获取权限的答复或者目标音响未在限定时间内进行回复,则认为目标音响不允许共享目标资源的获取权限,则此时也可以对目标音响的积分值进行修改,具体可以根据第二积分修改规则对目标音响的积分进行修改。服务端需要重新选择目标音响并发起询问请求,并修改等待回复事件中的目标音响信息和等待回复事件的修改的次数,其中目标音响依然按照上述方法选择出来。If the server receives a reply that does not allow access to the shared resource or the target speaker does not reply within the time limit, it is considered that the target speaker does not allow the access to the shared target resource, and the target speaker's integral value can also be modified at this time. , specifically, the integral of the target sound can be modified according to the second integral modification rule. The server needs to re-select the target sound and initiate an inquiry request, and modify the target sound information in the waiting-reply event and the modification times of the waiting-reply event, wherein the target sound is still selected according to the above method.

其中,第二积分修改规则如下:Among them, the second point modification rules are as follows:

s=max{s-b,S},其中,b为损失值,S为音响积分值阈值,s为音响的积分值。s=max{s-b, S}, where b is the loss value, S is the sound integration value threshold, and s is the sound integration value.

另外,还需要说明的是,各个音响还可以对等待回复队列中的各个等待回复事件进行查看,并且当查询到包括目标资源信息的等待回复事件、且自身具有目标资源获取权限时,可以主动向服务端发送允许获取权限的反馈信息。另外,目标音响在对请求方音响共享目标资源的获取权限后,还可以通过查看自身的共享目录,随时向服务端发送取消对请求方音响共享目标资源获取权限的通知,以结束共享。In addition, it should be noted that each speaker can also view each waiting-replying event in the waiting-replying queue, and when the waiting-replying event including the target resource information is queried, and it has the target resource acquisition authority, it can take the initiative to The server sends feedback information that allows permission to be obtained. In addition, after the target speaker has obtained the permission to share the target resource of the requester speaker, it can also view its own shared directory and send a notification to the server to cancel the acquisition permission of the requester speaker to share the target resource to end sharing.

本申请不仅能够确保目标音响的账户、密码等信息的安全,避免共享资源获取权限的过程对目标音响(共享方)造成危害,同时对请求方音响屏蔽了共享方的存在,使共享方信息更加私密。另外,还能够使请求方音响在登录当前账户的情况下获取到没有获取权限的资源,大大提升了用户体验。This application can not only ensure the security of the target audio's account, password and other information, but also avoid the harm to the target audio (the sharing party) caused by the process of obtaining permission for shared resources, and at the same time shield the requesting party's audio from the existence of the sharing party, making the sharing party's information more private. In addition, it is also possible to enable the requester's audio to obtain resources without access rights under the condition of logging in to the current account, which greatly improves the user experience.

相应的本发明实施例还公开了一种资源共享装置,具体请参照图2。在上述实施例的基础上:A corresponding embodiment of the present invention also discloses a resource sharing apparatus, for details, please refer to FIG. 2 . On the basis of the above-mentioned embodiment:

该资源共享装置包括:The resource sharing device includes:

接收模块11,用于接收请求方音响发送的请求信息,请求信息包括目标资源信息和请求方音响信息;The receiving module 11 is used for receiving the request information sent by the requester's audio, and the request information includes the target resource information and the requester's audio information;

第一判断模块12,用于依据请求信息判断请求方音响是否具有目标资源的获取权限,若是,则获取目标资源,并触发建立模块15;若否,则触发选择模块13;The first judging module 12 is used for judging whether the requester audio has the acquisition authority of the target resource according to the request information, if so, the target resource is acquired, and the establishment module 15 is triggered; if not, the selection module 13 is triggered;

选择模块13,用于从具有目标资源获取权限的各个音响中确定出目标音响;The selection module 13 is used to determine the target sound from each sound with the target resource acquisition authority;

第一获取模块14,用于依据目标音响的目标资源获取权限获取相应的目标资源;The first acquisition module 14 is used to acquire the corresponding target resource according to the target resource acquisition authority of the target audio;

建立模块15,用于依据目标资源及请求方音响信息建立与目标资源对应的访问链接,并将访问链接返回至请求方音响,以便请求方音响依据访问链接访问目标资源。The establishment module 15 is configured to establish an access link corresponding to the target resource according to the target resource and the requester audio information, and return the access link to the requester audio, so that the requester audio can access the target resource according to the access link.

可选的,在接收模块11和第一判断模块12之间,该装置还包括:Optionally, between the receiving module 11 and the first judging module 12, the device further includes:

生成模块,用于依据请求信息生成请求事件,请求事件包括请求信息;The generating module is used to generate a request event according to the request information, and the request event includes the request information;

确定模块,用于依据请求信息及预设排队机制确定出请求事件在请求队列中的添加位置;a determining module, used for determining the adding position of the request event in the request queue according to the request information and the preset queuing mechanism;

添加模块,用于将请求事件按照添加位置添加至请求队列中;Add a module for adding request events to the request queue according to the addition position;

第二获取模块,用于对请求队列中的所有请求事件进行轮询,并从请求队列中获取请求事件及请求信息。The second acquiring module is used for polling all request events in the request queue, and acquiring request events and request information from the request queue.

在上述实施例的基础上,本发明实施例提供了还一种资源共享设备,包括:On the basis of the above embodiments, the embodiments of the present invention provide another resource sharing device, including:

存储器21,用于存储计算机程序;memory 21 for storing computer programs;

处理器22,用于执行计算机程序时实现如上述资源共享方法的步骤。The processor 22 is configured to implement the steps of the above resource sharing method when executing the computer program.

在上述实施例的基础上,本发明实施例还提供了一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上述资源共享方法的步骤。On the basis of the foregoing embodiments, embodiments of the present invention further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the foregoing resource sharing method are implemented.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method.

还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities or operations. There is no such actual relationship or sequence between operations. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其他实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A method for resource sharing, comprising:
s11: receiving request information sent by a requesting party sound, wherein the request information comprises target resource information and requesting party sound information;
s12: judging whether the sound of the requesting party has the acquisition authority of the target resource or not according to the request information, if so, acquiring the target resource, and entering S15; if not, go to S13;
after receiving request information sent by a requesting party sound, before judging whether the requesting party sound has the acquisition authority of a target resource according to the request information, generating a request event according to the request information, wherein the request event comprises the request information; acquiring parameter information of the requesting party sound according to the request information, wherein the parameter information of the requesting party sound comprises a gain value, a first index value, a resource sharing amount, a sharing proportion and an integral value; determining the adding position of the request event in a request queue according to the parameter information of the sound of the requesting party and the adding position calculation relational expression;
s13: determining a target sound from all sounds with the target resource acquisition authority; the process of determining the target sound from the sounds with the target resource acquisition authority comprises the following steps: acquiring parameter information of the request event, wherein the parameter information comprises an event processing period T, an event modification frequency N, an integral value s of a sound of a requesting party, the event processing period T, an event modification frequency threshold N and an event modification frequency maximum upper limit value W; s321: when N is less than W, judging whether T and N meet T is more than or equal to T or N is more than or equal to N, if yes, entering S322; if not, go to S326; s322: judging whether a first sound device with the target resource acquisition authority and the authority attribute in a default sharing state exists, if so, entering S323; otherwise, go to S324; s323: determining each first sound device with the target resource acquisition permission and the permission attribute in a default sharing state, and randomly selecting one first sound device from the first sound devices as a target sound device; s324: judging whether the target resource acquisition permission exists or not and the permission attribute is in a non-default sharing state, if so, entering S325; s325: determining each second sound device which has the target resource acquisition authority and the authority attribute of which is in the non-default sharing state, sequencing the second sound devices according to the integral value from large to small, and randomly selecting one second sound device from the sequenced second sound devices as a targetMarking sound equipment; s326: according to the calculation relation
Figure FDA0003096829650000011
Calculating a second index value H ' of the sound of the requesting party, and judging whether H ' meets the condition that H ' is more than or equal to H, wherein H is a sound index value threshold, if so, entering S322, and if not, entering S327; wherein α '+ β' + γ '═ 1, α', β ', and γ' are all constants; s327: determining each second sound device which has the target resource acquisition authority and the authority attribute of which is in a non-default sharing state, sequencing the second sound devices according to the integral value from large to small, and randomly selecting one sound device from a preset number of second sound devices as a target sound device;
s14: acquiring corresponding target resources according to the target resource acquisition authority of the target sound equipment;
s15: and establishing an access link corresponding to the target resource according to the target resource and the information of the requesting party sound equipment, and returning the access link to the requesting party sound equipment so that the requesting party sound equipment can access the target resource according to the access link.
2. The resource sharing method according to claim 1, wherein after receiving request information sent by the requesting party, before said determining whether the requesting party has the right to acquire the target resource according to the request information, the method further comprises:
adding the request event to the request queue according to the adding position;
polling all request events in the request queue, and acquiring the request events and the request information from the request queue.
3. The resource sharing method according to claim 1,
the adding position calculation relational expression is as follows:
Figure FDA0003096829650000021
and l ═ max { l',0 }; wherein,
Figure FDA0003096829650000022
α + β + γ ═ 1; wherein:
l is the adding position of the request event, L is the length of a request queue, a is the gain value of the request party sound, H is the first index value of the request party sound, and H is the sound index value threshold; m is the resource sharing amount of the requesting party ' S stereo, P is the sharing ratio of the requesting party ' S stereo, S is the integral value of the requesting party ' S stereo, M is the stereo sharing amount threshold, P is the stereo sharing ratio threshold, S is the stereo integral value threshold, and α, β, and γ are constants.
4. The resource sharing method according to claim 1, wherein the process of acquiring the corresponding target resource according to the target resource acquisition authority of the target sound device comprises:
acquiring authority attribute of the target sound according to the target resource acquisition authority of the target sound;
when the authority attribute of the target sound equipment is in a default sharing state, directly acquiring the target resource;
and when the authority attribute of the target sound is in a non-default sharing state, sending an inquiry request to the target sound, and acquiring the target resource according to an allowed sharing reply returned by the target sound.
5. A resource sharing apparatus, comprising:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving request information sent by a sound of a requesting party, and the request information comprises target resource information and sound information of the requesting party;
the first judgment module is used for judging whether the sound of the requester has the acquisition authority of the target resource or not according to the request information, if so, the target resource is acquired, and the establishment module is triggered; if not, triggering a selection module;
between the receiving module and the first judging module, the apparatus includes: a generating module, configured to generate a request event according to the request information, where the request event includes the request information; acquiring parameter information of the requesting party sound according to the request information, wherein the parameter information of the requesting party sound comprises a gain value, a first index value, a resource sharing amount, a sharing proportion and an integral value; the determining module is used for determining the adding position of the request event in the request queue according to the request information and a preset queuing mechanism;
the selection module is used for determining a target sound from all sounds with the target resource acquisition permission; the process of determining the target sound from the sounds with the target resource acquisition authority comprises the following steps: acquiring parameter information of the request event, wherein the parameter information comprises an event processing period T, an event modification frequency N, an integral value s of a sound of a requesting party, the event processing period T, an event modification frequency threshold N and an event modification frequency maximum upper limit value W; s321: when N is less than W, judging whether T and N meet T is more than or equal to T or N is more than or equal to N, if yes, entering S322; if not, go to S326; s322: judging whether a first sound device with the target resource acquisition authority and the authority attribute in a default sharing state exists, if so, entering S323; otherwise, go to S324; s323: determining each first sound device with the target resource acquisition permission and the permission attribute in a default sharing state, and randomly selecting one first sound device from the first sound devices as a target sound device; s324: judging whether the target resource acquisition permission exists or not and the permission attribute is in a non-default sharing state, if so, entering S325; s325: determining each second sound which has the target resource acquisition authority and the authority attribute of which is in a non-default sharing state, sequencing the second sounds according to the integral value from large to small, and randomly selecting one second sound from the sequenced second sounds as a target sound; s326: according to the calculation relation
Figure FDA0003096829650000041
Calculating a second index value H ' of the sound of the requesting party, and judging whether H ' satisfies H ' being more than or equal to H, wherein H is soundIf yes, entering S322, otherwise, entering S327; wherein α '+ β' + γ '═ 1, α', β ', and γ' are all constants; s327: determining each second sound device which has the target resource acquisition authority and the authority attribute of which is in a non-default sharing state, sequencing the second sound devices according to the integral value from large to small, and randomly selecting one sound device from a preset number of second sound devices as a target sound device;
the first acquisition module is used for acquiring corresponding target resources according to the target resource acquisition permission of the target sound equipment;
the establishing module is used for establishing an access link corresponding to the target resource according to the target resource and the information of the requesting party sound equipment, and returning the access link to the requesting party sound equipment so that the requesting party sound equipment can access the target resource according to the access link.
6. The resource sharing apparatus according to claim 5, wherein between the receiving module and the first determining module, the apparatus further comprises: the adding module is used for adding the request event into the request queue according to the adding position;
and the second acquisition module is used for polling all the request events in the request queue and acquiring the request events and the request information from the request queue.
7. A resource sharing device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the resource sharing method according to any one of claims 1 to 4 when executing the computer program.
8. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the resource sharing method according to any one of claims 1 to 4.
CN201810877759.6A 2018-08-03 2018-08-03 Resource sharing method, device, equipment and computer readable storage medium Active CN109246080B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810877759.6A CN109246080B (en) 2018-08-03 2018-08-03 Resource sharing method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810877759.6A CN109246080B (en) 2018-08-03 2018-08-03 Resource sharing method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109246080A CN109246080A (en) 2019-01-18
CN109246080B true CN109246080B (en) 2021-08-27

Family

ID=65070190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810877759.6A Active CN109246080B (en) 2018-08-03 2018-08-03 Resource sharing method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109246080B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110049531B (en) * 2019-04-22 2021-05-04 Oppo广东移动通信有限公司 Network resource sharing method and related device
CN110602068B (en) * 2019-08-29 2022-08-09 深圳市新系区块链技术有限公司 Data authority management method and related product
WO2021035708A1 (en) * 2019-08-30 2021-03-04 Oppo广东移动通信有限公司 Method and apparatus for accessing collection resources, device and storage medium
CN113179197B (en) * 2021-03-02 2022-11-04 广州朗国电子科技股份有限公司 Household appliance resource sharing method, household appliance resource sharing device and storage device
CN114329384A (en) * 2021-12-27 2022-04-12 国网辽宁省电力有限公司信息通信分公司 Safety protection method for power grid operating system
CN115277273B (en) * 2022-07-25 2024-03-22 维沃移动通信有限公司 Resource sharing method and resource sharing device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101150419A (en) * 2007-11-12 2008-03-26 中国电信股份有限公司 A new generation call center system and automatic service realization method
US7587310B2 (en) * 2004-08-30 2009-09-08 Lsi Corporation Sound processor architecture using single port memory unit
CN101807264A (en) * 2009-02-18 2010-08-18 深圳市华信智能科技有限公司 Client service reservation method
CN102137158A (en) * 2011-03-10 2011-07-27 西北工业大学 Method for sharing information equipment resources by utilizing equipment agent system
CN105162715A (en) * 2006-03-01 2015-12-16 卢森特技术有限公司 System and method for prioritizing session initiation protocol messages
CN105185391A (en) * 2015-08-27 2015-12-23 三星电子(中国)研发中心 Method and device for multi-user sound box control
CN106506550A (en) * 2016-12-27 2017-03-15 Tcl集团股份有限公司 A kind of shared method and apparatus of smart machine control authority
CN106685978A (en) * 2017-01-04 2017-05-17 北京奇虎科技有限公司 Access authority control method, device and mobile terminal between multiple devices
CN107347039A (en) * 2016-05-05 2017-11-14 深圳市中兴微电子技术有限公司 A kind of management method and device in shared buffer memory space

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9985950B2 (en) * 2006-08-09 2018-05-29 Assa Abloy Ab Method and apparatus for making a decision on a card
CN103443770B (en) * 2011-03-19 2017-12-12 富士通株式会社 Terminal installation, process management method and process supervisory program
US10134374B2 (en) * 2016-11-02 2018-11-20 Yamaha Corporation Signal processing method and signal processing apparatus

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7587310B2 (en) * 2004-08-30 2009-09-08 Lsi Corporation Sound processor architecture using single port memory unit
CN105162715A (en) * 2006-03-01 2015-12-16 卢森特技术有限公司 System and method for prioritizing session initiation protocol messages
CN101150419A (en) * 2007-11-12 2008-03-26 中国电信股份有限公司 A new generation call center system and automatic service realization method
CN101807264A (en) * 2009-02-18 2010-08-18 深圳市华信智能科技有限公司 Client service reservation method
CN102137158A (en) * 2011-03-10 2011-07-27 西北工业大学 Method for sharing information equipment resources by utilizing equipment agent system
CN105185391A (en) * 2015-08-27 2015-12-23 三星电子(中国)研发中心 Method and device for multi-user sound box control
CN107347039A (en) * 2016-05-05 2017-11-14 深圳市中兴微电子技术有限公司 A kind of management method and device in shared buffer memory space
CN106506550A (en) * 2016-12-27 2017-03-15 Tcl集团股份有限公司 A kind of shared method and apparatus of smart machine control authority
CN106685978A (en) * 2017-01-04 2017-05-17 北京奇虎科技有限公司 Access authority control method, device and mobile terminal between multiple devices

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A Fair and Efficient Resource Allocation Scheme for Multi-Server Distributed Systems and Networks;Peyman Teymoori;《IEEE TRANSACTIONS ON MOBILE COMPUTING》;IEEE;20151006;全文 *
语音端点检测在实时语音截取中的应用;洪奕鑫;《无线互联科技》;20171205;全文 *

Also Published As

Publication number Publication date
CN109246080A (en) 2019-01-18

Similar Documents

Publication Publication Date Title
CN109246080B (en) Resource sharing method, device, equipment and computer readable storage medium
US10705789B2 (en) Dynamic volume adjustment for virtual assistants
US20150189425A1 (en) Mobile device speaker control
JP7032377B2 (en) How to make notifications, devices and systems
KR20170100538A (en) Methods and systems for dynamic creation of hotspots for media control
CN107784221B (en) Authority control method, service providing method, device, system and electronic device
KR102502617B1 (en) Distributed identification in networked system
WO2022105365A1 (en) Device control method and system, electronic device, and storage medium
US11546317B2 (en) Systems and methods for providing services
US11102021B2 (en) Responsive communication system
CN105791963B (en) Processing method, device, TV and the intelligent server of order
CN104639409A (en) Method and device for automatically adding speakers to speaker ad hoc network
WO2015101302A1 (en) Data sharing method, system, user end and background server
EP2733913A2 (en) Method and apparatus for communication between a vehicle based computing system and a remote application
CN110910541A (en) Access control method, system, network device and computer-readable storage medium
WO2017088294A1 (en) Method and device for establishing wireless connection
CN107644265B (en) Reservation method, device and system for shared object and server
CN109474596B (en) Token-based resource sharing method for intelligent loudspeaker box
CN108962259B (en) Processing method and first electronic device
WO2017136979A1 (en) Implementation method, apparatus and system for remote access
WO2017031855A1 (en) Playing device grouping control method and user terminal
WO2018019047A1 (en) Set-top box operation method and device
WO2016169151A1 (en) Method and apparatus for connection between terminals, and storage medium
CN106210002A (en) Control method, device and electronic equipment
CN103873682A (en) Information processing method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant